
Originally Posted by
Twey
It shouldn't be.No, but it does look like an attempt at XML written by an idiot
How do you access it? Can you provide the code you used to generate the request?
Here's the php file:
PHP Code:
<?php
/*
* $Id: wsdlclient3b.php,v 1.1 2004/06/15 15:38:29 snichol Exp $
*
* WSDL client sample.
*
* Service: WSDL
* Payload: rpc/encoded (params as an XML string; cf. wsdlclient3.php)
* Transport: http
* Authentication: none
*/
require_once('../lib/nusoap.php');
$proxyhost = isset($_POST['proxyhost']) ? $_POST['proxyhost'] : '';
$proxyport = isset($_POST['proxyport']) ? $_POST['proxyport'] : '';
$proxyusername = isset($_POST['proxyusername']) ? $_POST['proxyusername'] : '';
$proxypassword = isset($_POST['proxypassword']) ? $_POST['proxypassword'] : '';
$client = new soapclient('http://Kunaki.com/XMLService.ASP', false,
$proxyhost, $proxyport, $proxyusername, $proxypassword);
$err = $client->getError();
if ($err) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
$params = file_get_contents("http://musicstore.jasonkosi.com/xml_temp_4.xml");
$result = $client->call('ShippingOptions', $params, $namespace, 'ShippingOptions');
// Check for a fault
if ($client->fault) {
echo '<h2>Fault</h2><pre>';
print_r($result);
echo '</pre>';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '<h2>Error</h2><pre>' . $err . '</pre>';
} else {
// Display the result
echo '<h2>Result</h2><pre>';
print_r($result);
echo '</pre>';
}
}
echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
?>
And here's the xml inlclude:
Code:
<Country>United States</Country>
<state_Province>NY</state_Province>
<PostalCode>10004</PostalCode>
<Product>
<ProductId>XZZ1111111</ProductId>
<Quantity>2</Quantity>
</Product>
<Product>
<ProductId>PXZZ111112</ProductId>
<Quantity>3</Quantity>
</Product>
The request is sent with the nusoap library and looks like this:
Code:
POST /XMLService.ASP HTTP/1.0
Host: Kunaki.com
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: "ShippingOptions"
Content-Length: 707
<?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><ShippingOptions><Country>United States</Country>
<state_Province>NY</state_Province>
<PostalCode>10004</PostalCode>
<Product>
<ProductId>XZZ1111111</ProductId>
<Quantity>2</Quantity>
</Product>
<Product>
<ProductId>PXZZ111112</ProductId>
<Quantity>3</Quantity>
</Product></ShippingOptions></SOAP-ENV:Body></SOAP-ENV:Envelope>
and the response looks like this:
Code:
HTTP/1.1 200 OK
Connection: close
Date: Fri, 06 Apr 2007 20:51:59 GMT
Server: Microsoft-IIS/6.0
Content-Length: 109
Content-Type: text/xml
Expires: Fri, 06 Apr 2007 04:11:59 GMT
Set-Cookie: ASPSESSIONIDCQRDQRCS=KOIHNPDDPNHDGNHIEEDEIMGH; path=/
Cache-control: private
<HTML>
<BODY>
<Response><ErrorCode>200</ErrorCode><ErrorText>Not a valid request</ErrorText></Response>
Bookmarks