on 08-29-2012 9:15 PM
Hi all,
we have SAP PI 7.0 SP25 running.
I have a HTTP --> PI --> SOAP scenario. Our non-SAP CRM system has the ability to send a http request to an SMS provider like so: http:smsprovider.com/send?key=xyz&to=001555&message=HelloWorld. Due to security policies the CRM system may not directly send this to the provider and so we were planning to have PI as middleware.
Scenario in detail:
Questions:
At figure 3 unfortunatelly i cannot get dynamic configuration to work. Heres the code (Value type UDF)
// dimension variables
int i = Integer.parseInt(urlParamIndex);
DynamicConfigurationKey paramKey;
String result;
// get trace object
AbstractTrace trace = container.getTrace();
// get dynamic configuration object
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//according to the index, get the desired URL parameter
switch(i)
{
case 1:
paramKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP","UrlParamOne");
case 2:
paramKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP","UrlParamTwo");
case 3:
paramKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP","UrlParamThree");
case 4:
paramKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP","UrlParamFour");
case 5:
paramKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP","UrlParamFive");
case 6:
paramKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/HTTP","UrlParamSix");
default:
paramKey = null;
}
try
{
result = conf.get(paramKey);
}
catch(Exception e)
{
trace.addDebugMessage("ULR parameter " + Integer.toString(i) + " not available. Detailed error message: " + e.getMessage());
result = "";
}
return result;
Q1: Even through end-to-end testing I was not able to see section DynamicConfiguration in sxmb_moni. I was thinking that this should be visible regardles is i access it through UDF or not, just by selecting ASMA and copy-URL parameter
in the sender http CC. Any hints on this?Q2: The sender system CRM does not fill the requests
when sending the request to SAP PI. It can do POST or GET. Am I right assuming I should use GET then in order to have PI not incisting on filled request body? Would CRM still be able to get a return status from the web service of the SMS provider (routed / mapped through PI)?Thanks and kind regards
Jens
>when sending the request to SAP PI. It can do POST or GET. Am I right assuming I should use GET then in order to have PI not incisting on filled request body
Http adapter of your PI version(7.0) will support only POST not GET. Only PI 7.3 supports GET operation. If you need GET operation then you might have to try soap axis adapter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Baskar,
I have one doubt about the HTTPS requests from sap crm. It would be great if u can help.
I just want to know how we can POST an https request and how we can fill the body of https request from SAP CRM.
e.g. lets i have a REST API is 'auth.et/v1/requestToken?legacy=0' and there are two JSON Parameters which we need to pass in the request body.
How can we achieve this in sap crm.
Thanks in advance.
Thanks.
Kumar Gaurav.
Thanks for the information. I, however, tried to use get (using Fiddler2) and it seems to be handled from PI. Not sure though, if I configured that right. Anyways, I'm not getting the dynamic configuration part in the message no matter if I use GET or POST.
Am I right that using ASMA and "copy-URL parameters" in sender http CC should result in an already filled dynamicconfiguration node when entering message mapping hence the ability to use and UDF and conf.get(paramKey) to retrieve the URL parameter values?
Any clues on that?
Cheers
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.