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:
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:
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.
<GetXhtml xmlns="http://tempuri_org/">
<url>string</url>
</GetXhtml> |
vs.
<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:
$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?!