SOAP, Encounter VersionMismatch, seek solution

Source: Internet
Author: User
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 ();
}
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.