2

I'm using NuSoap to make a soap request to a web service since Soap is not installed on the web server I use but get the following response:

Response

HTTP/1.1 415 Cannot process the message because the content type 'text/xml; charset=ISO-8859-1' was not the expected type 'multipart/related; type="application/xop+xml"'.
Server: Microsoft-IIS/7.5
MIME-Version: 1.0
X-Powered-By: ASP.NET
Date: Wed, 24 Oct 2012 12:37:06 GMT
Content-Length: 0

How can I set the content type to accommodate the above request?

Here's my code

require_once('lib/nusoap.php');
$client = new soapclient('https://www.propctrl.com/v2/Integration.svc?wsdl',array('soap_version'=>1));
$headers = '
<CredentialsHeader>\n
<Username>username</Username>\n
<Password>password</Password>\n           
</CredentialsHeader>
';

$client->setHeaders($headers);

//var_dump($client);
$err = $client->getError();
if ($err) {
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
}
//$result = $client->call('getCredits',array('roland','r0l@nd'));
$result = $client->call('EchoAuthenticated',array("text"=>"Some text"));

echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';

Any help would be appreciated

4

0 に答える 0