on 12-27-2012 3:13 PM
HI All,
I'm creating one interface of RFC to HTTP wherein I have to pass two parameters in API format only as below,
http://sumone.com/dacx/sumthng?command=single&data={"number":"8800229729","apiKey":"pmgxuoro0qriu","categories":["isCallOk"]}
OR
http://sumone.com/dacx/sumthng?command=multi&data={"number":["8800229723","8800229723"] ,"apiKey":"pmgxuoro0qriu","categories":["isCallOk"]}
But this HTTP link/API gives below response when entered into the browser,
For 1st API with command=single,
{"status":"OK","number":"8800229729","call":"OK"}
OR
{"status":"OK","number":"8800229729","call":"NOT_OK"}
OR
{"status":"NOT_OK","errorReason":"Invalid Api Key","errorCode":5}
For 2nd API with command=multi,
{"status":"OK","beans":[{"status":"OK","number":"8800229723","call":"OK"},{"status":"OK","number":"8800229724","call":"OK"}]}
OR
{"status":"NOT_OK","errorReason":"Invalid Api Key","errorCode":5}
Can this response be captured in SAP PI Netweaver 7.3?
How to tackle/capture this kind of response which is not in XML format? What adapters/java mapping I have to use?
How will I design and configure this whole scenario?
I can create the request with sender adapter-RFC and receiver adapter-HTTP with below UDF/java mapping.
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey parmValue;
// TargetURL
parmValue = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/HTTP", "TargetURL");
conf.put(parmValue, url);
// URL Parameters
parmValue = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/HTTP", "UrlParamOne");
conf.put(parmValue, command);
parmValue = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/HTTP", "UrlParamTwo");
conf.put(parmValue, data);
return "";
Is this correct for creating HTTP request with URL patameters?
Kindly guide me at the earliest.
Regards,
Amit Patil
Hi All,
Any update on how to configure such scenario?
Regards,
Amit Patil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.