How to reproduce an XML Request via SOAP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
guarriman
Forum Commoner
Posts: 44
Joined: Thu Nov 03, 2005 4:11 am

How to reproduce an XML Request via SOAP

Post by guarriman »

Hi.

I've got this SOAP request structure I must comply in my petition:

Code: Select all

 
<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>
    <isValidUser xmlns="http://lab.domain.com/">
      <userId>int</userId>
      <lastName>string</lastName>
    </isValidUser>
  </soap:Body>
</soap:Envelope>
 
and I wrote in my PHP code

Code: Select all

 
$params = array('userId' => '5555', 'lastName' => 'Smith');
$response = $client->__soapCall("isValidUser", $params);
 
but I generate this request message:

Code: Select all

 
<SOAP-ENV:Body>
    <ns1:isValidUser/>
        <param1>Smith</param1>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
Which code must I write in PHP to reproduce the XML request I need?

Thank you very much.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: How to reproduce an XML Request via SOAP

Post by Chris Corbyn »

What SOAP API are you using? It worries me that to make a SOAP request you need to directly invoke a method prefixed with two underscores (reserved for PHP internals).

Without know more about the specific tools you're using its not going to be easy for anyone to change your method calls so they work.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: How to reproduce an XML Request via SOAP

Post by RobertGonzalez »

Moved to PHP - Code.
Post Reply