SOAP. if VersionMismatch is encountered, fix the issue and paste the code first.
"http://v2.shanxitele.com/service/OutWebService?wsdl",'uri' => "http://127.0.0.1/")); $servicename = 'OAuth'; $servId = 'xxx'; $secretKey = 'xxx'; $xmlInfo = '
fc4fa30c444400b701446c540230244e
yixin
base
lcoalhost/index.php
'; $result = $client->callService($servicename, $servId, $secretKey, $xmlInfo); var_dump($result);}catch(SOAPFault $e){ echo "Error: ",$e->faultcode,", string: ",$e->faultstring;} ?>
Error Code: VersionMismatch, string: Wrong Version
Solve the problem.
Reply to discussion (solution)
Provided method Array ([0] => callServiceResponse callService (callService $ parameters)-related data structure Array ([0] => struct callService {string in0; string in1; string in2; string in3;} [1] => struct callServiceResponse {string out ;})
Do you have to follow the rules?
Follow me here
Try {$ xml = 'XML data'; // address $ soap = new SoapClient ("http://mp.vservice.com.cn/service/OutWebService? WSDL "); // The request parameter is adjusted according to your parameter $ param = array ('username' => '*****', 'pwd' => '*****', 'businesstype '=> 'salehouses', 'xmlcontent' => $ xml ); // call the method on the server. Adjust it according to your method. here, Import is the method name $ result = $ soap->__ soapCall ('import ', array ('parameters '=> $ param); print_r ($ result);} catch (SoapFault $ e) {echo $ e-> getMessage ();} catch (Exception $ E) {echo $ E-> getMessage ();}
Provided method Array ([0] => callServiceResponse callService (callService $ parameters)-related data structure Array ([0] => struct callService {string in0; string in1; string in2; string in3;} [1] => struct callServiceResponse {string out ;})
Do you have to follow the rules?
Well, I am a newbie. I have never touched Soap before. can I post a complete code for me? Thank you very much.
Follow me here
Try {$ xml = 'XML data'; // address $ soap = new SoapClient ("http://mp.vservice.com.cn/service/OutWebService? WSDL "); // The request parameter is adjusted according to your parameter $ param = array ('username' => '*****', 'pwd' => '*****', 'businesstype '=> 'salehouses', 'xmlcontent' => $ xml ); // call the method on the server. Adjust it according to your method. here, Import is the method name $ result = $ soap->__ soapCall ('import ', array ('parameters '=> $ param); print_r ($ result);} catch (SoapFault $ e) {echo $ e-> getMessage ();} catch (Exception $ E) {echo $ E-> getMessage ();}
This information is displayed after I run it. stdClass Object ([out] =>)
Are your usernames and passwords authentic?
Are your usernames and passwords authentic?
Is real,
The method has been provided to you, but you cannot provide all the correct parameters.
Therefore, debugging can only be completed by yourself.
The method has been provided to you, but you cannot provide all the correct parameters.
Therefore, debugging can only be completed by yourself.
1. webpage authorization URL interface
? An interface address http://v2.shanxitele.com/service/OutWebService? Wsdl
? Interface caller
CallService (String serviceName, String servId, String secretKey, String xmlInfo)
? Interface Input parameters
Parameter name
ServiceName OAuth
ServId service id Taiyuan telecom = fc4fa30c444400b701446c540230244e
SecretKey service number key Taiyuan telecom = 96e79218965eb72c92a549dd5a330112
XmlInfo
Xxx
Yixin
Base
Uri
Please. I really don't understand this.
try{ $client = new SOAPClient("http://v2.shanxitele.com/service/OutWebService?wsdl", array('uri' => "http://v2.shanxitele.com/")); $servicename = 'OAuth'; $servId = 'fc4fa30c444400b701446c540230244e'; $secretKey = '96e79218965eb72c92a549dd5a330112'; $xmlInfo = '
fc4fa30c444400b701446c540230244e
yixin
base
lcoalhost/index.php
'; $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;}
try{ $client = new SOAPClient("http://v2.shanxitele.com/service/OutWebService?wsdl", array('uri' => "http://v2.shanxitele.com/")); $servicename = 'OAuth'; $servId = 'fc4fa30c444400b701446c540230244e'; $secretKey = '96e79218965eb72c92a549dd5a330112'; $xmlInfo = '
fc4fa30c444400b701446c540230244e
yixin
base
lcoalhost/index.php
'; $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;}
Thank you very much.