Magento web service response content type error

The content type text/xml; charset=utf-8,text/xml; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 297 bytes of the response were: ”.

\app\code\core\Mage\Api\Model\Server\Wsi\Adapter\Soap.php

Change

line 52:

->setHeader(‘Content-Type’,’text/xml; charset=’.$apiConfigCharset)

line 78

->setHeader(‘Content-Type’,’text/xml; charset=’.$apiConfigCharset)

To

->setHeader(‘Content-Type’,’text/xml; charset=’.$apiConfigCharset, true)

Advertisements

3 comments on “Magento web service response content type error

  1. Hi I made the appropriate changes to the soap.php file and now it has a new error:
    The HTML document does not contain Web service discovery information.
    There was an error downloading ‘http://MYDOMAIN/api/v2_soap?wsdl/$metadata’.
    The request failed with the error message:

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xml

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s