NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
ELement Created twice when making call


Joined: 21 Aug 2007
Posts: 11
Reply with quote
Dear All,

Consider the following:

<?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>
<SubscriptionSignUp xmlns="http://localhost/">
<ISPID>yy</ISPID>
<ISPPassword>xx</ISPPassword>
<ISPUserID>XX0fgfgg3</ISPUserID>
<CancellationCode>0</CancellationCode>
<ClientReference> </ClientReference>
<SiteName> </SiteName>
</SubscriptionSignUp>
</soap:Body>
</soap:Envelope>

I am constructing the call as follows:

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

$nameSpace = ".......";




$err = $client->getError();
if ($err) {

echo '<p><b>Constructor error: ' . $err . '</b></p>';

}



$Request = array(
'SubscriptionStatus'=>array(
'ISPID' => 'lighthouse',
'ISPPassword' => 'lighthouse',
'ISPUserID'=>'Angelo1')
);

$result = $client->call('SubscriptionStatus', $Request);


This all looks good but when the request is made, I do the following:

echo '<br><br><h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';


and get:

<?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:ns6908="http://tempuri_org">
<SOAP-ENV:Body>
<SubscriptionStatus xmlns="...">
<SubscriptionStatus xmlns="..."/>
</SubscriptionStatus>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Is there any reason why the <SubscriptionStatus xmlns="..."> is present
twice? And also why does once have a / at the end and the other not? I
think the first one is using the namespace for the xmlns="" and the
second one gets it from the WSDL file.
Is this correct?

Another question, is it the way I am make an instance of the nusoap
client =>

$client=new soapclient($wsdlfile, true); //, true);


Any help would be mostly appreciated.

Thanks in advance.
View user's profileFind all posts by zlogicSend private message
ELement Created twice when making call
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic