您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

SOAP webservice 通信问题

2024/2/22 10:48:23发布21次查看
$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=
sldq
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));


报错
could not connect to host
soapfault object
(
[message:protected] => could 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
)
)
由 struct getdepartinfo { string strxml;}


可知,要这样调用 $client->__soapcall('getdepartinfo', array('strxml' => $xml));


帮我调试一下,联系我qq 我给你文件。改天请你吃饭
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])); }

可知并没有搞错
生成的 url 是 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])); }

可知并没有搞错
生成的 url 是 this.url = http://***:80/axis2/services/ws4sz.ws4szhttpsoap11endpoint/;

发你短信信息里,因为这个不能公开 谢谢版主,等对方把端口更换成公网ip,我再试试看!
哪天来苏州的时候搓一顿。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product