Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

HTTP to HTTP scenario, need to get the source url parameters

$
0
0

Hi All,

 

I am working on a HTTP to HTTP scenario. I want to get the 6 parameters present in the source url, source URL is something like:

 

&service=SERVCE_NAME_OB&namespace=abc%3aabc%3axi%3amm%3alu%3asap_appl%3aFinance%3a100&interface=SAPInvoiceDispaly_SYNC_OB&qos=BE%3fcompanyNo%3d1870022212&senderCompanyNo=1870022212&receiverCompanyNo=1111112270&invoiceNo=BP02014000000002&documentType=1&outputType=1

 

As you can see that there are 6 parameters companyNo senderCompanyNo receiverCompanyNo invoiceNo documentType outputType.

 

I have to pass these parameters into target HTTP channel with something like :

 

http://TargetURL/companyNo%3d1870022212&senderCompanyNo=1870022212&receiverCompanyNo=1111112270&invoiceNo=BP02014000000002&documentType=1&outputType=1

 

I am using dynamic config code to get these 6 parameters in XI. I have already checked on sender channel ASMA, 'Apply URL Parameters'. Below is the code I am using to get 6 parameters:

 

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey senderCompanyNo = DynamicConfigurationKey.create(    "http://sap.com/xi/XI/System/HTTP","URLParamTwo");
String sCNo  = conf.get(senderCompanyNo);  
DynamicConfigurationKey receiverCompanyNo = DynamicConfigurationKey.create(    "http://sap.com/xi/XI/System/HTTP","URLParamThree");
String rCNo  = conf.get(receiverCompanyNo);  
DynamicConfigurationKey invoiceNo = DynamicConfigurationKey.create(    "http://sap.com/xi/XI/System/HTTP","URLParamFour");
String inNo  = conf.get(invoiceNo);  
DynamicConfigurationKey documentType = DynamicConfigurationKey.create(    "http://sap.com/xi/XI/System/HTTP","URLParamFive");
String dTy  = conf.get(documentType);  
DynamicConfigurationKey outputType = DynamicConfigurationKey.create(    "http://sap.com/xi/XI/System/HTTP","URLParamSix");
String oTy  = conf.get(outputType);  
String l_companNo = conf.get(companyNo);
String l_senderCompanyNo = conf.get(senderCompanyNo);
String l_receiverCompanyNo = conf.get(receiverCompanyNo);
String l_invoiceNo = conf.get(invoiceNo);
String l_documentType = conf.get(documentType);
String l_outputType = conf.get(outputType);
String targetURL ="ABCD.com/xyz"
String url = targetURL + cNo  + sCNo + rCNo + inNo + dTy +oTy;
DynamicConfigurationKey confkey = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Http",  "TargetURL" );
conf.put( confkey, url );

Problem here is that I am getting only targetURL value when I test end to end, no value for any parameter, it is just null for all the 6 parameters.

 

Am I doing something wrong here.

 

Any help would be appreciated.

 

Thanks,

Ravi.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>