SOAP, Encounter VersionMismatch, seek solution
Put the code out first.
Header ("Content-type:text/html;charset=utf-8");
try{
$client = new SoapClient (NULL,
Array (' location ' = = ' 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;
}
?>
DeMerit error code Error:versionmismatch, String:wrong Version
Solution.
------Solution--------------------
The methods provided
Array
(
[0] = Callserviceresponse callservice (callservice $parameters)
)
Related Data structures
Array
(
[0] = struct Callservice {
String In0;
String in1;
String in2;
String in3;
}
[1] = struct Callserviceresponse {
string out;
}
)
Do you have to follow the rules?
------Solution--------------------
Follow me.
try {
$xml = ' xml data ';
Address
$soap = new SoapClient ("Http://mp.vservice.com.cn/service/OutWebService?WSDL");
The request parameters are adjusted according to your parameters
$param = Array (' userName ' = * * * * * * * * *, ' pwd ' = ' * * * *, ' businesstype ' = ' salehouses ', ' xmlcontent ' and ' = ') ;
Call the server-side method to adjust the way I'm 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 ();
}