cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice routing

Former Member
0 Kudos

Hi Gurus,

The scenario is Webservice call from 3rd party (consumer)->PI-> Webservice provider.

On the receiver side PI is consuming the webservice to perform address search and on the sender side the werbservice is defined such that it is consumed by the 3rd party application to send request to PI.

I used sender SOAP adapter and receiver SOAP adapter in this scenario. The 3rd party application now sends the request for address search to PI and PI then routes the message to to the address lookup webservice A. If the response returned 0 messages then the request should be routed to another address loookup webservice B.

Is this possible using BPMs???If so can you please provide some blogs on this???

Thanks,

Jay

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rajasekhar,

Thanks for the solution.

Solution1.

Once PI performs the address lookup using webservice A and if we get response containing zero messages how can I route the request again to webservice B.I have to take the compare the payload data field in the response message with value '0' . How can I check this condition in teh receiver determination. Can you please suggest some options here.

Solution 2.

"You no need to use any async scync bridge concept because SOAP adapter supports sync calls"

Can you please confirm if I should not use async sync bridge in this scenrio or should I use.

Thanks,

Jay.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You can use still soap sender and soap reciever.  In the request mapping do the soap UDF where you make webservice lookup call and get the response. if the response value is 0 then call teh webservice 2 lookup. So basically in the udf itself you make two calls for lookup. Then pass the webservice lookup value to the target webservice. The pros of this design is avoiding bpm. Since you do only lookup and not complicated structure, you can still go with this.  But sometime it is little bit tricky for the debugging.  But lookup purpose it is okay.

You dont need async sync bridge for this requirement.  You can avoid doing it. 

rajasekhar_reddy14
Active Contributor
0 Kudos

Baskar already provided inputs just apply in your case.

Former Member
0 Kudos

Hi Baskar,

Thanks for the reply.

I defined the sender interface and receiver interface which is external definition.

How can I define SOAP UDF to make the webservice lookup call.can you please explain.

How can I validate response payload value if this is 0 or not . Is it possible to define the condition in Interface determination.

I did not configure this scenario earlier. can you please explain what needs to defined in the SOAP UDF.

Thanks,

Jay.

Former Member
0 Kudos

Hi Bhaskar,

It is not only for lookup..

On the sending application if I enter the postcode this should be directed to webservice prvider A via PI. If this is successfull I need to get the address details including Street name, Flat no,easting,northing values and city as response.

If this is not successful and response returned 0 messages then the request should be routed to webservice B .

The structure is bit complex ...do you think I have to go for BPMs or build the interface without using BPMs.

Thanks,

Jay.

Former Member
0 Kudos

Hi,

Chk this SOAP lookup UDF:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/11/20/webservice-calls-from-a-user-defi...

as suggested above, depending upon the reponse of WS-A call the WS-B.

In case u want to go with BPM (personally i would have opted for BPM), then chk this:

receive -> syncSend(WS-A) ->switch (parse reponse from WS-A)--->

1st branch (If address exist) -> Send(to target web service)

Else branch -> SyncSend (WS-B) -> Send (to target web service)

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

Thanks for the reply. I have chosen BPM to do this scenario.

I have defined

1) Synchronous outbound interface-O for sending application to send the webservice request

2) Synchronous inbound interface-A for defining the structure for webservice A

3) Synchronous inbound interface-B for defining the structure for webservice B

I need some clarification in the process design.

1) First is receive step . Is this receive step synchronous or aynchronous one.Do I need to define astract asynchnous interface based on the outbound request message type

2) Transformation step . I need to transform the outbound message type to the inbound message type of webservice A. Do I need to create the abstarct synchrnous interface to do this mapping

3) Sync Send.

In this step it is asking for synchrnous interface- is this abstarct synchrnous interface i need to define based on the webservice A

what is the request message type and response message type to be specified. Do I have to define teh conatiner elements to define this request and response message type.

4) switch step After teh 3rd step I get the response from WS-A

in the first branch if the addres exist how can I define the send step within that block

If I try to insert the send step in the branch1 it is creating another branch with send step additionally. Also is this asyncronous send step to send the response to the sending application(webservice consumer)

5) in the second branch how can I define teh sync send(ws-B)

When I tried to insert teh SyncSend in  the otherwise branch it is creating a new branch additional to the existing branches. How can I achieve the 5 th step

6) create the send step

Is this asynchrouns send step to send the response to the sending application(webservice consumer)

Please can you clarify the above as I'm creating teh Integration procee in IR.

Thanks,

Jay.

Former Member
0 Kudos

Hi,

Check below BPM design. I am just giving u a very basic idea, plz fine tune it as per ur req.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

