NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
namespace confusion


Joined: 23 Oct 2008
Posts: 2
Reply with quote
Hi,

I'm new to nusoap, but have a simple problem. I have been given a sample SOAP request which I need to get nusoap to create. The request that I need to make is this:

Code:
POST /TestContentServer/ContentServer.asmx HTTP/1.1
Host: mywebserver
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri_org/GetXhtml"

<?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>
    <GetXhtml xmlns="http://tempuri_org/">
      <url>string</url>
    </GetXhtml>
  </soap:Body>
</soap:Envelope>


So far, the closest I can get is this:

Code:
POST /TestContentServer/ContentServer.asmx HTTP/1.0
Host: mywebserver
User-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: "http://tempuri_org/GetXhtml"
Content-Length: 502

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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/">
  <SOAP-ENV:Body>
    <ns4466:GetXhtml xmlns:ns4466="http://tempuri_org">
      <url xsi:type="xsd:string">any</url>
    </ns4466:GetXhtml>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


The key difference is that my GetXhtml node has a namespace of ns4466, and the url node does not.
Code:
    <GetXhtml xmlns="http://tempuri_org/">
      <url>string</url>
    </GetXhtml>

vs.
Code:
    <ns4466:GetXhtml xmlns:ns4466="http://tempuri_org">
      <url xsi:type="xsd:string">any</url>
    </ns4466:GetXhtml>


Ideally, I would make the namespace declaration on the GetXhtml node default (remove the ns4466), or I believe it would also work if I can ad the url node to the same namsepace (ns4466:url).

The php code is:

Code:
$client = new nusoap_client("http://mywebserver/TestContentServer/ContentServer.asmx");
$result = $client->call('GetXhtml', array('url' => 'any'), 'http://tempuri_org', 'http://tempuri_org/GetXhtml');


Can anybody help me? Please?!
View user's profileFind all posts by maniacalSend private message


Joined: 23 Oct 2008
Posts: 2
Reply with quote
Another thought, is that it would be perfectly accetable for me to create the request xml manually. I know exactly what it should look like, but I've no idea how 'execute' it or how I should get it 'into' nusoap.

Please help me!
View user's profileFind all posts by maniacalSend private message
namespace confusion
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