"http://127.0.0.1/")); $servicename = 'OA">
时间:2021-07-01 10:21:17 帮助过:110人阅读
"http://v2.shanxitele.com/service/OutWebService?wsdl",'uri' => "http://127.0.0.1/")); $servicename = 'OAuth'; $servId = 'xxx'; $secretKey = 'xxx'; $xmlInfo = ''; $result = $client->callService($servicename, $servId, $secretKey, $xmlInfo); var_dump($result);}catch(SOAPFault $e){ echo "Error: ",$e->faultcode,", string: ",$e->faultstring;} ?> fc4fa30c444400b701446c540230244e yixin base lcoalhost/index.php
提供的方法Array( [0] => callServiceResponse callService(callService $parameters))相关的数据结构Array( [0] => struct callService { string in0; string in1; string in2; string in3;} [1] => struct callServiceResponse { string out;})你总得按规矩来吧?
按照我这个来
try { $xml='xml数据'; //地址 $soap = new SoapClient ( "http://mp.vservice.com.cn/service/OutWebService?WSDL" ); //请求参数 根据你的参数调整 $param = array ('userName' => '*****', 'pwd' => '****', 'businessType' => 'SaleHouses', 'xmlContent' => $xml ); //调用服务器端的方法 根据你的方法调整 我这里Import是方法名称 $result = $soap->__soapCall ( 'Import', array ('parameters' => $param ) ); print_r ( $result ); } catch ( SoapFault $e ) { echo $e->getMessage (); } catch ( Exception $E ) { echo $E->getMessage (); }
提供的方法Array( [0] => callServiceResponse callService(callService $parameters))相关的数据结构Array( [0] => struct callService { string in0; string in1; string in2; string in3;} [1] => struct callServiceResponse { string out;})你总得按规矩来吧?
按照我这个来
try { $xml='xml数据'; //地址 $soap = new SoapClient ( "http://mp.vservice.com.cn/service/OutWebService?WSDL" ); //请求参数 根据你的参数调整 $param = array ('userName' => '*****', 'pwd' => '****', 'businessType' => 'SaleHouses', 'xmlContent' => $xml ); //调用服务器端的方法 根据你的方法调整 我这里Import是方法名称 $result = $soap->__soapCall ( 'Import', array ('parameters' => $param ) ); print_r ( $result ); } catch ( SoapFault $e ) { echo $e->getMessage (); } catch ( Exception $E ) { echo $E->getMessage (); }
你的用户名和口令真实吗?
你的用户名和口令真实吗?
方法已经给你了,但你又不可能全部提供正确的参数
所以调试只能你自己完成了
方法已经给你了,但你又不可能全部提供正确的参数
所以调试只能你自己完成了
try{ $client = new SOAPClient("http://v2.shanxitele.com/service/OutWebService?wsdl", array('uri' => "http://v2.shanxitele.com/")); $servicename = 'OAuth'; $servId = 'fc4fa30c444400b701446c540230244e'; $secretKey = '96e79218965eb72c92a549dd5a330112'; $xmlInfo = ''; $data = array('in0' => $servicename, 'in1' => $servId, 'in2'=>$secretKey, 'in3'=>$xmlInfo); $result = $client->callService($data); $rs = simplexml_load_string($result->out, 'SimpleXMLElement', LIBXML_NOCDATA); print_r($rs);}catch(SOAPFault $e){ echo "Error: ",$e->faultcode,", string: ",$e->faultstring;} fc4fa30c444400b701446c540230244e yixin base lcoalhost/index.php
try{ $client = new SOAPClient("http://v2.shanxitele.com/service/OutWebService?wsdl", array('uri' => "http://v2.shanxitele.com/")); $servicename = 'OAuth'; $servId = 'fc4fa30c444400b701446c540230244e'; $secretKey = '96e79218965eb72c92a549dd5a330112'; $xmlInfo = ''; $data = array('in0' => $servicename, 'in1' => $servId, 'in2'=>$secretKey, 'in3'=>$xmlInfo); $result = $client->callService($data); $rs = simplexml_load_string($result->out, 'SimpleXMLElement', LIBXML_NOCDATA); print_r($rs);}catch(SOAPFault $e){ echo "Error: ",$e->faultcode,", string: ",$e->faultstring;} fc4fa30c444400b701446c540230244e yixin base lcoalhost/index.php