Phpcall. netwebservice ??? Hello, everybody: IhaveaquestionaboutPHPcall. netwebservice, pleasehelpme. Whytheservercannotaccessthearrayvaluei php call. net web service ???
Hello, every body:
I have a question about PHP call. net webservice, please help me.
Why the server can not access the array value I sent?
========================================================== ======================================
Here is the SOAP 1.1 request and respond example
------------------------------------------------
POST/DMService. asmx HTTP/1.1
Host: sboserver1
Content-Type: text/xml; charset = utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/InsertTest"
String
String
HTTP/1.1 200 OK
Content-Type: text/xml; charset = utf-8
Content-Length: length
String
String
========================================================== ====================
Here is the method that client code call the method 'insertest ':
----------------------------------------------------
$ Soap = new soapclient ($ wsdl, 'wsdl ');
$ Soap-> soap_defencoding = 'utf-8 ';
$ Soap-> decode_utf8 = false;
$ Soap-> xml_encoding = 'utf-8 ';
$ Result = $ soap-> call ('insertest', array ('s' => array ('20170101', 'AAA'), '','', false, true, 'document', 'encoded ');
Var_dump ($ result );
?>
Why the server can not access the array value I sent?
========================================================== ====================
The. net webservice WSDL file is as follows:
========================================================== ====================
Hi, this article too long, please see here (http://sourceforge.net/community/forum/topic.php? Id = 827 & page & replies = 1 ),
Thanks.
------ Solution --------------------
Are you Chinese?
If you are Chinese, please refer to http://blog.csdn.net/mynamesucks/archive/2006/05/26/756480.aspx
Otherwise, see following.
Replace
$ Result = $ soap-> call ('insertest', array ('s' => array ('20170101', 'AAA'), '','', false, true, 'document', 'encoded ');
To
$ Proxy = $ soap-> getProxy ();
$ Result = $ proxy-> InsertTest (array ('s '=> array ('20140901', 'AAA'), '','', false, true, 'document', 'encoded ');
------ Solution --------------------
. Net ws have several encoding methods, one of which is incompatible with PHP. I forgot whether it was Encoded or Literal. But someone has already used NuSoap to solve this problem. I can find the specific code if you want it.
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