Create SOAP request IN PHP -


i'm having same soap related problem posted in how create arbitrary soap request using php?

i have used below code.but getting no response.

<?php $client = new soapclient('http://www.example.com/services/recipecouponapi11.asmx?wsdl'); $header = new soapheader(     'http://www.example.com/services/',     'rcauthenticator',     array(         'username' => 'username',         'password' => 'password'     ) );  $client->__setsoapheaders($header);  $response = $client->getcouponall(array('campaigncode' => '')); print_r($response); ?> post /cool/update.asmx http/1.1 host: www.example.com content-type: text/xml; charset=utf-8 content-length: length soapaction: "http://www.example.com/cool/update/productupdate"  <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   <soap:body>     <productupdate xmlns="http://www.example.com/cool/update">       <customernumber>12345</customernumber>       <username>12345</username>       <password>12345</password>       <source>string</source>     </productupdate>   </soap:body> </soap:envelope> 

found solution.i have used wrong function.

$response = $client->productupdate(array('campaigncode' => '')); 

instead of

$response = $client->getcouponall(array('campaigncode' => '')); 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -