cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with invalid content type for SOAP: TEXT/PLAIN

Former Member
0 Kudos

Hi,

I send a PO to our partner. I use the soap adapter and http (later https). Our partner receives the message properly and he automatically sends back an acknowledgement and the XI throws an exception like this:

<b> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- answer

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code area="MESSAGE">GENERAL</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error></b>

Our partner has no influence on the content type so we have to change something to process the acknowledgement. There are several other threads where this problem has been discussed and I tried out some of the answers but I have not yet found a sufficient solution.

Can anybody help?

Regards Oliver.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Hi Oliver,

Is the SOAP call sync or async?

When it is sync you can do nothing besides using the SOAP adapter in no-soap mode. In this case you have to create the SOAP envelope for the request by your own, for example with an XSLT mapping.

Is the call async, you add to the URL of the SOAP adapter the parameter $nosoap=true. In this case the SOAP adapter accepts any content type, but you have to deal with the SOAP envelope in mapping.

As the content type text/xml is part of the SOAP specification, the SOAP adapter rejects any other content type.

Regards

Stefan

Former Member
0 Kudos

Hi,

it's an async call.

I added the module <b>localejbs/AF_Modules/MessageTransformBean</b> before the standard module. As type I chose <b>Local Enterprise Bean</b> and as key <b>Transform.ContentType</b>.

In the configuration I typed again <b>Transform.ContentType</b> and as parameter text/xml (I also tried text/plain).

I tried several times but it's still the same error. Maybe I made some mistakes so please check the data I posted above if there is everything ok.

I also tried <b>nosoap=true</b> but it still has no effect.

Regards.

Oliver.

stefan_grube
Active Contributor
0 Kudos

Hi Oliver,

The sender SOAP adapter has to be configued with parameter 'do not use SOAP envelope' and in the URL of the adapter you have add &nosoap=true

See also note 856597.

Is the ack-message really a SOAP message? When the content-type is text/plain, it might not even be an XML. Have you considered to use the plain HTTP adapter instead?

Regards

Stefan

Answers (2)

Answers (2)

Former Member
0 Kudos

We now use the http-plain adapter.

former_member187437
Contributor
0 Kudos

HI

i too face similar problem. Can you please tell me how you rectified the error.

prabhu_s2
Active Contributor
0 Kudos

check if the following helps u:

try using a bean like pointed out in

[url=https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c73884a3789]https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c73884a3789[/url]