cancel
Showing results for 
Search instead for 
Did you mean: 

Query on a scenario from SAP to Web service

Former Member
0 Kudos

HI ,


I have a scenario in my project from SAP to Web service. Currently an IDoc is being trigerred from SAP. The Web service has three services: Add_Id, Get_Id and Inactive_Id. There are two operations to be performed. One Add_Id and the other Inactive_Id.

Based on 4 fields of IDoc either Add_Id or Inactive_Id will be trigerred. If it is Add_id it is fine as it is asynchronous.

But if it Inactive_id, first Get_Id will be called and it is synchronous. This is because for one unique Id at SAP has different unique Id at Web service. A request message Get_Request_id  will go from SAP to Web service to fetch id from Web service and get a response back as a Get_Response_Id message. Then the Id received in response will be added to Inactive_Id and send asynchronously to Webservice.

Can anyone please suggest how to develop this scenario.If I use BPM , how to proceed with the condition check and triggering of the messages Add_Id(asynchronous) . Get_Id(synchronous0 and Inactive_Id(asynchronous).

Please suggest.

Regards,
Suman

View Entire Topic
markangelo_dihiansan
Active Contributor
0 Kudos

Hi Suman,

I'm assuming that the Id is already in the idoc right? If yes, this can be achieved without BPM. You just need one inbound service interface with two operations: Add_Id and Inactive_Id

1st part: Add_Id

- Normal idoc to webservice scenario (async -> async)

2nd part: Inactive_Id

- Normal idoc to webservice scenario (async -> async) except in this case you would need to do a lookup (could be soap lookup) in the message mapping to retrieve the Id from the webservice

Use enhanced interface determination in ESR by using multi-mapping for the two target messages (0..1)

ID:

Only one receiver determination is needed

Only one interface determination is needed

Two receiver agreements

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

Yes Id is in the IDoc.

2nd part: Inactive_Id:

Should I go for soap lookup as instruction is to use Get_Id service or can I call this in soap look up?

I am working in PI 7.0 version. Could you please brief about soap look up, it will be helpful for me.

Regards,

Suman

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Suman,

SOAP lookup uses a SOAP receiver CC to make a lookup to a webservice, here is a blog about it

Inside the blog, there is also another reference

Since the ID is already there, you can directly call the Get_Id service from the receiver system.

Regards,

Mark

Former Member
0 Kudos

Hi,

I coded the UDF and I am getting the below error. Could anyone please suggest me?

Compilation of XXXX successful 

  •   Errorcom.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel CC_SOAP_RCV_XYZ (Party: , Service: BS_ABC, Object ID: 3d8f669fa9b83362940a54056e6c1ab4) XI AF API call failed. Module exception: 'SOAP Error'. Cause Exception: 'SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Internal Error'.
    com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel CC_SOAP_RCV_XYZ (Party: , Service: BS_ABC, Object ID: 3d8f669fa9b83362940a54056e6c1ab4) XI AF API call failed. Module exception: 'SOAP Error'. Cause Exception: 'SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Internal Error'.
    at com.sap.aii.ibrun.server.lookup.AdapterProxyLocal.process(AdapterProxyLocal.java:96)
    at com.sap.aii.ibrun.server.lookup.SystemAccessorInternal.call(SystemAccessorInternal.java:47)
    at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:141)
    at com.sap.aii.ibrun.server.lookup.SystemAccessorHmiServer.process(SystemAccessorHmiServer.java:74)
    at com.sap.aii.utilxi.hmis.server.HmisServiceImpl.invokeMethod(HmisServiceImpl.java:169)
    at com.sap.aii.utilxi.hmis.server.HmisServer.process(HmisServer.java:178)
    at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:297)
    at com.sap.aii.utilxi.hmis.web.HmisServletImpl.processRequestByHmiServer(HmisServletImpl.java:212)
    at com.sap.aii.utilxi.hmis.web.workers.HmisInternalClient.doWork(HmisInternalClient.java:70)
    at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doWork(HmisServletImpl.java:507)
    at com.sap.aii.utilxi.hmis.web.HmisServletImpl.doPost(HmisServletImpl.java:655)
    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:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    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:104)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
iaki_vila
Active Contributor
0 Kudos

Hi Suman,

The error seems to be in the response. Check the request in communication channel monitoring and try later the same request with SOAPui, with this you can check if the request is right and if you are getting an error. May be, you are getting a error page response and this raises the exception that you are seeing.

Regards.