cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error

Former Member
0 Kudos

Hi all,

I am trying to test an ICO using Soap UI.

The scenario is SOAP - SOAP

I am using SOAP 1.1 protocol with proper authentication data.

The target URL used in Receiver Soap adapter is

http://<host_server>:50000/MessagingSystem/receive/JPR/XI

and in browser, the above URL redirects to:

==============================================================================================

This XML file does not appear to have any style information associated with it. The document tree is shown below.

     

<StatusInfo>

<StatusMessage>MessagingServlet is active.</StatusMessage>

<Version>Messaging System 7.1</Version>

<Usage>

http://[host]:[port]/MessagingSystem/receive/[connection]/[protocol]

</Usage>

<RequestURL>

http://<host_server>:50000/MessagingSystem/receive/JPR/XI

</RequestURL>

<Connection>

<Name>JPR</Name>

<Status>started</Status>

<Listener>registered</Listener>

</Connection>

<Protocol>

<Name>XI</Name>

<Status>EventHandler registered</Status>

</Protocol>

</StatusInfo>

==========================================================

Just for testing, I have used the same structure in Sender and Receiver side.

In SOAP UI,

It is showing this below error:

<detail>

            <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">

               <context>XIAdapter</context>

               <code>ADAPTER.JAVA_EXCEPTION</code>

               <text>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error

============================================================================================

Gone through many blogs related to this issue and tried many things starting with the option "Do Not Use SOAP Envelope" , adding localejbs/AF_Modules/MessageTransformBean

The audit log for the failed message in PI is given below:

=========================================================================================

2013-05-26 19:47:42.904  Success  MP: processing local module localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean
2013-05-26 19:47:43.987SuccessXISOAP: Received an XI message for processing
2013-05-26 19:47:43.987SuccessXI Packaging (Bulk Mode) is not Enabled, Proceeding to the Normal Processing.
2013-05-26 19:47:43.987SuccessSOAP: request message entering the adapter with user Guest
2013-05-26 19:47:44.108ErrorFailed to call the endpoint: HTTP 500 Internal Server Error
2013-05-26 19:47:44.109ErrorSOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error
2013-05-26 19:47:44.122ErrorSOAP: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error
2013-05-26 19:47:44.122ErrorMP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error
2013-05-26 19:47:44.126ErrorException caught by adapter framework: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error
2013-05-26 19:47:44.126ErrorTransmitting the message 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/PLAIN; HTTP 500 Internal Server Error
2013-05-26 19:47:44.166ErrorMessage status set to FAIL
2013-05-26 19:47:44.214ErrorReturning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error
2013-05-26 19:47:44.214ErrorMP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error
2013-05-26 19:47:44.215ErrorSOAP: call failed: com.sap.aii.af.lib.mp.module.ModuleException: senderChannel 1326c2f505563c3783bc47a1f288082e: Catching exception calling messaging system
2013-05-26 19:47:44.215ErrorSOAP: call failed com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/PLAIN; HTTP 500 Internal Server Error

Now I am not having any clue where I am going wrong. Is it anything to do with the Target URL or SOAP receiver module configuration?

Please help me on this.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sourav,

That URL you are calling in the receiver channel is the Java Proxy Runtime. You need to use the XI adapter type instead as Mark has pointed out. The SOAP adapter expects a SOAP response back from the endpoint which is why the audit log is throwing an exception regarding the incorrect content-type. It doesn't appear to be timeout related.

Did you generate a Java proxy and register it with the JPR?

Regards,

Nick

Former Member
0 Kudos

Hi Nick,

I am getting your and Mark's point.

I am following the Blog of William Li.

Page 66 for this document clearly showing the same target URL

http://scn.sap.com/docs/DOC-28803

I tried with XI3.0 also, but it is showing

invalid content type for SOAP: TEXT/HTML; HTTP 401 Unauthorized

One more doubt,