Thanks for the design.

I defined teh Intergration process. Is this design called sync-async brige.

I created the configuration scenario as follows.

1) Receiver Determination(RD)

Sending application BS -> BPM

Outbound syn interface ->Abstract Interface mapping

2) BPM -> web service provider

Abstarct sync request interface -> inbound sync request interface of webservice provider

now do I need to create the another receiver determination to send the abstract response message to the sending application

Please let me know if any additional RDs shuld be added to this scenario

Thanks,

Jay

Former Member
0 Kudos

Is this design called sync-async brige.

Hi Amit,

I have routed to just only one webservice A and if response retruned contains 0 messages teh message will be cancelled.

This is for testing one webservice. If this works i will change the design.

Could you please confirm if any additional RDs have to be added to teh existing config

1) Receiver Determination(RD)

Sending application BS -> BPM

Outbound syn interface ->Abstract Interface mapping in teh ID

2) BPM -> web service provider

Abstarct sync request interface -> inbound sync request interface of webservice provider in the ID

now do I need to create the another receiver determination to send the abstract response message to the sending application

Please let me know if any additional RDs should be added to this scenario

Thanks,

Jay

Former Member
0 Kudos

Hi,

Your config seems to be fine...Please test ur scenario.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

Thanks for the repply.

I have tested my scenario by sending SOAP request message using SOAP UI.

The BPM processed the steps below

1)Synchrnous rceeive- rceieving abstrcat synchrnous interface - no errors

2)Transformation - transform abstract asyn request message to abstract async request compatible with WS- A format -- no errors

3) Synchrnous send - send synchrnous WS-A request - no errors I got response from the webservice and response is set to BPM

4) Tranformation

mapped abstract async response from BPM to abstract response message of sending application

5) Synchrnous send step -- error while sending response to synchrnous request

Issue

The 4 th step above gives abstract asynchrnous response  .This is not getting mapped to response message of sending application.

Can you please provide solution to rectify this error

Please check the attached screen shots.

Thanks,

Jay

Former Member
0 Kudos

Hi,

BTW what's ther error u r getting under moni??

Make sure that the target message in the Transformation step (under Switch's 1st branch) and the message in the last send step (which closes the sync.asyn bridge) are same??

I guess u r making mistake over there only...

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

The target message in teh transformation step is same as the message in last send step.

I'm not sure why there is an error while sending response to synchronous request.

Any help appreciated.

Please check the attached screenshots.

Is there anything wrong with the transformation step.

Thanks,

Jay.

Former Member
0 Kudos

what's the error u r getting in moni??

Former Member
0 Kudos

Amit,

The issue lies in the transformation step.

In the formation step I mapped teh Abstract Aynchronus WS-A response to the Abstract asynchrnous response message.

when i click on this message in MONI.. I get the error.

Attribute processing mode has unexpected value ; A was expected.

do you think i have to map the abstarct synchronus WS-A response to abstract synchronous response of sending application

as of now I maping abstract asynchrnous WS-A response to abstract asynchronous response of sending application.

screen shot below.

Former Member
0 Kudos

Error in monifor the message

Former Member
0 Kudos

Hi,

What u have done in transf, step is correct...i hope u have use BE QOS in sender sopa adapter??

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

I used the QOS as "Best Effort" in sender SOAP adapter. Do u want me to change this to "Exactly once"??

Thanks,

Jay.

Former Member
0 Kudos

Amit,

The following error message is thrown in moni

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="XIServerhttp://schemas.xmlsoap.org/soap/envelope/"><SAP:Category>XIServer</SAP:Category><SAP:Code ar...

Parsing Error
Attribute ProcessingMode has the unexpected value ; A was expected
</SAP:Stack><SAP:Retry>N</SAP:Retry></SAP:Error>

Thanks,

Jay.

Former Member
0 Kudos

Hi Jay,

Let me first tell you that i have configured ur scenario in my landscape and it is perfectly working fine and by looking ur screenshots it seems that u have also done the correct IP configs.

Now, about ur error i have searched SDN and there are quite a few threads which talks abt the same error, some of them are below which says abt some patch error and all:

http://scn.sap.com/thread/3170370

http://scn.sap.com/thread/741294

http://scn.sap.com/message/4656678#4656678

Let's hope experts can pitch into this thread and tell u the exact reason of this error.

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

Thanks for the links.

I checked the Integration process in SXI_CACHE and the return code is 0.

I checked the IP in Integration Repository and it did not throw any throws.

The following information is given.

Container element ResponseAddress in step Transformation2 is initialised but is not used.

I used the Response Address in the transformation step2 but I did not understand why it says it has been initialised but not used.

Please check the attached screenshot.

Former Member
0 Kudos

Hi Jay,

This a warning so u can ignore it. I have exactly the same configs and it is working fine it's hard to understand why it is failing in ur case while sending the response message to sender soap system. I would suggest search for some SAP notes and if that doesnt help raise OSS.

BTW which version of PI u r working on?? Chk note: 1311138

Thaks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

I raised OSS notes with SAP and I'm using PI 7.0 EHP2

Thanks for your help

Jay.

Former Member
0 Kudos

Hi,

>>I raised OSS notes with SAP

Did you find out the reason of above error??

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

SAP team asked me to apply the  below notes.

#1702837 'XI mapping: ProcessingMode not set for split mapping'

#1703163 'XI mapping: ProcessingMode split mapping is not set II'

I asked BASIS team to install the relevant SP.

Thanks,

Jay.

Former Member
0 Kudos

Hi Amit,

After implementing this note the BPM is working fine. The issue got resolved and the response is successfully sent back to the sending application.

So I have implemented sync-async bridge successfully.

Thanks for your help Amit

Regards,

Jay.

Former Member
0 Kudos

Hi,

Good to know that ur issue is resolved.

Thanks

Amit Srivastava

Former Member
0 Kudos

Thanks Amit.

former_member184681
Active Contributor
0 Kudos

Hi Jay,

This Wiki gives you and overview and useful links that will give you a jump start to BPM:

http://wiki.sdn.sap.com/wiki/display/XI/Integration+Process+%28ccBPM%29+in+XI

Regards,

Greg

Former Member
0 Kudos

Hi Gregor,

Thanks for the reply. Can you please explain in detail how this can be achieved using BPM and what steps are involved in this BPM process. The process flow will be 3rd party app pr consumer->BPM and BPM->web service provider

Thanks,

Jay.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Jay,

Your requirement very much possible.

Solution1:

Perform SOAP lookup and get response based on that you can decide to call web service B or not.

This approach avoids using BPM.

Solution 2:

Send---->transformation------>condition check(Web service response check)------->send1/send 2.

You no need to use any async scync bridge concept because SOAP adapter supports sync calls.

Regards,

Raj

Former Member
0 Kudos

Hi Raja sekhar,

Could you please explain in detail how the solution 1 is possible without using BPM.

Thanks,

Jay.

Former Member
0 Kudos

Hi Bhaskar,

Teh solution agreed is to use BPM

I defined

1)synchronous outbound interface to send the address request

2)abstract synchronous interface

3) Inbound synchrnous interface which is external definition of WSDL pointing to the webservice provider.

I defined the BPM .

First step is receive --- I specified the mode as Opens S/A Bridge and synchnornous interface as abstract synchrouns interface.

Are these steps correct

Receive->transformation -> condition check  -> send1/send2

I'm not clear on these points.

1) in the first step the message will be received by BPM. Is this step synchronous receive or asynchrnous receive.

2)First I have to route the message to one of teh webservices and then I have to check teh condition. How can I achieve this .. Do I have to create synchronous send step first and then condition check step...

3) In the condition check step do I have to define the condition if teh response from webservice A contains 0 messages it should be routed to another webservice.How can I define this condition.

Note- the inbound synchronous interface for webservice A and webservice B are different.

Overall I would like to define the below steps.

Receieve->transformation->send(webservice A)->condition check->(webservice B) send

Please let me know if anything needs to be modified in this process to meet the requirement.

Thanks,

Jay.

Former Member
0 Kudos

Hi Bhaskar,

Teh solution agreed is to use BPM

I defined

1)synchronous outbound interface to send the address request

2)abstract synchronous interface

3) Inbound synchrnous interface which is external definition of WSDL pointing to the webservice provider.

I defined the BPM .

First step is receive --- I specified the mode as Opens S/A Bridge and synchnornous interface as abstract synchrouns interface.

Are these steps correct

Receive->transformation -> condition check  -> send1/send2

I'm not clear on these points.

1) in the first step the message will be received by BPM. Is this step synchronous receive or asynchrnous receive.

2)First I have to route the message to one of teh webservices and then I have to check teh condition. How can I achieve this .. Do I have to create synchronous send step first and then condition check step...

3) In the condition check step do I have to define the condition if teh response from webservice A contains 0 messages it should be routed to another webservice.How can I define this condition.

Note- the inbound synchronous interface for webservice A and webservice B are different.

Overall I would like to define the below steps.

Receieve->transformation->send(webservice A)->condition check->(webservice B) send

Please let me know if anything needs to be modified in this process to meet the requirement.

Thanks,

Jay.