php调用webservice问题
<?xml version="1.0" encoding="UTF-8"?>
<processSP><wmsSecurityInfo><username>40222</username><password>flux22</password></wmsSecurityInfo><wmsParam><customerid>GXG</customerid><messageid>106D</messageid><stdno>SO</stdno><warehouseid>GXG_WMS</warehouseid><param>1209200001346</param></wmsParam></processSP>,按说没有空值呀。。又想是不是xml的UTF-8格式导致的,顺便问下这样一个UTF-8格式的xml字符串,如何改变编码?($iconv_str = iconv('UTF-8', 'GBK', $str);php的这个函数不行)但这或许不是根本原因,还请大神指点,下面是我调用的代码以及webservice提供的说明
$str = array2xml($data,'processSP');
$iconv_str = iconv("UTF-8", "GBK", $str);
$soap_client = new SoapClient('http://192.168.1.9:8081/datahubWeb/WMSSOAP2/WSERPService/ERP/Service3?wsdl');
$soap_result = $soap_client->processSP($iconv_str);
,
<wsdl:operation name="processSP">
<wsdl:input message="tns:processSP" name="processSP"></wsdl:input>
<wsdl:output message="tns:processSPResponse" name="processSPResponse"></wsdl:output>
</wsdl:operation>
相关推荐
PHP调用.NET的WebService 简单实例
主要介绍了使用PHP调用.NET的WebService的一个简单实例,十分的简单,有需要的小伙伴可以自己扩展下,如有疑问请留言。
c# 调用php webservice 源代码
c# 调用php webservice 汉字乱码解决方案
PHP中如何调用webservice的实例参考
本篇文章介绍了,PHP中如何调用webservice的实例参考。需要的朋友参考下
PHP调用C#的webservice
PHP去调用C#写的一个webservice的例子,里面有详细的文字说明,希望对初学者有一定的帮助。
Java调用php的webservice
Java调用php的webservice: header("Content-Type:text/html;charset=UTF-8"); // require('lib/nusoap.php'); require_once("lib/nusoap.php"); $server = new soap_server(); $server->configureWSDL('hellowsdl', 'urn:hellowsdl'); $server->wsdl->schemaTargetNamespace = 'urn:hellowsdl'; $server->register('hello', // method name array('name' => 'xsd:string'), // input parameters array('return' => 'xsd:string'), // output parameters 'urn:hellowsdl', // namespace 'urn:hellowsdl#hello', // soapaction 'rpc', // style 'encoded', // use 'Says hello to the caller' // documentation ); ... String endpoint = "http://localhost/Service1/WebContent/index.php";//该段就是上面刚将的地址 Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName("hello"); ...


基础编程