I cannot see isWSProxy parameter for XPI Service: Java Proxy Runtime under services. This parameter needs to be true. Is this error something to do with that?

I am not using any Java proxy in the scenario and the configure proxy option in the receiver soap adapter is also unchecked.

Please suggest me if I am going wrong.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Sourav,

Are you using XI Protocol as the message protocol in your SOAP Receiver CC? If yes, then can you try using it without ICO? And if that does not work, try using XI Adapter in normal configuration instead.

Regards,

Mark

Former Member
0 Kudos

Hi Mark,

I am just using plain Soap 1.1 Protocol as my message protocol. My scenario is to talk to NW BPM. But right now I am just testing whether my ICOs are working fine or not. Until and unless, these scenarios are working fine, I can include the BPM.

I am following William Li's Blog http://scn.sap.com/docs/DOC-28803

Here also, the BPM start is triggered by 1 message pushed from Soap UI. My requirement is exactly like this.

I am working on PI 7.31 single stack.

But all the messages are failing in PI itself.

regards

Sourav

udo_martens
Active Contributor
0 Kudos

Hello Sourav,

first to clarify: The wrong content type is caused by the an error response from the receiving SOAP services in a kind of text or html format. You need to find out why the message was not accepted.

To do so, test the SOAP service (that service which you access in receiver adapter) direct with SOAP UI, where you can look to header fields and read more error details. Assumedly is the path to the service wrong or the service does not understand the request message.

/Udo

Former Member
0 Kudos

Hi Udo,

I tried to call the service directly using this url as endpoint http://localhost:50000/MessagingSystem/receive/JPR/XI

but I got this error:

========================================================

HTTP/1.1 500 Internal Server Error

server: SAP NetWeaver Application Server 7.20 / AS Java 7.31

set-cookie: MYSAPSSO2=AjExMDAgABFwb3J0YWw6c011a2hlcmplZYgAB2RlZmF1bHQBAApTTVVLSEVSSkVFAgADMDAwAwADUE83BAAMMjAxMzA1MjcxMDQ5BQAEAAAACAoAClNNVUtIRVJKRUX%2FAQYwggECBgkqhkiG9w0BBwKggfQwgfECAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGB0TCBzgIBATAiMB0xDDAKBgNVBAMTA1BPNzENMAsGA1UECxMESjJFRQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTMwNTI3MTA0OTQ5WjAjBgkqhkiG9w0BCQQxFgQU60BcQpKVijfy9%2FSTde9ew7v9LyQwCQYHKoZIzjgEAwQwMC4CFQCSKqLvw1wwDC!YtUiNQQRsyNONPQIVAMlyVhPRr6UDmNbJ4FFjU2cay2PR;path=/;domain=.in.ibm.com;HttpOnly

content-type: text/plain;charset=ISO-8859-1

content-encoding: gzip

date: Mon, 27 May 2013 10:49:49 GMT

transfer-encoding: chunked

set-cookie: com.sap.engine.security.authentication.original_application_url=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; path=/MessagingSystem; HttpOnly

set-cookie: JSESSIONID=Y5rbbPP1XcSQYAUKSZGBCHTYvZvlPgHCGBEA_SAP5WNBGM-wt42NG77UnQDlonaj; Version=1; Path=/

set-cookie: JSESSIONMARKID=KvGh3w_d__A7VBfIlUmPBdVG3jurrOka0L-8IYEQA; Version=1; Path=/

java.lang.NullPointerException: while trying to invoke the met

hod java.lang.Object.toString() of an object returned from com.sap.aii.af.sdk.xi.mo.xmb.XMBMessageOperator.getMessageId(com.sap.aii.af.sdk.xi.mo.Message)

          at com.sap.aii.adapter.xi.ms.XIMessage.getMessageId(XIMessage.java:3376)

          at com.sap.aii.adapter.xi.ms.XIMessage.getMessageKey(XIMessage.java:3191)

          at com.sap.aii.adapter.xi.ms.XIEventHandler.onRequest(XIEventHandler.java:790)

          at com.sap.engine.messaging.impl.spi.ServerConnectionImpl.request(ServerConnectionImpl.java:237)

          at com.sap.engine.messaging.impl.core.transport.http.MessagingServlet.doPost(MessagingServlet.java:419)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

