cancel
Showing results for 
Search instead for 
Did you mean: 

Error: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request

Former Member
0 Kudos

Hi Gurus,

i am hardly fighting with this error in Communication Channel Monitoring:


Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request

SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request 

This is my scenario.

I do a File to SOAP Scenario. in SXI_MONITOR everything is fine.

My CommChan is a SOAP Receiver

HTTP

SOAP 1.1

Central Adapter Engine

Target URL is https --> i check url for correctness

Configure User Authentication is checked and username and pw are given and are correct.

Configure Certificate Authentication is checked are working

Configure Proxy is checked and Host and port are povided.

SOAP Action is provided

In Tab Module

if have this Processing Sequence


1	localejbs/AF_Modules/MessageTransformBean	Local Enterprise Bean	transform
2	sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean	Local Enterprise Bean	1

and this Module configuration (and only this)

 
transform	Transform.ContentType	text/xml;charset=utf-8

(according to /people/sobhithalaxmi.kata/blog/2009/07/21/cost-free-edi-integration-using-message-transformation-bean)

As far as i understand that my http header should have Content-Type: text/xml;charset=utf-8 now. I don't understand why Communication Channel Monitoring shows an error according to content TEXT/HTML.

Can anyone help me with that?

Is it possible that Transform.ContentType does not work for SOAP Receiver Adapter?

is there any chance to view the HTTP-Header of the outgoing SOAP Request (with PI Transaction / Java Enironment) to convince myself that the HTTP Header is text/xml?

Thank you in advance and Best Regards

Udo

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Thanks for your fast replies.

The Provider of the Endpoint tells me that he needs text/xml as content-type. When I sent a message to the given Endpoint via SOAP UI I can see in the HTTP LOG of SOAP UI that the Endpoint is also sending text/xml back.

Below you find the Details log out of the CommChan Monitoring.


2011-04-29 11:37:45 Information The message status was set to TBDL. 
2011-04-29 11:37:45 Information Retrying to deliver message to the application. Retry: 3 
2011-04-29 11:37:45 Information The message was successfully retrieved from the receive queue. 
2011-04-29 11:37:45 Information The message status was set to DLNG. 
2011-04-29 11:37:45 Information Delivering to channel: getxxxxx_In  <---- name of my SOAP Receiver CommChan
2011-04-29 11:37:45 Information Transform: using Transform.Class:  $identity 
2011-04-29 11:37:45 Information Transform: transforming the payload ... 
2011-04-29 11:37:45 Information Transform: successfully transformed 
2011-04-29 11:37:45 Information SOAP: request message entering the adapter with user J2EE_GUEST 
2011-04-29 11:37:46 Error SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request 

2011-04-29 11:37:46 Information SOAP: sending a delivery error ack ... 
2011-04-29 11:37:46 Information SOAP: sent a delivery error ack 

2011-04-29 11:37:46 Error SOAP: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request 

2011-04-29 11:37:46 Error Adapter Framework caught exception: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request 

2011-04-29 11:37:46 Error Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request. 

2011-04-29 11:37:46 Error The message status was set to NDLV. 

What i am missing is a hint on the Message Transform Bean and a on a successfull sending process.

What i also tried already:

i also activated the checkbox "Do not use SOAP Envelop" in CommChan Configuration. The Result you see below (the last log entry is on first line - so read from bottom to top)


Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request 

error in response 

call completed 

request entering 

Message processing started 

As you can see there is a "call completed" and "error in response" log entry. This is missing in in the first Log. So i guess the error is still in the sending process.

Installing additional Software on the PI and use them to find out what the HTTP Request is is not possible as system access is very strict and limited 😕

Former Member
0 Kudos

have you tried to send your request to the http gateway (e.g. installed on your local machine) and see exactly what are you sending ?

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

As far as i understand that my http header should have Content-Type: text/xml;charset=utf-8 now.

The value of your content type should depend on what is expected by the receiving system. In your case, I think you just assumed that it is text/xml.

is there any chance to view the HTTP-Header of the outgoing SOAP Request (with PI Transaction / Java Enironment) to convince myself that the HTTP Header is text/xml?

Yes, you can use a third-party application such as fiddler2 to view the HTTP header and you can correct the content-type expected in your comm channel.

Hope this helps,

Mark

Former Member
0 Kudos

Hello Udo,

Transform.ContentType work fine in SOAP Receiver Adapter (parameter value "text/xml; charset=utf-8" (module configuration seem to be good)

Is possible that the error 400 is caused by a bad response from webservice you're calling or are you sure that is an error in request step?