cancel
Showing results for 
Search instead for 
Did you mean: 

Passing xml structure in url HTTP receiver ?

Former Member
0 Kudos

Hi All,

I have the scenario where sender can be RFC in which i have to access the url which has xml strucutre as query string in it and get back the response from it..

for eg :

http://www.xyz.com/pathprefix/?(xmlQuery)<header><field1>12</field1><field2>12</field2><field3>12</f...;

In the above url the field values of fields field1,field2, field3 are determined at runtime.

I want to know how can i pass xml structure in url and make the fields variable through receiver HTTP adapter or if there is any other method to do it.

Early replies are appreciated.

Thanks,

Amit

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Use dynamic configuration for dynamically creating the url parameters

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

Regards,

Prateek

Former Member
0 Kudos

Hi Praveen,

I referred the blog by Li and found it helpful and even awarded points to you for the same,thanks once agian.

Can I do like this in my receiver communication channel for dynamically assigning the value for date in following url

Addressing Type: Url

Url address:

http://www.oanda.com/cgi-bin/fxml/fxmlfxmlrequest=<convert><client_id>XYZ</client_id><expr>USD</expr...; Dynamic_date </date></convert>

ASMA:

Apply URl Header Fields:

FieldOne: Dynamic_Date

where I want to have only value of the Dynamic_date and not the name in the url at place where i have specified Dynamic_date

regards,

Amit

Former Member
0 Kudos

Hi Amit,

How did u solve this problem..

Regards,

Shyam.

Former Member
0 Kudos

Hi Shyam,

I wrote following udf to create url at runtime,but even though i was able to ping the oanda application but it was not accepting the query which was there in url begining with ?fxmlrequest=..... so it was giving an error in moni as "Please specify the client id" while if i open same url through Internet explorer it was fetching the data and was giving required output.I was passing date as input parameter (a) in my udf.

//write your code here
String s1,s2,url;
MappingTrace trace;
trace = container.getTrace();
s1 = "http://www.oanda.com/cgi-bin/fxml/fxml?fxmlrequest=<convert><client_id>ABC</client_id><expr>USD</expr><exch>GBP</exch><date>";
s2 = "</date></convert>";
url = s1 + a + s2;
trace.addInfo(url); 
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);



return "";