java soa接口测试,可以使用http协议调用
post调用url:“接口url”+/rpc
post调用参数body:
{
"ver": "接口版本号",
"soa":{"req":"123"}, //123取值随意?
"iface":"接口调用依赖方法",
"method":"接口调用方法名",
"args":{"arg0":"参数0","arg1":"参数1","arg2":"参数2"}
}
例如:请求url:http://vpcb-lpdinfra-stream-1.vm.elenet.me:8989/rpc
body:
{ "ver":"1.0",
"soa":{"req":"123"},
"iface":"me.ele.lpdinfra.prediction.service.PredictionService",
"method":"restaurant_make_order_time",
"args":{"arg2":"\"stable\"","arg1":"{\"code\":[\"WIND\"],\"temperature\":11.11}","arg0":"{\"tracking_id\":\"100000000331770936\",\"eleme_order_id\":\"100000000331770936\",\"platform_id\":\"4\",\"restaurant_id\":\"482571\",\"dish_num\":1,\"dish_info\":[{\"entity_id\":142547763,\"quantity\":1,\"category_id\":1,\"dish_name\":\"番茄炒蛋\",\"price\":1.0}],\"merchant_location\":{\"longitude\":\"121.47831425\",\"latitude\":\"31.27576153\"},\"customer_location\":{\"longitude\":\"121.47831425\",\"latitude\":\"31.27576153\"},\"created_at\":1472809544,\"confirmed_at\":1472809545,\"dishes_total_price\":0.0,\"food_boxes_total_price\":2.0,\"delivery_total_price\":2.0,\"pay_amount\":0.0,\"city_id\":\"1\"}"}
}