I used the curl request interface to obtain the returned value, but it was unsuccessful. let's see how to retrieve it?

Source: Internet
Author: User
Tags oauth
I used the curl request interface to obtain the returned value, but it was unsuccessful. let's see how to retrieve it? An interface address http://mp.vservice.com.cn/service/OutWebService? Wsdl

Interface caller
CallService (String serviceName, String servId, String secretKey, String xmlInfo)

Parameter name
ServiceName: OAuth
ServId: Service id
SecretKey: secret key of the service number
XmlInfo:
     
      333
      Weixin/yixin
      Info/base
      Uri
     


This is the content of the document. The service id and Key will not be published. how can we get the return value through curl?


Reply to discussion (solution)

No one answered

Http://blog.csdn.net/u011619326/article/details/38342421 under reference

Use soap instead of curl.
$ ServId = 'XXX ';
$ SecretKey = 'XXX ';
In these two cases, you change them to your dynamic route tables.

 
 
  
   333
  
  
   weixin/yixin
  
  
   info/base
  
  
   uri
  
 ';    $result = $client->callService($servicename, $servId, $secretKey, $xmlInfo);    var_dump($result);}catch(SOAPFault $e){      echo $e->getMessage();  }  ?>

This is clearly a webservice call. why do you use curl?

It is obtained using SOAP.

Use soap instead of curl.
$ ServId = 'XXX ';
$ SecretKey = 'XXX ';
In these two cases, you change them to your dynamic route tables.

 
 
  
   333
  
  
   weixin/yixin
  
  
   info/base
  
  
   uri
  
 ';    $result = $client->callService($servicename, $servId, $secretKey, $xmlInfo);    var_dump($result);}catch(SOAPFault $e){      echo $e->getMessage();  }  ?>



Thank you very much, but after I run the message Not enough message parts were received ed for the operation.
I don't know how to solve this problem?


Use soap instead of curl.
$ ServId = 'XXX ';
$ SecretKey = 'XXX ';
In these two cases, you change them to your dynamic route tables.

 
 
  
   333
  
  
   weixin/yixin
  
  
   info/base
  
  
   uri
  
 ';    $result = $client->callService($servicename, $servId, $secretKey, $xmlInfo);    var_dump($result);}catch(SOAPFault $e){      echo $e->getMessage();  }  ?>



Thank you very much, but after I run the message Not enough message parts were received ed for the operation.
I don't know how to solve this problem?



I did it according to the parameters you provided. after reading the wsdl document, I found that some parameters are missing.









I am sure this is easy to use. score.

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 ();}


Http://blog.csdn.net/u011619326/article/details/38342421 under reference


Thank you very much.

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.