on 11-21-2012 2:27 PM
Hello All,
I have a synchronous Proxy - WS interface, i have a requirement where in the response mapping i have to send the number which is coming in the request message. Means i have to save some values in request mapping and somehow retrieve the same while sending the reponse back to proxy.
Please guide me how to proceed further.
Regards!!
Vasant
This requirement can be achieved using mutiple designa
1)Creating a table in RFC and store the value while sending request to Web service , in response mapping perform rfc look up to retrive the value and send back to Proxy.
2)Request your web service team to add one more field in response structure and ask them to send the number which is coming in the request message ,this is very much possible and good design.
3)ECC it self store the value at the time of sending a proxy request and write a logic in proxy to take the value once you receiver response from web service.this is also good design.
4)Same as 1st design but use JDBC look and ceate JDBC table in oracle data base.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Client is reluctant to change the WS so i have to do it in PI.
I am thinking of using RFC lookup but i am not sure what will be the input to RFC lookup in response mapping so that it can return me the same number which is coming in the request.
Let me give you a brief background:
The response from WS will be empty if in case the execution of message is sucessful in receiver system then in PI i have to map the number (which is coming in the request) and send it back to the sender application.
Regards!!
Hi Vasant,
Take help from ABAPer,
1)Create a table in ECC and create one function module.
2)Function module should have logic like take number and one flag from input and both should be optional.
3)first request mapping send the number which is coming in the request message as a input and the logic in function module should be to save the value and response should be success. and supress the response in mapping.
4)Response mapping send flag value X as a input and function module return value which is stored in first RFC lookup(request message look up) and replace value with blank.
I hope you are clear.
Regards,
Raj
Hi Vasant,
You can do this by using Function Library concept.
Step1.
In Function library you have to create two methods as below (Similarly).
setID_Method: Method to set the data to File for that field(This is required to persist the data between mappings).
getID_Method: Method to get the data from File: (This is used in response mapping):
Then go to your REQUEST MAPPING, set the value to a file while mapping any other field as below:
Now come to RESPONSE Mapping, and call that method from Function Library as below:
Then TEst the mapping you will get your business requirement:
Regards,
Sreeni.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sreeni,
Sorry for the late reply.
The second screen shot which you have showed above is depicting the code for "SetId" method but i want to check the code for "GetId".
I have one more question, the "data.txt" file is created and placed on PI file system?
So i think its file path should be something like "usr/sap/DPI/SYS/src/Data.txt" ?
Regards!!
Hi Vasant,
I think the solution provided by Raja and Baskar have very less risk and would be more close Best practices compare to writing the files in local PI folder.
Risks:
1. If tomorrow this type of requirement again arises and another developer uses the same File name it will create mess.
2. For any IO exception debugging part is more difficult.
3. In Production environment this type of solution is very risky.
Hi Sreeni,
Sorry but I can not totally agree on this. I have never seen a single client who would agree to go this type of solution if you inform these risks, may be it happend only for me. In a project, its our responsibility to find out the risks and come up with better solutions. If its going to be more time taking or need development from other team, they will agree, trust me.
Hello All,
I am having PI7.3 Java only isnatllation.
Regards!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your pi version supports RFC or JDBC lookup. Use either one in the request mapping to save. Use the same in the response mapping to retrieve to send back to proxy. This is better approach.
Another approach is writing in the file and read it for retrieve. This requires UDF coding. if you want to proceed in that direction you can see this link
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.