Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I would be grateful if anyone can assist me. I need to get a response from a web service that has a soap request as described below among others:

HTML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:quic="http://services.thedomain.com/theservice/">
   <soapenv:Header/>
   <soapenv:Body>
      <quic:GetBillers>
         <!--Optional:-->
         <quic:xmlParams><![CDATA[<SearchCriteria>
<TerminalId>4pbl0001</TerminalId>
</SearchCriteria>]]></quic:xmlParams>
      </quic:GetBillers>
   </soapenv:Body>
</soapenv:Envelope>


I used the code below for another action (which does not need any request fields) of the same web service, and I got the correct response:
PHP
 $client = new SoapClient($wsdl,array('trace' => $trace, 'exceptions' => $exceptions));
   $response = $client->GetBillerCategories();
var_dump($response);


However the problem I have is that for the GetBillers request shown at the top, I used the same code (with the addition of arguments) as I did for the successful GetBillerCategories, but could not get an appropriate response. The modified code is shown below:

PHP
$xml_array['TerminalId'] = '4pbl0001';
$xml_array['CategoryId'] = 4;
$client = new SoapClient($wsdl,array('trace' => $trace, 'exceptions' => $exceptions));
$response = $client->GetBillers($xml_array);
var_dump($response);


The response I got was:
PHP
object(stdClass)#36 (1) { ["GetBillersResult"]=> string(144) "100018464014" }


instead of a long string of names, Ids, products and other details of the billers of CategoryId 4.
What do I need to do to get the full GetBillers response?
Your assistance would be highly appreciated.
Posted
Updated 6-May-14 16:31pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900