views:

115

answers:

2

Hi, I have a WCF Webservice that returns a bank list from database, when I use IIS server I get the message "Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'.".

And when I use self hosting (application console) to run the WS, works without errors.

PS: I'm calling the WS with PHP Soap.

How is called:

<?php
...
$this->client = new SoapClient({WSDL URL HERE},
    array("connection_timeout" => 60,
    "uri" => {SERVER},
    "encoding" => "ISO-8859-1")); // With UTF-8 I get the same error.

$this->result = $this->client->__soapCall({method}, array('parameters' => {array parameters}));
...
?>

What can be?

A: 

Looks like the WCF service call is returning an error rather than a soap message response. Try using the WCF Test client tool or fiddler to mock up a request and see the response.

MattC
How can I configure PHP Soap to use fiddler? The Client and Server are in same machine.
Cesar
+2  A: 

I found the problem, don't work because in application console I use basicHttpBinding and on IIS application I use wsHttpBinding.

Cesar
And you know how to use wsHttpBinding with php? I need this of security.
Zote
I have not found any simple way to use wsHttpBinding, the solutionsfound so far require that Apache and PHP to be recompiled.
Cesar