【发布时间】:2016-05-10 00:41:07
【问题描述】:
我需要使用 Soap API 并将其公开为 REST。
类似于此 Apigee 教程/文档中讨论的 Weather API http://docs.apigee.com/tutorials/proxy-soap-service
但是,在我的情况下,我必须使用带有 json 负载中参数的 rest POST,而不是使用 rest GET。
所以不要这样做
获取http://myapi.apigee.net/weatherrest/cityweatherbyzip?ZIP=07030
我需要这样做:
发布http://myapi.apigee.net/weatherrest/cityweatherbyzip
{
"ZIP":07030
}
apigee 从发布的 json 有效负载中获取参数并使用它进行正常的 SOAP 调用。
目前,它似乎不起作用,调用到达目标但没有参数。它返回:
{
"GetCityWeatherByZIPResponse":{
"GetCityWeatherByZIPResult":{
"Success":"false",
"ResponseText":"Invalid ZIP",
"State":{
},
"City":{
},
"WeatherStationCity":{
},
"WeatherID":-1,
"Description":{
},
"Temperature":{
},
"RelativeHumidity":{
},
"Wind":{
},
"Pressure":{
},
"Visibility":{
},
"WindChill":{
},
"Remarks":{
}
}
}
}
我应该怎么做才能确保从我的 json 有效负载中获取参数并传播到 SOAP 目标调用?非常感谢
【问题讨论】: