Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NuSOAP: how to change content-type of request?

When consuming a .NET WCF webservice I get the following response (error):

Unsupported HTTP response status 415 Cannot process the message because the content type 'text/xml; charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'.

How do I change the content type? I can't find it in the NuSOAP forums/docs, or I might be overlooking something....

like image 757
jao Avatar asked Dec 07 '22 07:12

jao


1 Answers

i know this is an old post, but i ran in to this page looking for an answer.

application/soap+xml is the content-type passed when using SOAP 1.2, text/xml is used with SOAP 1.1,

something like this should do the trick,

$client = new SoapClient("some.wsdl", array('soap_version' => SOAP_1_1));
like image 172
mark moore Avatar answered Dec 20 '22 16:12

mark moore