cancel
Showing results for 
Search instead for 
Did you mean: 

Async Scenario: Proxy -> PI -> Soap fails with OK_BUT_NO_XI_MESSAGE

former_member286225
Participant
0 Kudos

Hello Experts,

We have an asynchronous scenario from ECC (using proxy) to a Web Service (using soap).

The soap adapter is showing that the message was processed successfully but in SXMB_MONI we get the following error:

     HTTP Status Code 200 Received But Error During Response Parsing: No XI Response Received XML element      {http://schemas.xmlsoap.org/soap/envelope/}Envelope missing in SOAP message header (SAP XI Extension)


In RWB, the Audit Log is:

...

Information Delivering to channel: SOAP_Receiver_CustomerStatusUpdate

Information SOAP: request message entering the adapter with user J2EE_GUEST

Information SOAP: completed the processing

Information SOAP: sending a delivery ack ...

Information SOAP: sent a delivery ack

Information The message was successfully delivered to the application using connection SOAP_http://sap.com/xi/XI/System.

Information The message status was set to DLVD.


Please advise.


Regards.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member286225
Participant
0 Kudos

Hi All,

I created a new asynchronous web service (which was deployed on our PIQ system).

I tested it and received the same error as the original web service.

This results to a conclusion that the problem is not with the original web service exposed by IIS, rather something to do with our PID system.

Any suggestions will be appreciated.

Regards.

former_member286225
Participant
0 Kudos

Additional testing I perfomed:

SOAP -> PI -> SOAP to the original web service and I did not receive any errors in SXMB_MONI.

It seems that the problem is somehow related to the fact that I am using PROXY -> PI.

Any suggestions?

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Effi,

The only thing I can think of now is that the proxy adds a namespace in the root message. Can you copy the output from sxi_monitor and then paste in SOAP UI?

Regards,

Mark

former_member286225
Participant
0 Kudos

Hi Mark,

As mentioned, I performed a new test to the same destination web service where the sender is SOAP.

So, Test 1: PROXY -> PI -> SOAP (fails), Test 2: SOAP -> PI -> SOAP (succeeds)

I went through the trace files of both:

For test 1, the status code returned is 202 while for test 2 the status code is 200.

Both consuming the same web service

For test 1,

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

<Trace level="3" type="T">HTTP-client: request sent</Trace>
<Trace level="3" type="T">HTTP-client: Receiving http-response...</Trace>
<Trace level="1" type="T">HTTP-client: response received</Trace>
<Trace level="3" type="T">HTTP-client: checking status code...</Trace>
<Trace level="1" type="T">HTTP-client: status code = 202</Trace>
<Trace level="1" type="T">Deserializing message object...</Trace>
<Trace level="1" type="T">Empty response received!</Trace>
<Trace level="1" type="T">HTTP-client: parsing failed, status code = 202</Trace>
<Trace level="3" type="System_Error">HTTP Status Code 200 Received But Error During Response Parsing: No XI Response Received</Trace>

For test 2,

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

<Trace level="3" type="T">HTTP-client: sending http-request...</Trace>
<Trace level="1" type="T">HTTP-client: request sent</Trace>
<Trace level="3" type="T">HTTP-client: request sent</Trace>
<Trace level="3" type="T">HTTP-client: Receiving http-response...</Trace>
<Trace level="1" type="T">HTTP-client: response received</Trace>
<Trace level="3" type="T">HTTP-client: checking status code...</Trace>
<Trace level="1" type="T">HTTP-client: status code = 200</Trace>
<Trace level="1" type="T">Deserializing message object...</Trace>
<Trace level="1" type="T">HTTP-client: parsed & response message object created</Trace>
<Trace level="3" type="T">HTTP-client: closing...</Trace>


former_member286225
Participant
0 Kudos

Also,

There is a difference between the XML of the failed message and the successful message:

The SOAP:Header & SOAP:Body of the failed message do not contain any namespaces.

The SOAP:Header & SOAP:Body of the successful message contain namespaces.

jyothi_anagani
Active Contributor
0 Kudos

Hi Effie,

Looks like there might not be any issue from Webservice. Sometimes It might be issue from Proxy side. We usually see this error in Asynchronous Proxy scenario's. Please check your proxy connections and Integration Engine Configuration in SXMB_ADM. Check the url and Role of Busines System .

Thanks

Jyothi A

former_member286225
Participant
0 Kudos

Hi Jyothi,

Thanks for your reply.

Proxy connection is okay as the message is sent successfully to PI.

The ECC system is configured as an application system.

Regards.

Former Member
0 Kudos

Hi,

Looks like Web Service you are using is synchronous one...Check the WS functionality by testing the same using SOAP UI tool ...you may need to tweak your scenario if there is a  response received still and want to handle at PI level....

HTH

Rajesh

former_member286225
Participant
0 Kudos

Hi Rajesh,


Thanks for your response.

The web service defined as an Asynchronous service.

I used the WSDL to generate a client in NWDS, invoked it and did not receive a response.

In the past, I used an Async scenario to invoke a web service with no issue and the requirement is an async scenario and not sync.

Regards.

Former Member
0 Kudos

Hi

Did you checked the below thread ?

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

HTH

Rajesh

former_member286225
Participant
0 Kudos

Hi,

I went through this thread.

The message we are sending is very small (few fields).

I receive a feedback from the web service owner that he receives the data and it is correct.

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,

Are you requesting an acknowledgement in your proxy call? You can check this in sxi_monitor under reliable messaging. Should say something like sysAck = true.

Regards,

Mark

former_member286225
Participant
0 Kudos

Hi Mark,

I am not sure I understand your suggestion.

I look at the message in SXI_MONITOR (in PI). Under the Call Adapter -> SOAP Header nodes, there is an entry: Reliable Messaging and when I click on it, I see the following:

<!--  Call Adapter   -->

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

<SAP:QualityOfService>ExactlyOnce</SAP:QualityOfService>

</SAP:ReliableMessaging>

If this is not what you mean, can you please give me more details as to your suggestion?

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Effi,

It looks like you are not requesting an ack at all. I was thinking of this thread

but it does not apply to your case. Can you test your scenario in SOAP UI? Is the webservice returning an HTTP 200 with an empty HTTP Body?

Regards,

Mark

former_member286225
Participant
0 Kudos

Hi Mark,

I tested the web service using soap-ui.

As far as I can say, there is no response (I am attaching the test).

Perhaps I am missing something?

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Effi,

Can you click the raw tab for the request/response and paste the output here?

Regards,

Mark

former_member286225
Participant
0 Kudos

Hi Mark,

Left window:

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

POST http://pocketlink/SapSync/CustomerStatusUpdateService.asmx HTTP/1.1

Accept-Encoding: gzip,deflate

Content-Type: text/xml;charset=UTF-8

SOAPAction: "http://Askisfa.com/CustomerStatusUpdate"

Content-Length: 823

Host: pocketlink

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ask="http://Askisfa.com/">

   <soapenv:Header/>

   <soapenv:Body>

      <ask:CustomerStatusUpdate>

         <!--Optional:-->

         <ask:Status>

            <!--Optional:-->

            <ask:CustomerNumber>0000960960</ask:CustomerNumber>

            <!--Optional:-->

            <ask:SalesOrg>1000</ask:SalesOrg>

            <!--Optional:-->

            <!--ask:DistChannel>?</ask:DistChannel-->

            <!--Optional:-->

            <!--ask:Division>?</ask:Division-->

            <!--Optional:-->

            <ask:StatusOld>50</ask:StatusOld>

            <!--Optional:-->

            <ask:StatusNew>60</ask:StatusNew>

         </ask:Status>

      </ask:CustomerStatusUpdate>

   </soapenv:Body>

</soapenv:Envelope>

Right window:

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

HTTP/1.1 202 Accepted

Cache-Control: private

Server: Microsoft-IIS/7.5

X-AspNet-Version: 4.0.30319

X-Powered-By: ASP.NET

Date: Tue, 13 May 2014 09:53:57 GMT

Content-Length: 0

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Effi,

For HTTP 202, I think it is only supported in the sender adapter . For the receiver adapter, it expects an HTTP 200 with an empty soap envelope. See SAP Note 856597 - FAQ PI/XI SOAP Adapter under Section 6. Receiver Asynchronous Calls

"Q: What should my web service return to the adapter for

asynchronous calls?

A: Currently, the receiver adapter expects an HTTP 200 with a SOAP

envelope with an empty content for successful delivery. Any other

response will result in a XI system error and triggers retries of

the message. "

Hope this helps,

Mark

former_member286225
Participant
0 Kudos

Hi Mark,

As I stated in my original post, PI receives an HTTP response with status 200:

HTTP Status Code 200 Received But Error During Response Parsing: No XI Response Received XML element      {http://schemas.xmlsoap.org/soap/envelope/ }Envelope missing in SOAP message header (SAP XI Extension)

What I do not understand is the response part. In RWB, the Message Data for the SOAP receiver explicitly says that the QoS is async:

Status: Successful

Quality of Service: Exactly Once

Regards,

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Effi,

The sap note still holds, a soap envelope with empty content is required.

Regards,

Mark

manigram
Active Participant
0 Kudos

Hi,

If it is Synchronous interface set the Quality of service as Best Effort(BE)



Regards,

Manigandan

former_member286225
Participant
0 Kudos

It is Asynchronous

iaki_vila
Active Contributor
0 Kudos

Hi Effie,

Later to read Mark suggestions i think that you can try to check Do Not use SOAP envelope and to generate the SOAP envelope manually via XSL for example. I have thought this because with that check the adapter wont check the WS 202 response and may be you wont get the exception.

Regards.

former_member286225
Participant
0 Kudos

Hi Mark,

I went through the note you indicated.

It is kind of weird as this is the first time I encounter this kind of problem.

I developed before in other projects asynchronous PROXY -> PI --> SOAP scenarios without any issues.

Additional information that might be useful:

I failed the scenario at the inbound side (the call to the web service) by specifying a wrong server name in the channel URL.

The SOAP receiver comm channel indicated an error but still, in SXI_MONITOR I receive the same error message (HTTP Status Code 200 Received...).

As it turns out, for successful calls to the web service and failed calls, the same error happens in the Integration Engine and the same message is displayed in SXI_MONITOR.

This behavior makes me believe that the problem does not lay with the web service, rather it lays with the Adapter Engine (for SOAP adapter) communicating back with the Integration Engine.

By the way, we are using PI 7.11

Any other suggestions?

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Effi,

I'm also using PI 7.11. Have you tried with the other webservices if they return an HTTP 202 with an empty body? I think for PI, it cannot recognize any other 2xx response aside from 200 since in SOAP UI it is already returning a 202.

Aside from that, it could be worth it to try 's suggestion to run it in no soap mode (via Do Not Use SOAP Envelope). Another try is to use a remote-enabled version of the function module HTTP_POST. I might experiment on it, but I do not see a free webservice that replies a 202 for a successful transaction.

Regards,

Mark

former_member286225
Participant
0 Kudos

Hi Mark,

I tried using a different service which is synchronous and I did not receive any errors.

I tried 2 different asynchronous services (to the same IIS host) and both failed with the same error.

I wanted to try a completely different asynchronous web service but couldn't find one on the WWW (I saw only synchronous ones).

I also tried playing with the parameters of the comm channel using different flags without positive results.

I will probably have to develop a web service, publish it and try to consume it from PI to see if the problem is related to the IIS host or whether it is a generic asynchronous web services problem.

Regards.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Effi,

Yes, synch scenarios are unaffected because they return a response . When you check the Do Not Use SOAP Envelope, you have to build the SOAP envelope via Java/XSLT mapping. You also need to use MessageTransformBean for the content-type change from application/xml to text/xml.

Regards,

Mark

former_member286225
Participant
0 Kudos

Hi Mark,

Going through the procedure of checking the Do Not Use SOAP Envelope sounds like a lot of unnecessary overhead of development which I will do only as a last resort.

As I stated, I have done a lot of asynchronous scenarios to web services before without the above suggestion and experienced no issues whatsoever.

Regards.

iaki_vila
Active Contributor
0 Kudos

Hi Effi,

Are you sure that your service interfaces are defined as async ones?

Regards.

former_member286225
Participant
0 Kudos

Hi,

Thanks for your response.

Re-Checked and both service interfaces (sender & receiver) are defined as Asynchronous.

Regards.