Shun Fung BSP Order number query Interface SOAP Request example
In some interfaces the design of a soap-like request is sometimes used, such as the interface of Shun Fung BSP.
I tried different ways of post-request, either completely requested something, or received garbled, all failed.
The core code for SOAP requests for Shun Fung interfaces is shared as follows:
code as follows |
|
/** * Send SOAP request */ PR ivate function _soap () { $client = new SoapClient ($this->serviceurl); $info = new StdClass (); $info-> ; arg0 = $this->xml; $param = Array ($info); $response = $client->__call ("Sfexpressservice", $param); return $response->return; } /** * Stitching out the requested XML */ Public Function Createxml () { $xml = ' Invoice_no . ' "/> '; $this->xml = $xml; } |
Tips:
1. $this the BSP request address assigned by->serviceurl, note the address of the WSDL
2. $this->user, $this->password is the ID and check code assigned by Shun Fung
3. The returned return is an XML string, which you may need to simplexml_load_string to parse.
http://www.bkjia.com/PHPjc/898890.html www.bkjia.com true http://www.bkjia.com/PHPjc/898890.html techarticle Shun Fung BSP Order number query Interface SOAP Request example in some interfaces are sometimes used in the design of a SOAP method, such as the interface of Shun Fung BSP. I'm trying different ways of post way request ...