cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic URL in HTTP_AAE PO 7.40

Former Member
0 Kudos

Hi All,

We are configuring IDoc to HTTP scenario with HTTP_AAE adapter on receiver channel. Our requirement is to dynamically generate the URL based on values from payload.

Required URL: http://testserver.com/DemoPath/HTTPController?DELIVERY/PLANT1234

We have added

testserver.com in URL address

/DemoPath/HTTPController - in the Path field

and the values DELIVERY/PLANT1234 is to be generated dynamically from Payload.

To achieve this we have written below UDF, with value DELIVERY/PLANT1234 as input.

----------------------------

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey parmValue;

parmValue = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/HTTP_AAE", "URLParamOne");

conf.put(parmValue, "URLParamOne");

return "";

-----------------------------

And in channel we have used ASMA parameter URLParamOne.

But we are not sure if the above setup is correct, as there are no traces for this in DynamicConfiguration log of Mesage monitoring. Please let us know if there is any way we can check the working of this ASMA parameter in logs and create this URL without a "=" in dynamic value.

Regards,

Aditi

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182412
Active Contributor

Hi Aditi,

1) By default namespace for HTTP_AAE is http://sap.com/xi/XI/System, if you want proper name space in dynamic configuration you need to set below parameter. please check below note for reference.

We have code changes in PI HTTP_AAE adapter inorder to include the namespace 'http://sap.com/xi/XI/System/HTTP_AAE'. For this, you have to

configure an advanced mode table parameter i.e., 'treatNSWithHTTP' to 'true'. By default the value is false.

1958747 - Namespace of context object and ASMA differ in HTTP_AAE adapter


2)  The below statement should be conf.put(parmValue, input); (variable input is input to the UDF, because you need to save the value(DELIVERY/PLANT1234) in the configuration key which you created).


conf.put(parmValue, "URLParamOne");


3) In the communication channel under ASMA properties Parameter 1 should be URLParamOne


Please check below blog for reference.


Regards,

Praveen.

nageswararao_v2
Participant
0 Kudos

Hello Praveen,


>> you have to configure an advanced mode table parameter i.e., 'treatNSWithHTTP' to 'true'. By default the value is false.

Can you please do let me know where to set this parameter(treatNSWithHTTP) to true.

Thanks,

Nagesh

former_member184720
Active Contributor
0 Kudos

go to advanced tab in your receiver CC-> additional parameters -> set additional parameters.

former_member182412
Active Contributor
0 Kudos

Hi Nageswara Rao,

Check below.

Or you can use namespace http://sap.com/xi/XI/System in the UDF.

Regards,

Praveen.

nageswararao_v2
Participant
0 Kudos

Thank you both for your quick prompt,

I am using HTTP_AAE adapter on receiver side with GET method, Can you guys help me with below parameter configuration.

Regards,

Nagesh

former_member182412
Active Contributor
0 Kudos

Hi Nageswara Rao,

In the  Main Payload Parameter Name field, specify the name of the parameter whose value should be copied to the XI main payload.

Refer below links:

Configuring the Java HTTP Adapter on the Receiver Channel - Advanced Adapter Engine - SAP Library


Regards,
Praveen.
engswee
Active Contributor
0 Kudos

Hi Aditi

If you so happen to be on SP09 of PO7.4 (or can possibly implement SP upgrade to it), you can consider using the new REST adapter instead.

I'd recommend using the REST adapter as it is superior in handling HTTP scenarios. In your case, you can refer to the following article on handling dynamic URL construction from payload values.

Rgds

Eng Swee

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Aditi,

The same dynamic queue value will be updated in SequenceName column of message monitoring ( Java Stack Monitoring ).

Regards,

Sriprasad Bhat