For php requests for webservice, ask the moderator to ask php about webservice requests. Request address: http:// B2B .ourgame.com/ddservice.asmxuse 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 .ourgame.com/DDService.asmx
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 .lianzhong.com/#sale ."
)
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 .ourgame.com/DDService.asmx? 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("http://b2b.ourgame.com/DDService.asmx",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); }