Next, let's take a look at a request example of the sf bsp order number query interface SOAP. This example can help you to use SOAP requests in some interface design, for example, the sf bsp interface. I try different methods of POST requests, either... next, let's take a look at a request example of the sf bsp order number query interface SOAP. This example can help you to use SOAP requests in some interface design, for example, the sf bsp interface.
I tried different methods of POST requests, either completely unable to request anything, or received garbled characters, all ended in failure. the core code for the SOAP request of SF interface is as follows:
/*** Send 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 .'
'; $ This-> xml = $ xml ;}
Tip:
1. $ this-> serviceUrl: the BSP request address allocated by SF. What are your notes? The address of the wsdl.
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.
Tutorial URL:
You are welcome to add your _ favorites to the Favorites folder, but please keep the link for this article.