SOAP请求使用PHP失败


SOAP Request fails using PHP

我想使用来自以下Web服务的简单SOAP请求:

http://www.webservicex.net/geoipservice.asmx

System.Web.Services.Protocols.SoapException:服务器无法处理请求。--->System.NullReferenceException:对象引用未设置为对象的实例。在位于的WebserviceX.Service.Adapter.IPAdapter.CheckIP(字符串IP)WebserviceX.Service.GeoIPService.GetGeoIP(字符串IPAddress)

这是我从Web服务中得到的异常,这是我的代码:

    $wsdl = 'http://www.webservicex.net/geoipservice.asmx?WSDL';
    $soap = new SoapClient($wsdl);
    $functions = $soap->__getFunctions();
    $types = $soap->__getTypes();
    $parameters = array("IPAddress"=> "exampleIPAddress");
    $response = $soap->GetGeoIP($parameters);

使用真实的ip地址而不是"exampleIPAddress"。

感谢

似乎在soap服务器端出现了错误(感谢James)。我尝试了另一个IP地址,效果很好。也许某些ip区域不受支持:D