$client = new \SoapClient($wsdl_url,["trace"=>true,'encoding'=>'UTF-8','soap_version'=>SOAP_1_2,'uri'=>'http://ws.apache.org/axis2']);
print_r($client->__getFunctions());
$xml=
XML;
主要在这边:使用数组就报错
$client->__soapCall('getDepartInfo',$xml);
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in
等下发wsdl
额,容量太大。。。。。
http://www.foxwho.com/wsdl.txt
这个地址查看
晚上 8点钟在线,现在回家吃饭
由
struct getDepartInfo { string strXml;}
$client->__soapCall('getDepartInfo', array('strXml' => $xml));
由
struct getDepartInfo { string strXml;}
$client->__soapCall('getDepartInfo', array('strXml' => $xml));
由
struct getDepartInfo { string strXml;}
$client->__soapCall('getDepartInfo', array('strXml' => $xml));
Could not connect to host 无法连接到主机
你在 wsdl 中隐去了目标 url ,这就没法帮你了
vs2010 的 wsdl 工具生成的方法是
public string getDepartInfo([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string strXml) { object[] results = this.Invoke("getDepartInfo", new object[] { strXml}); return ((string)(results[0])); }
this.Url = "http://***:80/axis2/services/WS4SZ.WS4SZHttpSoap11Endpoint/";
Could not connect to host 无法连接到主机
你在 wsdl 中隐去了目标 url ,这就没法帮你了
vs2010 的 wsdl 工具生成的方法是
public string getDepartInfo([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=true)] string strXml) { object[] results = this.Invoke("getDepartInfo", new object[] { strXml}); return ((string)(results[0])); }
this.Url = "http://***:80/axis2/services/WS4SZ.WS4SZHttpSoap11Endpoint/";
谢谢版主,等对方把端口更换成公网IP,我再试试看!
哪天来苏州的时候搓一顿。