开发者

Trouble communicating by SOAP between Java and PHP

Here's the most important ( I think ) part of the SOAP written in Java:

@WebService()
public class VremeaServerModule {

    /**
     * Web 开发者_高级运维service operation
     */
    @WebMethod(operationName = "getWeatherForCity")
    public String getWeatherForCity(@WebParam(name = "city") String city) throws IOException {

and here's the PHP code that issuing a SOAP request:

function getWeather($cityName)
{
  $wsdl_url = "some_url";
  $WSDL = new SOAP_WSDL($wsdl_url);
  $client = $WSDL->getProxy();
  $params = array("city" => $cityName);
  print_r($params);
  $result = $client->getWeatherForCity($params);
  return $result;
}

The thing is, Java always receives city as being null. Is there something I'm missing?


Have you tried with just this: $result = $client->getWeatherForCity($cityName);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