The request example of the sf bsp interface SOAP sometimes uses SOAP requests in some interface design, such as the sf bsp interface. I tried different methods of POST requests, either completely failing to request anything or receiving garbled characters, all ended in failure. The core code of the SOAP request for the SF interface is as follows: *** send a soap request ** p
The request example of the sf bsp interface SOAP sometimes uses SOAP requests in some interface design, such as the sf bsp interface. I tried different methods of POST requests, either completely failing to request anything or receiving garbled characters, all ended in failure. The core code of the SOAP request for the SF interface is as follows:/*** send a soap request */p
Request example of sf bsp interface SOAP
Some interfaces sometimes use SOAP requests, such as the interfaces of sf bsp.
I tried different methods of POST requests, either completely failing to request anything or receiving garbled characters, all ended in failure.
The core code of the SOAP request for the SF interface is as follows:
/**
* Send a soap request
*/
Private 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;
}
/**
* Concatenate the requested xml
*/
Public function createXml ()
{
$ Xml ='
'. $ This-> user.', '. $ this-> passWord .'
Invoice_no. '"/>
';
$ This-> xml = $ xml;
}
Tip:
1. $ this-> serviceUrl: the BSP request address allocated by SF. What are your notes? Wsdl address
2. $ this-> user, $ this-> passWord is the ID and verification code assigned by SF.
3. The returned return value is an XML String. You may need simplexml_load_string for parsing.
Original article address: Request example of sf bsp interface SOAP. Thank you for sharing it with me.