cancel
Showing results for 
Search instead for 
Did you mean: 

Removing and adding SOAP Envelope

Former Member
0 Kudos

Hi All,

I am working on SOAP-XI-Proxy scenario.

As the request message triggered by the Sender System is wrapped

by an SOAP Envelope with notation '<soapenv:Envelope ' insted of normal notation

'<SOAP:Envelope ', the Adapter rejected the message and we didn't have an entry

for the message in Message Monitoring.

So I used the option 'Do not Use SOAP Envelope' and added the suffix 'nosoap = true'

in the Targer URL.

Then after XI accepted the message and I can see the entry in XI.Not surprisingly,

the entire SOAP message is visible in the payload as follows.

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

- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

- <soapenv:Body>

- <Complaint_Request xmlns="urn:com.****l.*.*.****">

<CaseNo>12345</CaseNo>

<CustomerNo>12345</CustomerNo>

</Complaint_Request>

</soapenv:Body>

</soapenv:Envelope>

What I understand,the challenge is to remove the un necessary tags in request mapping,

and add the SOAP:Envelope Tag in the response mapping.But I dont have a clue .

Also what should be my Data Type and Interface Structure (Sender and Receiver) ?

Regards,

Subhendu

Edited by: Subhendu Sahu on Apr 27, 2009 11:24 AM

Accepted Solutions (0)

Answers (5)

Answers (5)

stefan_grube
Active Contributor
0 Kudos

> As the request message triggered by the Sender System is wrapped

> by an SOAP Envelope with notation '<soapenv:Envelope ' insted of normal notation

> '<SOAP:Envelope ', the Adapter rejected the message and we didn't have an entry

> for the message in Message Monitoring.

That should not matter, as the name of the namespace prefix is not fix.

Could you tell me, what error message do you get? Or what entry do you have in host:port/mdt/channelmonitorservlet ?

Former Member
0 Kudos

Hi Stefan,

Actually we did nt have an entry in XI. The client system got the error message as folowed.

<?xml version="1.0" encoding="utf-8" ?>

- <!-- 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

at com.sap.aii.messaging.mo.Message.reparseRootDocument(Message.java:1014)

at com.sap.aii.messaging.net.MIMEInputSource.readSOAPPart(MIMEInputSource.java:619)

at com.sap.aii.messaging.net.MIMEInputSource.decodePart(MIMEInputSource.java:611)

at com.sap.aii.messaging.net.MIMEInputSource.readBody(MIMEInputSource.java:379)

at com.sap.aii.messaging.net.MIMEServletInputSource.parse(MIMEServletInputSource.java:58)

at com.sap.aii.af.mp.soap.web.MessageServlet.doPost(MessageServlet.java:378)

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

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

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

]]>

</text>

</s:SystemError>

</detail>

</SOAP:Fault>

</SOAP:Body>

</SOAP:Envelope>

When I got this error message, I checked the servlet, and it was working fine. I tested in many times and got the same error message.

After I used the Option, 'Dont use Soap Envelope', I got the message entered into XI.

I am using the ADress as http://********/XISOAPAdapter/MessageServlet?channel=:iCaseWork:Create_CRM_Tkt&nosoap=true

Please advise.

Regards,

Subhendu

Edited by: Subhendu Sahu on Apr 28, 2009 10:40 AM

former_member732072
Active Participant
0 Kudos

Hi Subhendu,

Please have a look at the following link and check if it helps.

http://www.w3.org/TR/soap12-part0/

Best Regards.

jyothi_anagani
Active Contributor
0 Kudos

Hi,

Check This Link.

Thanks.

madanmohan_agrawal
Contributor
0 Kudos

>>So I used the option 'Do not Use SOAP Envelope' and added the suffix 'nosoap = true'

>>in the Targer URL.

Choose only the option "Do not Use SOAP Envelope" and no suffix. Then process the message. I think it will work.

Regards,

Madan Agrawal

Former Member
0 Kudos

Hi,

It is a must to use the notation nosoap= true in the target URL.

Regds

Former Member
0 Kudos

Hi,

please check whether SOAP adapter modules can help here:

http://help.sap.com/saphelp_nw04/helpdata/en/45/a4a36de28552f7e10000000a1553f7/frameset.htm

Additionally - maybe an XSLT is an option here. You could extract the content of the SOAP delivered message using XSLT.

Regards,

Kai

Former Member
0 Kudos

Sorry - my fault - you cannot use modules in sender SOAP adapter :o(

Former Member
0 Kudos

Hi Kai,

Any idea,how my Interface Structure should be ( Sender and Receiver) ?

I could nt find any clear documentation and so far no suggestion that could resolve my query

Regds

Former Member
0 Kudos

If this is the structure you receive:

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

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<Complaint_Request xmlns="urn:com.****l.*.*.****">

<CaseNo>12345</CaseNo>

<CustomerNo>12345</CustomerNo>

</Complaint_Request>

</soapenv:Body>

</soapenv:Envelope>

then your structure should relect it. In this way it will be processed to you mapping, where you can use XSLT to extract this part:

<Complaint_Request xmlns="urn:com.****l.*.*.****">

<CaseNo>12345</CaseNo>

<CustomerNo>12345</CustomerNo>

</Complaint_Request>

and use it in you further processing.

Former Member
0 Kudos

example for a SOAP Schema:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http:///envelope/" SOAP-ENV:encodingStyle= "http:///encoding/">

<SOAP-ENV:Body>

<m:GetLastTradePrice xmlns:m="Some-URI">

<symbol>DIS</symbol>

</m:GetLastTradePrice>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Former Member
0 Kudos

Hi Kai,

Should my Sender Interface also bear the following extra elements.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

and

<soapenv:Body>

But these two tags are coming above <Complaint_Request xmlns="urn:com.****l.*.*.****"> ., which represents the root of the payload.

regds

Former Member
0 Kudos

Yes! The XSD must reflect these tags to ensure a propper validation of the incoming message. In the XSAL step you can then get rid of the elements which are not needed!

Kai

Former Member
0 Kudos

Can you suggest, how at the level of Message Type Designing , I will achieve this, as those two tags are coming above the root nodes !!!

pls correct me , if I am wrong.

Former Member
0 Kudos

You need to do a "re-design" of the message types! They need to reflect the hole SOAP message (as the example shows above) or use the XSLT step as 1st step in you mapping to make sure the XSLT transformation produces a XML messages that matches your current message design.

Edited by: Kai Lerch-Baier on Apr 27, 2009 3:51 PM

Former Member
0 Kudos

Thanks Kai. It looks like I am on track . I ll try to use Java mapping to remove the tags, as I dont have knowledge on XSLT .

Appreciate your help , and I ll get back once I am through

Regds

Former Member
0 Kudos

Yeah - that's away too. It's not bound to XSLT - JAVA can also do this for you ;o)

Good luck! Think you can handle it!

Kai

Former Member
0 Kudos

Hi Kai,

One doubt. I will redesign my message type( the existing one). But my client needs to use the same old WSDL.

If I give the WSDL with the new structure, the same problem will persist. Please correct me, if I m wrong.

Regds.