Request example of sf bsp interface SOAP

Source: Internet
Author: User
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.

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.