cancel
Showing results for 
Search instead for 
Did you mean: 

invalid content type for SOAP: TEXT/HTML ; AF_Module/MessageTransformBean

Former Member
0 Kudos

Hi,

following scenario in PI 7.11 SP4: Sync RFC-SOAP.

SOAP Adapter is throwing following error from time to time:

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/HTML; HTTP 503 Service Unavailable: java.io.IOException: invalid content type for SOAP: TEXT/HTML;

As suggested in other SDN threads, I wanted to solve it with a module bean in the SOAP receiver adapter:

bean: localejbs/AF_Module/MessageTransformBean

parameter: Transform.ContentType

value: text/xml; charset=utf-8

Now, adapter is throwing following:

com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException:* Path to object does not exist at AF_Module, the whole lookup name is localejbs/AF_Module/MessageTransformBean.*

But I have given the whole look-up name of the module in the adapter.

Is the module not available or s.th. else?

Any hints for solving that issue?

Thanks in advance,

André

Accepted Solutions (1)

Accepted Solutions (1)

henrique_pinto
Active Contributor

Proper name is with "AF_Modules", with an "s".

But I'm not sure that will solve your issue.

Usually that error happens when the web server you're trying to communicate with returns a HTML page instead of a XML file.

Common reasons being web server issue, wrong username/password, wrong input data etc.

Best regards,

Henrique.

Former Member
0 Kudos

Hi Henrique,

have changed it to "AF_Modules", with an "s".

Now, following known error occoured:

com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP:

TEXT/HTML; HTTP 500 Internal Server Error

I will get in contact with the SOAP receiver for clarifing.

Will let you know the result.

Cheers,

André

GabrielSagaya
Active Contributor
0 Kudos

check this thread

henrique_pinto
Active Contributor
0 Kudos

You can check the actual content of the reply by setting SOAP adapter log level to debug and then checking the default trace file.

Other possibility is to use a test tool like XMLSpy.

BR,

Henrique.

prateek
Active Contributor
0 Kudos

Check whether the data is appropriate. You may use TCPGateway to trace your error.

/people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway

If you think Henrique's answer was correct, you must assign point to him as well.

Regards,

Prateek

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

> As suggested in other SDN threads, I wanted to solve it with a module bean in the SOAP receiver adapter:

> bean: localejbs/AF_Module/MessageTransformBean

> parameter: Transform.ContentType

> value: text/xml; charset=utf-8

I read this suggestion often, but it is wrong anyway.

You cannot change the content type in SOAP receiver channel as it is hard coded.

Former Member
0 Kudos

Hi,

solution in my case:

Request message violates against the XSD/WSDL (decimal value in int field).

So no response was sent from receiver SOAP service.

That results in error message: "invalid content type for SOAP: TEXT/HTML".

Thanks to all!

Cheers,

André

Former Member
0 Kudos

Hi Stefan,

I just had a case on PI 7.3. where I used above workaround successfully (setting content-type in module chain). Without the workaround, the receiver system rejected the call, because they only accept text/xml as content-type (and the SOAP receiver seems to use a different value per default). So at least in 7.3 it is not hardcoded anymore.

CSY

GabrielSagaya
Active Contributor
0 Kudos

Henrique answer is correct.

You should use in PI 7.1 as localejbs/AF_Modules/MessageTransformBean as module name

Please refer my blog

/people/gabrielsagayaselvam.panneerselvam/blog/2009/12/07/standard-adapter-framework-modules-afmodules-in-pi-71-150part-2