phpcall.netwebservice?该如何解决
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了phpcall.netwebservice?该如何解决,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2102字,纯文字阅读大概需要4分钟。
内容图文
![phpcall.netwebservice?该如何解决](/upload/InfoBanner/zyjiaocheng/210/46a411afa2dd4163b2d03962dbe687a4.jpg)
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"
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
======================================================
Here is the method that client code call the method 'InsertTest':
----------------------------------------------------
$soap = new soapclient($wsdl,'wsdl');
$soap->soap_defencoding = 'UTF-8';
$soap->decode_utf8 = false;
$soap->xml_encoding = 'UTF-8';
$result = $soap->call('InsertTest',array('s' => array('0000','aaaa')),'', '', 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.
------解决方案--------------------
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('InsertTest',array('s' => array('0000','aaaa')),'', '', false, true,'document','encoded');
to
$proxy = $soap->getProxy();
$result = $proxy-> InsertTest(array('s' => array('0000','aaaa')),'', '', false, true,'document','encoded');
------解决方案--------------------
.NET的WS有若干种编码方式,其中有一种是和PHP不兼容的。我忘记了具体是Encoded还是Literal。不过已经有人用NuSoap解决了这个问题。具体代码如果你要,我大概还是能找到的。
内容总结
以上是互联网集市为您收集整理的phpcall.netwebservice?该如何解决全部内容,希望文章能够帮你解决phpcall.netwebservice?该如何解决所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。