cancel
Showing results for 
Search instead for 
Did you mean: 

Soap error 'Bad envelope tag' in response

Former Member
0 Kudos

Hi All,

We are integrating SAP sytem with Lotus notes using PI. I am using SOAP adapter for webservices hosted by LN team. it is a RFC -> PI -> SOAP synchronous . When a request is sent from SAP it is hitting the webservice but we are getting the response as below (this is the message from moni)

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>

- <soapenv:Fault>

<faultcode>soapenv:Server.generalException</faultcode>

<faultstring>org.xml.sax.SAXException: Bad envelope tag: CHANGED_UNITRequest</faultstring>

<detail />

</soapenv:Fault>

</soapenv:Body>

</soapenv:Envelope>

The soap reciever channel is showing success in Adapter engine...

Please let me know what needs to be done

Note: 1) I am getting proper response when tried in SOAP UI.

          2) In SOAP receiver channel i have checked the 'Do not use SOAP envelope'

Thanks,

sagarika

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi Sagarika,

SOAP UI is calling web services with a soap envelope. So i presume the service requires it. Do not check on "Do not use SOAP envelope" and check again. If you can access with SOAP UI you the same shoud be able with PI.

/Udo

Former Member
0 Kudos

Hi Udo Martens,

Thanks for the response.

If i try with out checking 'Do not use SOAP envelope' and got this below error.

<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: No such operation</SAP:AdditionalText>

-sagarika

udo_martens
Active Contributor
0 Kudos

Hi Sagarika,

the receiver system does not understand the request. Please compare the url which you put in the soap adapter with the url in soap UI (easy).

And compare the xml message (after mapping) which you sent to the adapter with the xml message inside the envelope of your soap UI message (can be difficult).

There must be a difference in one them.

/Udo

Former Member
0 Kudos

Hi Udo Martens,

The url is same. xml messgae (after mapping ) can be found in moni , but where to find the xml message inside the soap envelope in soap UI ?

-sagarika

udo_martens
Active Contributor
0 Kudos

Hi Sagarika,

the xml part inside the soap envelope. So, if copy the xml message but not the xml elements, which are starting with prefix "soap". The message wont be "well formed" because the xml namespace definitions (xmlns...) will be inside the root tag and that is a soap-element. You need to copy the xml definitions from soap into the xml message root tag. If you post the soap message somebody might do it for you.

If you temporary delete the operation mapping link from interface determination you would be able to test that xml message from Runtime Workbench. That should give you a success. If so, you know that's just a question of xml structure and nothing else.

/Udo

Former Member
0 Kudos

Hi Udo Martens,

My soap req in soapUI is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:DefaultNamespace">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:INPT>

         <WEIGHT>2</WEIGHT>

         <FROM_UNIT>grams</FROM_UNIT>

         <TO_UNIT>milligrams</TO_UNIT>

      </urn:INPT>

   </soapenv:Body>

</soapenv:Envelope>

As per your suggestion i have deleted the interface mapping and tried from RWB with the payload

<?xml version="1.0" encoding="UTF-8"?><INPT xmlns:INPT="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions"><WEIGHT>2</WEIGHT><FROM_UNIT>GRAMS</FROM_UNIT><TO_UNIT>MILLIGRAMS</TO_UNIT></INPT>

But am getting the same error, bad envelope

Is my xml conversion of the soap envelope is wrong?

Is the envelope to be customised at the request end or response end ? ( as the soap fault message is coming for the response message)

Moni screenshot :

-sagarika

udo_martens
Active Contributor
0 Kudos

Hi Sagarika,


it should look like:


<urn:INPT xmlns:urn="urn:DefaultNamespace">

<WEIGHT>2</WEIGHT>

<FROM_UNIT>grams</FROM_UNIT>

<TO_UNIT>milligrams</TO_UNIT>

</urn:INPT>

/Udo

Former Member
0 Kudos

Hi Udo Martens,

Thank you.. its working with your payload  with no interface mapping.

The reciever guys changed the structure and we are given a new wsdl file , with the new wsdl its workingfine. ( no need of customisation now )

- sagarika

Former Member
0 Kudos

Hi Sagarika,

What did the receiver guys change in the WSDL structure?

I am getting a similar error right now.

-Mae

Former Member
0 Kudos

Hi Mae,

we were integrating with Lotus notes at that time. They have added a node to the fields and it got resolved

-sagarika

Answers (2)

Answers (2)

Former Member
0 Kudos

Please, check if the receiver service require a Soap 1.2 protocol, instead of the Soap 1.1, and check if you are sending the message with the right element tags.

Usually, it works on SoapUI because it support Soap1.2 and WS-Addressing, which is not native on SAP PI (you have to fully customize your Soap Message and checking the "Do not use...." flag on receiver channel).

Former Member
0 Kudos

Hi Simone,

Thanks for the response . The reciever service is fine with SOAP 1.1 protocol. i have checked with the team and we are able to get the requests from Lotus notes with the same protocol , but the issue is we are not able to send the requests to the system

For customising the request , i am not able to figure out what should be the soap messga structure that is expected by the system.

-sagarika

Former Member
0 Kudos

Try to figure out if the receiver service require WS-Addressing parameters.

Former Member
0 Kudos

Hi Simone,

Thanks for the response. The issue is with the wsdl provided...Its working fine now..

- Sagarika

Former Member
0 Kudos

Great! As I was supposing something related to the message structure required by the service

anupam_ghosh2
Active Contributor
0 Kudos

Hi Sagarika,

                           If you are using "do not use SOAP envelop" then you need java/xslt mapping to produce exactly correct SOAP envelop as expected by web service. The SOAP message format to be  sent can be obtained using SOAP UI tool. Secondly while connecting to webservice and using "do not use SOAP envelop" you need to convert   "application/xml" to "text/xml" using "MessageTransformBean" adapter module. Check this connectivity to sfdc using SOAP adapter in this document http://scn.sap.com/docs/DOC-3823.  Please kindly, if possible rate the article if you find it useful.

Regards

Anupam 

Former Member
0 Kudos

Hi Anupam,

Thanks for the response.

If i test the wsdl in soapUI the response is as below

If i am not checking the  "do not use SOAP envelop" i am getting the below error

<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: No such operation</SAP:AdditionalText>

Please let me know do i need to check "do not use SOAP envelop" ? How come we get to know that we need to custom soap envelope in any scenario

-sagarika

anupam_ghosh2
Active Contributor
0 Kudos

Hi Sagarika,

                                 I have always ticked on the option "do not use soap envelop" when I used SOAP receiver adapter. You can see from the SOAP UI the exact message format expected by the web service. As  told by Udo Martens you need to compare the message format sent by PI and that being sent by SOAP UI. Using java or xslt mapping you need to create the same message format as that of SOAP UI. Test this again. In case you see there is a change in error message then apply "messagetransformbean" adapter module as I have already mentioned in my earlier post. I feel this should resolve the errors.

Regards

Anupam