Skip to Content
avatar image
Former Member

Webservice hell - invalid content type for SOAP: TEXT/HTML

Hi All

I'm trying to call a webservice in XI and getting the dreaded "invalid content type for SOAP: TEXT/HTML" error.

Running it in XMLSpy it works perfectly well, but not in XI.

Here are some screenshots:

1) The Request sent from XMLSpy

[XMLSpy Request - Successful|http://www.host-images.com/u/files/3spjf72drc9ncjhtiovo.jpg]

2) The successful response to XMLSpy

[XMLSpy response|http://www.host-images.com/u/files/c3u8k9bplpzu8z6il61a.jpg]

3) Here is the error in XI in RWB, together with the XML payload

[XML and RWB error|http://www.host-images.com/u/files/9ex5dhqua9y07lhpja09.jpg]

4) Here is the SOAP Comms Channel

[Comms channel|http://www.host-images.com/u/files/w6pa90yy0nkly628535i.jpg]

Note:

1. The 'Target URL' and the 'SOAP Action' are taken directly from the parameters used successfully in XMLSpy

2. I have already added 'localejbs/AF_Modules/MessageTransformBean' / 'Transform.ContentType' / text/xml;charset=utf-8

I woul really appreciate some help with this, as I'm getting kind of desparate.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jul 20, 2011 at 11:12 PM

    Hello,

    Your target webservice is clearly using SOAP 1.2 as specified by this request namespace:

    xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"

    But standard SOAP Receiver only natively supports SOAP 1.1

    For more information between the differences between the two, see this link:

    http://www.herongyang.com/Web-Services/Perl-SOAP-1-2-Request-Differences-SOAP-1-1-and-1-2.html

    You can use the SOAP Axis Receiver Adapter or you can try modifying the SOAP Request by:

    1.) Creating the SOAP Envelope according to SOAP 1.2 specs via Java Mapping (check Do Not Use SOAP Envelope)

    2.) Change the content type to application/soap+xml;action="yourSOAPAction"

    Let us know if this worked for you (worked for me).

    Hope this helps,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Andy,

      happpy to hear from you.

      From First reply itself i was telling you to check your pi servers firewall and port enablement

      Why you were getting that error Message?

      Because due to firewall issue PI was getting some HTTP response in HTML and SOAP adapter was unable to parse those HTML response.

  • Jul 20, 2011 at 05:03 PM

    chk this

    /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 20, 2011 at 08:03 PM

    Hi Andy,

    Can you please give the screenshot for:

    I have already added 'localejbs/AF_Modules/MessageTransformBean' / 'Transform.ContentType' / text/xml;charset=utf-8

    Regards,

    ---Satish

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 20, 2011 at 08:52 PM

    Is this a sync call, if so, are you sure this isn't some response coming back in html format.

    Add comment
    10|10000 characters needed characters exceeded