For php related questions about webservice request, ask the moderator

Source: Internet
Author: User
For php requests for webservice, ask the moderator to ask php about webservice requests. Request address: http:// B2B php soapclass (nusoap-0.7.3) to get the result of SaleResponse, I tried to use normal P php about request webservice problem, ask the moderator for help
Php requests webservice.

Request address: http:// B2B
How to use the PHP soap class (nusoap-0.7.3) to get the result of SaleResponse, I tried to call this request using the normal PHP soap method, but returned an error message. The error message is as follows:

Array (
"Faultcode" => "soap: Client ",
"Faultstring" => "Unexpected wrapper element Sale found. Expected {http://service.web. B2B ."

How can this problem be solved?

------ Solution --------------------
Because you do not know the meaning of the required parameters, this is the only option.
PHP code
$ Url = 'http: // B2B Wsdl '; $ soapClient = new soapclient ($ url);/* read available methods and required data structures */print_r ($ soapClient->__ getFunctions ()); print_r ($ soapClient->__ getTypes (); $ rs = $ soapClient-> Sale (); print_r ($ rs );
------ Solution --------------------
PHP code
ini_set("soap.wsdl_cache_enabled",0);    try{        $client = new SoapClient("",array("exceptions" => 1));                var_dump($client->Sale(array("arg0"=>1,"arg1"=>"123","arg2"=>"456","arg3"=>"789","arg4"=>4,"arg5"=>5,"arg6"=>"111","arg7"=>"222")));    }catch(Exception $ex){        var_dump($ex->faultstring);    }

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: 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.