======================================================================

I am not getting any clue from this

Please help me on this..

udo_martens
Active Contributor
0 Kudos

Hi,

so, you are using NW BPM? Would be nice if you put such a important info into the opening thread.

You might used the wrong protocoll in the receiver adapter. It should be XI 3.0 protocoll.

/Udo

Former Member
0 Kudos

Hi Udo,

Yes, I am using it for NW BPM scenario. But first of all I need to check those ICOs whether they are working fine or not. So I am using a separate channel with SOAP 1.1 protocol.

Right now I kept my BPM aside and just testing the ICO.

As long as the messages are successful in PI, the BPM cannot start.

The example scenario is like:

From SoapUI, I am pushing a customer number to PI. PI will forward that value to BPM. As now I have not connected to BPM. The flow must end in PI Integration server. So the response will be same like that of the request.

This is where I am facing the issue.

udo_martens
Active Contributor
0 Kudos

Hi Sourav,

From SoapUI, I am pushing a customer number to PI.

Does that work?

PI will forward that value to BPM. As now I have not connected to BPM.

What? How can you expect anything else than an error?

The flow must end in PI Integration server.

A flow never ends in PI. As the name is saying: PI is a INTEGRATION server, just in the middle between a sender and a receiver.

So the response will be same like that of the request.

Only if you force the receiver to send the same message back.

BTW: Your description is quite poor. You are confusing me and as i presume, as well the other users trying to help you.

/Udo

Former Member
0 Kudos

Hi Udo,

Here I may be asking a silly question because I have never worked with SOAP adapter before.

And my question is

in this present scenario

If I need to test the starting ICO (SOAP - SOAP) , for pushing the message, how can I do that?

This is just to test 1 SOAP to SOAP scenario whether it is working fine or not.

SOAP with XI 3.0 protocol cannot be tested using standard tools, e.g. soapUI. Since we want to test all the configurations first in NW PI before we use them in NW BPM, we must also configure standard SOAP communication channels for testing purposes. When we are ready to use them with NW BPM, we can just simply change the Integrated Configuration to use the SOAP communication channel with XI30 protocol

So here I suppose I am going wrong. Need your suggestions

Even in one of your blogs you have mentioned about local testing without BPM

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/10/01/file-record-confirmation-in-a-nw-...

Need you advice on the same how to proceed.

thanks

udo_martens
Active Contributor
0 Kudos

Hi Sourav,

changing the protocol makes ONLY sense for sender adapter, if you want to simulate BPM is sending a message to PI. If no real receiver is in place you dont need to care about any configuration of the receiver channel, it wil fail in each case.

If a PI flow is triggered by a third party soap message (you forgot to explain what you mean with "ICO") then send it from soap UI (or XML Spy or other tools). As mentioned above the message will fail in receiver adapter if the receiver system is not properly connected. But of course you can test mapping and routing rules.

/Udo

Bhargavakrishna
Active Contributor
0 Kudos

Hi Sourav,

This is due to time out issue..

Increase the value of the timeout parameter 'xiadapter.inbound.timeout.default' under Services -> 'XPI Adapter:XI'

to a higher value say '600000'.

Also do the cache refresh, some times it will helpful.

Refer below links for the same

http://scn.sap.com/thread/3152025

http://scn.sap.com/thread/1975404

https://scn.sap.com/thread/233522

http://scn.sap.com/thread/1559146

http://benxbrain.com/en(bD1lbiZjPTAwMQ==)/index.do?onInputProcessing=brai_thread&001_threadid=000005...

Hope it will helpful...

Regards

Bhargava krishna