cancel
Showing results for 
Search instead for 
Did you mean: 

Persistence: Reprocessing Synchronous messages in error

che_eky
Active Contributor
0 Kudos

Hi,

OSS Note 872388 - "Troubleshooting Archiving and Deletion in PI" states that synchronous messages in error are persisted and can be reprocessed:


Per default only asynchronous messages (EO and EOIO) will be persisted on the ABAP and Java side. Synchronous messages (Best Effort) will only be persisted if an error occurs during processing or if the parameter LOGGING_SYNC (ABAP only) is set. Setting LOGGING_SYNC is not recommended to reduce processing overhead.

It is not clear if the above applies to the synchronous request or response message? or both?

My question is:

1) if a synchronous SOAP request comes into PI and the mapping fails, will the request message persist so the XML can be edited and restarted?

2) what happens to the response message? surely the pipe has been lost and the response will have no significance?

Your input appreciated.

Che

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Che,


1) if a synchronous SOAP request comes into PI and the mapping fails, will the request message persist so the XML can be edited and restarted?

Synchronous messages cant be reprocessed because the sender cant wait eternally.


2) what happens to the response message? surely the pipe has been lost and the response will have no significance?

Self explanatory with the later answer.

Regards.

Answers (2)

Answers (2)

che_eky
Active Contributor
0 Kudos

Fast and comprehensive answers from both Amit and Iñaki. Amit do you mind if I reward Iñaki as his original reply came in just before yours.

Che

Former Member
0 Kudos

Hello Che,

Wahhaaaa.....Np at all....

Thanks

Amit Srivastava

che_eky
Active Contributor
0 Kudos

One more question. As the request message is in error the SOAP receiver adapter will not return an application level response to the third party. So I guess after a period of time the third party will timeout waiting for a response. Or does the receiver adapter send a system level fault (like the HTTP 200) when it detects a mapping or other error?

Thanks

Che

Former Member
0 Kudos

Hello,

No sender system will not get timeout in fact it will receive system error from PI.

So suppose, while sending message from PI, target system is down then sync request will be failed in PI and sender system will get below kind of technical error message (u can check it using SOAP UI -> import WSDL file and trigger sync sop request):

<code>ADAPTER.JAVA_EXCEPTION</code>

<text>com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.ConnectException: Connection refused

at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:702)

at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:470)

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

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

at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)

at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)

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

  at


Thanks

Amit Srivastava

che_eky
Active Contributor
0 Kudos

Hi Amit,

The example you give is slightly different. Say 3rd party sends sync SOAP request to PI

Former Member
0 Kudos

Hello,

That's what i have explained, let me give u one another example (which u have asked) suppose 3rd party send sync soap request to PI and due to invalid data that request gets failed in PI (mapping failure), so in that case Sender 3rd party system will get below kind of system error message, instead of getting timeout.

You can also check these system error messages which will be returned by PI in case of different situations (like mapping failure/connection issues) using SOAP UI

     <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.aii.af.service.mapping.MappingException: Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_Test; Details: com.sap.aii.mappingtool.tf7.MessageMappingException; Runtime exception when processing target-field mapping /ns1:MT_PreFacture/Record/ZZ_KMREAL; root message: Exception:[com.sap.aii.mappingtool.tf7.FunctionException: Cannot cast '?' to decimal number] in class com.sap.aii.mappingtool.flib7.Arithm method add[?, ?, com.sap.aii.mappingtool.tf7.rt.Context@3fd2faca]

    at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:747)

    at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:521)

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

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

    at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:202)

    at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:103)

    at com.sap.engine.services.servlets_jsp.server.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:126)

    at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:79)

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

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

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

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

    at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)

    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)

    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)

    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)

    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)

    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)

    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)

    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)

    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)

    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)

    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)

    at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)

    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)

    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)

    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)</text>

        </s:SystemError>

Thanks

Amit Srivastava

che_eky
Active Contributor
0 Kudos

Hi Amit,

From my understanding PI will return a system response (HTTP 200) immediately on receiving the SOAP request. This may then be followed by a system response for failure if the request could not be delivered to the end point. In case of mapping error then no system level response will be returned. I thought mapping exceptions do not automatically generate a system level error response? or do they? HTTP 500 Error?

3rd party SOAP request -> PI -> ECC

Che

Former Member
0 Kudos

Hello,

>>It is not clear if the above applies to the synchronous request or response message? or both?

1) if a synchronous SOAP request comes into PI and the mapping fails, will the request message persist so the XML can be edited and restarted?

>>Yes, request message will persist in PI but u cannot edit/restart that failed sync request message - that's how sync call works. The sender system has to reinitiate the call.

2) what happens to the response message? surely the pipe has been lost and the response will have no significance?

>>Yes, since request has been failed so no response message will come into PI

Thanks

Amit Srivastava

che_eky
Active Contributor
0 Kudos

Hi Amit,

So only asynchronous messages may be edited and restarted. What is the point of persisting the synchronous message? is it only for short term logging?

Thanks

Che

Former Member
0 Kudos

Hello,

>>What is the point of persisting the synchronous message? is it only for short term logging?

Failed sync messages are persisted so that u can monitor them and identify the root cause of the error.

>>So only asynchronous messages may be edited and restarted.

Yes

Thanks

Amit Srivastava