nuSoap client SOAP Call problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all

Im using nusoap to create a cleint and I am having a small issue but its a fairly large one because I cant get the correct XML to send.

I have a scenario as follows:

My client:

$wsdlfile="http://xxxxxxxxxxx_WSDL.xml?wsdl";;
$client=new soapclient($wsdlfile, true); //, true);
$client->soap_defencoding = 'utf-8';

$nameSpace = "xxxxxxx";

Tried this:

         $parameters = "<SubscriptionStatus xmlns='http://localhost/'>";
         $parameters .= "<ISPID>xx</ISPID>";
         $parameters .= "<ISPPassword>yy</ISPPassword>";
         $parameters .= "<ISPUserID>Angelo1</ISPUserID>";
         $parameters .= "</SubscriptionStatus>";
$result = $client->call('SubscriptionStatus', $parameters, $nameSpace);

To call the SubscriptionStatus process.


I have also tried:
       /*$Request = array(
               array(
                'ISPID' => 'xx',
                'ISPPassword' => 'yy',
                'ISPUserID'=>'Angelo1')
       );
$result = $client->call('SubscriptionStatus', $Response, $nameSpace);
The request must look like this:

<?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>
 <SubscriptionStatus xmlns="http://localhost/";>
   <ISPID>xx</ISPID>
   <ISPPassword>yy</ISPPassword>
   <ISPUserID>Angelo1</ISPUserID>
 </SubscriptionStatus>
</soap:Body>
</soap:Envelope>


But in fact it looks like this:

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:si="http://soapinterop.org/xsd";
xmlns:tns="http://devbit.openbit.com/SOS/";>
   <SOAP-ENV:Body>
       <SubscriptionStatus xmlns="http://...";>
       <SubscriptionStatus xmlns="http://..";>
           <ISPID>lighthouse</ISPID>
           <ISPPassword>***</ISPPassword>
           <ISPUserID>Angelo1</ISPUserID>
       </SubscriptionStatus>
       </SubscriptionStatus>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

as you can see the

<SubscriptionStatus xmlns="http://...";>

has been repeated. This is causing my problems. I am not sure what is causing it? Does it have something to do with name spaces? OR the way the client object is created?


This is a straight forward call but I have been searching through so many posts and have not had any luck. Please any links or any ideas are most welcome.

Thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux