cancel
Showing results for 
Search instead for 
Did you mean: 

Use of SOAP Receiver Adapter in a recursive way with dynamic Target URLs

0 Kudos

Hi all,

I have a following scenario.

1. I have to call a webservice with a URL http://myserver.com/default.aspx?action=index

This will return a list of xml filenames as below

<?xml version="1.0" encoding="UTF-8"?>

<filelist>

<file uuid="test1" />

<file uuid="test2" />

<file uuid="test3" />

<file uuid="test4" />

</filelist>

2. Now I have to call the same webservice with a change in action so that the url looks like

URL - http://myserver.com/default.aspx?action=fetch&uuid=

for all the filenames in the list

So in essence, I have to create a dynamic URLs recursively like

http://myserver.com/default.aspx?action=fetch&uuid=test1

http://myserver.com/default.aspx?action=fetch&uuid=test2 and so on

3. And with each call to the URL in step 2, the incoming xml is to be mapped to an IDoc.

I will be creating a ABAP proxy to initiate the calls.

I would like some ideas so as to have a less complex approach to the solution.

Regards,

Neeraj

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

You can actually do this without using BPM but it involves two separate synchronous scenarios.

1. I have to call a webservice with a URL http://myserver.com/default.aspx?action=index

Your scenario is an abap proxy to webservice. You can use a report to trigger your proxy and then get the response.

2. Now I have to call the same webservice with a change in action

Create another proxy, the request message of the second service interface has the same structure as the reponse of step1 and then the response message would be an idoc imported as an external definition. Now, using the response obtained from step 1, recursively call another proxy in your program that will trigger the same webservice and then map the response to the idoc (imported as an external definition).

Hope this helps,

Mark

Former Member
0 Kudos

in the second sync proxy u can also opt to get the reponse with ur own data type and create IDoc within ECC

0 Kudos

Thanks Mark and Arvind for your replies.

However after much consideration I have gone with the bpm approach and looking forward to inputs in that.

Regards,

Neeraj

former_member854360
Active Contributor
0 Kudos

Hi,

dynamic SOAP URL -

Dynamic configuration payload - https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
 
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","THeaderSOAPACTION");
 
String a = http://something.abcd/applicationName/xmlMessage //set the value of actual action here
conf.put(key, a);
 
return "";

0 Kudos

Hi,

Thanks for responding. What I am looking for is the approach for buiding the entire interface. Dynamic configuration is just to create a single dynamic URL.

former_member854360
Active Contributor
0 Kudos

Hi,

Using BPM you can design your solution.

Also what will trigger the first SOAP call?Any file or IDOC from ECC?

0 Kudos

The first call will be triggered by a report program which call the proxy for the interface to get list of filenames. This part will be a synchronous Proxy-to-Soap scenario and I will get back the list. Now what should be the next step?

The option I am thinking of is to store the list in a internal table and then loop through it and then use one uuid at a time to create a dymamic URL. But then how shall I call the webservice the second time. If I call it in a BPM and want to progress further what all stps do you think BPM will contain?

former_member854360
Active Contributor
0 Kudos

BPM step

1) receive the proxy request

2) Send: Make sync call to SOAP for file List.

3)Send : Send back file list to ECC

4)Multimapping transformation step(File list ---SOAP second call) create multiple target message

5) now inside loopand synchronus send one by one soap second request.

6) Do another mapping outside BPM for dynamic configuration of URL for every message.

7) inside loop also another send step for sending back the response to ECC system As IDOC

0 Kudos

Hi,

Please see the requirement in the initial post.

I have designed a BPM as follows :

1) Receive the proxy request

2) Send - Make sync call using HTTP adapter to get a List of uuid.

3) Transform Step-: 1:n mapping to map uuid to separate individual urls.

4) Block - For Each - one by one take the url from the Multiline container from previous step into CurrentLine container

a) Transform step : Mapping containing UDF for getting Dynamic Target URL for HTTP adapter

b) Synchronous send - using HTTP adapter to get details of uuid.

c) Transform step - Mapping to convert response from HTTP into IDoc.

d) Send Step - To send Idoc to ECC.

When I execute I get a response till step 2 but it does not go further. Also I see a Green Flag in sxmb_moni under the column Outbound status for PE.

Can someone tell if there appears to be anything wrong with the way BPM is designed.

Regards,

Neeraj