Hi, am now getting the following error: System.UriFormatException: Invalid
URI: The URI scheme is not valid.
(details below)
I've also found a WSDL:
http://staging.cnghotels.com/wse/BatchService.asmx?WSDL
<?php
// Pull in the NuSOAP code
require_once("nusoap.php");
// Create the client instance
$wsdl="http://staging.cnghotels.com/wse/BatchService.asmx";
// NOTE: you are not using WSDL here, so do not try to claim you are
$client=new soapclient($wsdl);
// NOTE: for document/literal, there is no automatic wrapper in the XML
// Set parameters
$params="<ProcessXmlDocument
xmlns='http://cngtravel/xmlwebservices/batchservice'>
<affiliateId>??????????</affiliateId><data><Batch version='6.1'
culture='en'>
<Request userid='HOTEL_INFORMATION_01'>
<HotelInformation>
<HotelId>769860</HotelId>
</HotelInformation>
</Request>
</Batch></data></ProcessXmlDocument>";
// NOTE: specify document/literal
$style="document";
$use="literal";
// Set soapaction header
$soapaction="http://cngtravel/xmlwebservices/batchservice/ProcessXmlDocument";
// Set namespace
$namespace="http://cngtravel/xmlwebservices/batchservice/";
// Call the SOAP method
$result = $client->call("ProcessXmlDocument", $params, $namespace,
$soapaction, false, null, $style, $use);
// Display the result or handle the fault
if ($client->fault) {
echo "FAULT: <p>Code: {$client->faultcode}<br />";
echo "String: {$client->faultstring}";
} else {
echo $result;
}
// Display the request and response
echo "<h2>Request</h2>";
echo "" . htmlspecialchars($client->request, ENT_QUOTES) . "";
echo "<h2>Response</h2>";
echo "" . htmlspecialchars($client->response, ENT_QUOTES) . "";
?>
-------------------------------
FAULT:
Code: soap:Server
String: System.Web.Services.Protocols.SoapException: Server was unable to
process request. ---> System.UriFormatException: Invalid URI: The URI scheme
is not valid. at System.Uri.Parse() at System.Uri..ctor(String uriString,
Boolean dontEscape) at System.Uri..ctor(String uriString) at
System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri) at
System.Xml.XmlTextReader..ctor(String url, XmlNameTable nt) at
System.Xml.XmlDocument.Load(String filename) at
CngTravel.WebServices.BatchService.Process(Int32 affiliateId, XmlDocument
data) --- End of inner exception stack trace ---
Request
POST /wse/BatchService.asmx HTTP/1.0 Host: staging.cnghotels.com User-Agent:
NuSOAP/0.6.8 (1.81) Content-Type: text/xml; charset=ISO-8859-1 SOAPAction:
"http://cngtravel/xmlwebservices/batchservice/ProcessXmlDocument"
Content-Length: 753 <?xml version="1.0"
encoding="ISO-8859-1"?><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"><SOAP-ENV:Header>http://cngtravel/xmlwebservices/batchservice</SOAP-ENV:Header><SOAP-ENV:Body><ProcessXmlDocument
xmlns='http://cngtravel/xmlwebservices/batchservice'>
<affiliateId>??????????</affiliateId><data><Batch version='6.1'
culture='en'> <Request userid='HOTEL_INFORMATION_01'> <HotelInformation>
<HotelId>769860</HotelId> </HotelInformation> </Request>
</Batch></data></ProcessXmlDocument></SOAP-ENV:Body></SOAP-ENV:Envelope>
Response
HTTP/1.1 500 Internal Server Error. Connection: close Date: Mon, 20 Dec 2004
15:59:11 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322 Cache-Control: private Content-Type: text/xml;
charset=utf-8 <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was unable
to process request. ---> System.UriFormatException: Invalid URI: The URI
scheme is not valid. at System.Uri.Parse() at System.Uri..ctor(String
uriString, Boolean dontEscape) at System.Uri..ctor(String uriString) at
System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri) at
System.Xml.XmlTextReader..ctor(String url, XmlNameTable nt) at
System.Xml.XmlDocument.Load(String filename) at
CngTravel.WebServices.BatchService.Process(Int32 affiliateId, XmlDocument
data) --- End of inner exception stack trace ---</faultstring> <detail />
</soap:Fault> </soap:Body> </soap:Envelope>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
|