on 11-02-2017 5:03 AM
Dear Experts
We have a scenario where third party system (remote system) is consuming web service which is hosted in SAP PI.
We need to got the IP address of third party system in message mapping so that we can perform some validation in SAP ECC.
Kindly suggest us some UDF (User Defined Function) in message mapping to get the IP of third party system. OR any other solution to validate the remote system IP in SAP PI or in ECC.
We are on SAP PI version 7.0
Trace level 2 is activated and we are able to see the remote system IP address in message log as shown in below screen shot.
Kindly note that we already test UDF described in link Get ip address from third-party system via UDF
Regards,
Iftikhar Ali
Hi Iftikhar!
Use "Set Adapter-Specific Message Attributes" parameter in SOAP adapter's settings:
In message mapping you can use UDF to get value from Dynamic configuration:
public String getDynamicFileName(Container container) throws StreamTransformationException{
String ipValue = "";
try{ DynamicConfiguration config = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "SndrClientAddr"); ipValue = config.get(key1);
}catch(Exception e){
ipValue = "";
}
return ipValue;
}
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can you open your ESR and then go to
SAP BASIS -> SAP BASIS 7.00 -> http://sap.com/xi/XI/System -> Adapter Metadata -> SOAP and then search for the word "Dynamic Attributes"? It should give a list of the technical names supported in your system. For example, in my PI 7.11 system, here are the ones valid:
and share your screenshot here?
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply.
We are unable to find the suggested path "SAP BASIS -> SAP BASIS 7.00 -> http://sap.com/xi/XI/System -> Adapter Metadata -> SOAP..."
Kindly advice.
Dear Exerts, I am still unable to get the client IP in UDF. Currently I am doing following:
In SOAP sender channel I checked both "Set Adapter Specific Message Aattributes" and "Variable Transport Binding".
From ESR I found the dynamic attributes: "SRemoteHost" and namespace "http://sap.com/xi/XI/System" as shown in below screen shot:
I create UDF in message mapping with following code:
DynamicConfiguration dc = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/SOAP","SRemoteHost");String val = dc.get(key);if(val == null) val = "";return val;
I am getting null in message mapping. Kindly suggest me the solution to get the client IP in message mapping. I am able to see the client IP in message monitory "SXI_MONITOR" at trace level "1" as shown in below screen shot:
Regards,
Iftikhar Ali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.