SOAPwebservice communication problem $ client = new \ SoapClient ($ wsdl_url, ["trace" => true, 'encoding' => 'utf-8 ', 'soap _ version' => SOAP_1_2, 'URL' => 'http: // ws.apache.org/axis2']);
Print_r ($ client->__ getFunctions ());
$ Xml = <
SLDQ
XML;
Here: An error is reported when arrays are used.
$ Client->__ soapCall ('getpartinfo', $ xml );
Fatal error: Uncaught SoapFault exception: [HTTP] cocould not connect to host in
Etc. issue the wsdl
Reply to discussion (solution)
The capacity is too large .....
Http://www.foxwho.com/wsdl.txt
View this address
I am going online at eight o'clock. now I am going home for dinner.
By
struct getDepartInfo { string strXml;}
We can see that
$client->__soapCall('getDepartInfo', array('strXml' => $xml));
By
struct getDepartInfo { string strXml;}
We can see that
$client->__soapCall('getDepartInfo', array('strXml' => $xml));
Error
Cocould not connect to host
SoapFault Object
(
[Message: protected] => cocould not connect to host
[String: Exception: private] =>
[Code: protected] => 0
[File: protected] =>/www/wwwroot/default/p. php
[Line: protected] => 29
[Trace: Exception: private] => Array
(
[0] => Array
(
[Function] => _ doRequest
[Class] => SoapClient
[Type] =>->
[Args] => Array
(
[0] =>
[1] => http: // *****: 80/axis2/services/WS4SZ. WS4SZHttpSoap11Endpoint/
[2] => urn: getDepartInfo
[3] => 1
[4] => 0
)
)
By
struct getDepartInfo { string strXml;}
We can see that
$client->__soapCall('getDepartInfo', array('strXml' => $xml));
Help me debug, contact me QQ, and I will give you a file. Invite you to dinner another day
Cocould not connect to host cannot connect to host
You have hidden the target url in the wsdl, which cannot help you.
The method for generating the wsdl tool in vs2010 is:
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])); }
We know there are no mistakes.
The generated url is
this.Url = "http://***:80/axis2/services/WS4SZ.WS4SZHttpSoap11Endpoint/";
Cocould not connect to host cannot connect to host
You have hidden the target url in the wsdl, which cannot help you.
The method for generating the wsdl tool in vs2010 is:
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])); }
We know there are no mistakes.
The generated url is
this.Url = "http://***:80/axis2/services/WS4SZ.WS4SZHttpSoap11Endpoint/";
Send your text message because it cannot be published
Thank you, moderator. wait for the other party to change the port to a public IP address. I will try again!
When I came to Suzhou, I had a meal.