SOAPwebservice communication problems

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.