cancel
Showing results for 
Search instead for 
Did you mean: 

Sender SOAP Adapter, inconsistent behavior

Former Member
0 Kudos

Hi,

We are using XI 3.0 SP17. We have noticed some inconsitent behavior with the sender SOAP adapter:

When sending a valid SOAP message to the adapter, it will reply with:

-


<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header/><SOAP:Body/></SOAP:Envelope>

-


To me this seems errornous, becuase it is missing "<?xml version='1.0'?>" in the beginning, and thus is not valid XML. This leads to errors on the Client that is sending messages to the Sender SOAP adapter.

When sending an errornous SOAP message from the client to the XI Sender SOAP adapter, the error message does include the "<?xml version='1.0'?>" + the corresponding error message, so the behavior seems inconsitent and errournous.

Can someone tell me how the get the Sender SOAP Adapter to include "<?xml version='1.0'?>" in the reply for valid SOAP messages?

Thanks for any help on this subject!

-Hans

PS: Here is an example of an error message from the Sender SOAP adapter, that does include the xml header:

-


<?xml version="1.0"?>

<!-- see the documentation -->

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP:Body>

<SOAP:Fault>

<faultcode>SOAP:Server</faultcode>

<faultstring>Server Error</faultstring>

<detail>

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

<context>XIAdapter</context>

<code>MalformedMessageException</code>

<text><![CDATA[Unexpected content in SOAP:Body; nested exception caused by: com.sap.aii.messaging.util.XMLScanException: Unexpected content in SOAP:Body\tat com.sap.aii.messaging.mo.Message.reparseRootDocument(Message.java:1014)\tat com.sap.aii.messaging.net.MIMEInputSource.readSOAPPart(MIMEInputSource.java:619)\tat com.sap.aii.messaging.net.MIMEInputSource.decodePart(MIMEInputSource.java:611)\tat com.sap.aii.messaging.net.MIMEInputSource.readBody(MIMEInputSource.java:379)\tat com.sap.aii.messaging.net.MIMEServletInputSource.parse(MIMEServletInputSource.java:58)\tat com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:378)\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:760)\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:853)\tat com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)\tat com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)\tat com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)\tat com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)\tat com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)\tat com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)\tat com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)\tat com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)\tat java.security.AccessController.doPrivileged(AccessController.java:180)\tat com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)\tat com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170) ]]></text>

</s:SystemError>

</detail>

</SOAP:Fault>

</SOAP:Body>

</SOAP:Envelope>

-


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hans - we are having the EXACT same problem. Did you ever find a solution? Can anyone help please !!????

Former Member
0 Kudos

Hi,

Sorry, but I have not been able to find any solution to this. I'll make a Note to SAP today.

I don't see any quick fix for this

Best Regards,

Hans

agasthuri_doss
Active Contributor
0 Kudos

Dear Hans,

Can you check once again the SOAP ADAPTER configuration, The XML tags are missing is strange and it is needed for further process.

Regards

Agasthuri Doss

Former Member
0 Kudos

Hi,

I have checked the adapter settings several times, and have not found any setting that would do anything about this problem.

This problem obviously only arises in asynchronous SOAP interfaces.

I use Microsofts "wfetch" tool test the interface. wfetch sends raw http requests, so I can see the unfiltered reply comming from the XI SOAP adapter, and the result is as I prviously mentioned that the <?xml version='1.0'?> header is only sent in error messages, but not for successfully executed messages.

Thanks,

Hans

Former Member
0 Kudos

We have found that checking the box "Do not use SOAP envelope" seems to make the xml tag reapear however - then we get other payload errors!

Former Member
0 Kudos

Hi,

"Do not use SOAP Envelope" is not really an option for us.

From help.sap.com:

-


If the indicator is set, the adapter expects a message without a SOAP envelope.

If you have set the indicator, you must also enter nosoap=true in the URL.

The adapter then puts the whole message in the XI payloads

-


So this also requires heavy changes to the client side. It would almost make more sense to use the plain HTTP adapter in that case..

-Hans

Former Member
0 Kudos

We have tried setting the "Do not use SOAP Envelope" and then trying to Add the module "localejbs/AF_Modules/MessageTransformBean" before the standard module. Add the parameter name Transform.ContentType and value text/xml

But unfortunately we get an error saying it cannot find the module!

Former Member
0 Kudos

I figured out that you can't use modules on the sender adapter - only the receiver adapters! I give up - there really is no solution or explanation as to why the soap adapter is sending the response message with NO XML TAGS! We will put a note in.

Former Member
0 Kudos

Good News Hans! We have figured out a way to solve this problem. No changes are needed in the Sender adapter, all you have to do is modify your URL that is called slightly. There is a setting which allows you to change the encoding of the xml message and in using this setting it seems to explicitly force the XML tags to be created .. for ours I used utf-8 but just add this to the end of your calling url ...

&xmlenc=utf-8

That should do it! Let me know if it works!

Former Member
0 Kudos

Hi,

This is great news, and works beautifully!

Great Stuff!

Thanks,

Hans

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The above mentioned error can encounter...if you are using XML Schemas instead of DT and MT.

if you are using XML Schemas then first validate in the XMLSpy.

if its pops out with any error accordingly you can procced.

amaresh