SOAP, Encounter VersionMismatch, seek solution

Source: Internet
Author: User
Tags oauth wsdl
Put the code out 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;}  ? >


DeMerit error code Error:versionmismatch, String:wrong Version

Solution.


Reply to discussion (solution)

The provided method is 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.

try {$xml = ' xml data ';//Address $soap = new SoapClient ("Http://mp.vservice.com.cn/service/OutWebService? WSDL ");//The request parameter is adjusted according to your parameters $param = Array (' userName ' = * * * * * * * * *, ' pwd ' = ' * * * ', ' businesstype ' = ' = ' salehouses ', ' X  Mlcontent ' = + $xml);//Call the server-side method to adjust my here Import is the method name $result = $soap->__soapcall (' Import ', Array (' Parameters ' + $param));p Rint_r ($result);} catch (SoapFault $e) {echo $e->getmessage ();} catch (Exception $E) {echo $E->getmessage ();}

The provided method is 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'm new, I haven't touched soap before, can you put out a complete code for me? Thank you so much

Follow me.

try {$xml = ' xml data ';//Address $soap = new SoapClient ("Http://mp.vservice.com.cn/service/OutWebService? WSDL ");//The request parameter is adjusted according to your parameters $param = Array (' userName ' = * * * * * * * * *, ' pwd ' = ' * * * ', ' businesstype ' = ' = ' salehouses ', ' X  Mlcontent ' = + $xml);//Call the server-side method to adjust my here Import is the method name $result = $soap->__soapcall (' Import ', Array (' Parameters ' + $param));p Rint_r ($result);} catch (SoapFault $e) {echo $e->getmessage ();} catch (Exception $E) {echo $E->getmessage ();}



This message I ran out of is this, StdClass Object ([out] =)

Is your username and password real?

Is your username and password real?



Is real,

The method has been given to you, but you can not provide all the correct parameters
So you can only do the debugging yourself.

The method has been given to you, but you can not provide all the correct parameters
So you can only do the debugging yourself.



1. Get the website Authorization URL interface
? Interface Address HTTP://V2.SHANXITELE.COM/SERVICE/OUTWEBSERVICE?WSDL
? Interface callers
Callservice (String servicename,string servid,string secretkey,string xmlinfo)
? Interface Input Parameters
Parameter name passing value
ServiceName OAuth
Servid Service number ID Taiyuan Telecom =fc4fa30c444400b701446c540230244e
Secretkey Service number key Taiyuan Telecom =96e79218965eb72c92a549dd5a330112
Xmlinfo


Xxx
Yixin
Base
Uri


Come on. This is really not understand.

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 so much.
  • Related Article

    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.