NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Question about formatting


Joined: 18 May 2006
Posts: 1
Reply with quote
I am trying to format my client to send requests that are cleaner than the default nusoap is providing.

default nusoap output sent to server...
<SOAP-ENV:Body>
<ns2319:GetCampaigns xmlns:ns2319="http://server.com">
<APIFlags xsi:type="xsd:int">0</APIFlags>
<AccountId xsi:type="xsd:int">1</AccountId>
</ns2319:GetCampaigns>
</SOAP-ENV:Body>

Formatting asked for by server...
<soap:Body>
<GetCampaigns xmlns="http://server.com">
<APIFlags>0</APIFlags>
<AccountId>1</AccountId>
</GetCampaigns>
</soap:Body>

There are a lot of differences. the soap:Body vs. SOAP-ENV:Body
the nanosecond prepending to the elements (ns2319:GetCampaigns ) and the namespace (xmlns:ns2319="http://server.com"). Not to mention that the client is declareing the type for the variables.

Isthere a way to format the request in a cleaner style more like the example. I have been having issues getting the server to read the variables I'm sending.

I have tried changing the $use variable from encoded to literal but it has no effect.

Help.
-Chris
View user's profileFind all posts by legoistSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I see no problem with soap request formed by nusoap library. If your server does not support it, you need a better soap-compliant server.
Indeed, these values as SOAP-ENV:, ns2319: and there should be no problem even if I call them for example bogus_evil_namespace:
It is an alias and its name should never matter. What matters is the namespace itself which is specified in xmlns attribute.
In the soap call performed with call() method, check all the arguments passed. In particular, it's where you may specify the namespace to be used.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Question about formatting
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