cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring Receiver HTTP_AAE adapter for Synchronous Response

Former Member
0 Kudos

Dear Experts,

I have following requirement to send request from SAP ABAP proxy to Service Provider and receive the response

from the service provider.

From Sender Proxy I will send the following.

<action>Items</action>

<user>test</user>

<password>121212</password>

The URL of the receiver service is

http://171.16.1.118:80/Correspondence/servlet/IntegrationServlet?action=Items&credentials=test,12121...

Path = /Correspondence/servlet/IntegrationServlet

URL Parameter Name (Query) and its Value Query

action = Items

Credentials= %user%,%password%

where user is test and password is 121212

I am using HTTP_AAE using Transport Protocol as HTTP 1.1 and Message Protocol as GET.

Below are the screenshots.

1. What we have to Fill in the Main Payload Parameter Name.

How to fill the query parameters?

Quick response is appreciated..

Regards..

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Rebecca,

I think you can work only with the ASMA parameters. You can assign the values in mapping time. This thread

deals about different problem but you can follow how the mapping can be done.

Hope this helps.

Regards.

Former Member
0 Kudos

Dear Inaki,

That was awesome...

Yes the above thread was very useful to me. So my only concern would be to capture the

run time value of the parameter "credentials".This parameter credential has 2 values: User and Password.

As you can see the link

http://171.16.1.118:80/Correspondence/servlet/IntegrationServlet?action=Items&credentials=test,121212

How to capture this is in UDF and whether it should be in Header Fields or under Query Parameters? Running out of ideas..

Regards...

gagandeep_batra
Active Contributor
0 Kudos

Please use ASMA parameter and remove the additional Query parameters

use following UDF:

String action = "items";

DynamicConfiguration conf = (DynamicConfiguration) container

    .getTransformationParameters()

    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey parm1 = DynamicConfigurationKey.create

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

DynamicConfigurationKey parm2 = DynamicConfigurationKey.create

("http://sap.com/xi/XI/System/HTTP_AAE","URLParamTwo");

conf.put(param1, url);

conf.put(param2, path);

return path;

take path as input of this udf before that concat it:

Regards

GB

Former Member
0 Kudos

Dear Gagandeep,

I have maintained as per your suggestion and I am receiving the following error.

In the path field, the user and password will be concatenated with delimiter as Comma from sender Proxy itself.

Please guide me know where I am wrong.

Regards...

gagandeep_batra
Active Contributor
0 Kudos

My Mistake: No need to define  URL

:use first parameter action and second as path(which is credentials)

String action = "items";

DynamicConfiguration conf = (DynamicConfiguration) container

    .getTransformationParameters()

    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey parm1 = DynamicConfigurationKey.create

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

DynamicConfigurationKey parm2 = DynamicConfigurationKey.create

("http://sap.com/xi/XI/System/HTTP_AAE","URLParamTwo");

conf.put(param1, action);

conf.put(param2, path);

return path;

Regards

GB

Former Member
0 Kudos

Dear Gagandeep,

In due course, I rectified some observation that query <action> was static, so I maintained in Additional Query Parameter.Its working fine.

For test purpose I also added the dynamic parameter <credentials> as static and passed the value.I am getting desired result.

http://142.23.43.4:80//Correspondence/servlet/IntegrationServlet?action=getNInboxItems&credentials=u...

In the proxy, I will be combining user and password in 1 field as shown

But our code for Dynamic Configuration is not working fine for the parameter credentials= userpwd.I am using receiver adapter HTTP_AAE (PI 7.4 Java Only )


public String FileNetURL(String credentials, Container container) throws StreamTransformationException{

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters()

    .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

conf.put(Parameter1, "credentials");

return "credentials";

}

Could you help me to rectify the error in UDF code as I want to pass the value of credentials from sender ABAP proxy.


The Main Payload Parameter Name is mandatory. What to fill here.

Regards...

Former Member
0 Kudos

Dear users,

we have requirement sending SMS to the customers mobiles. I am successfully sending the messages to the customers mobiles by using the above method. Facing issues with response message. The response messages is in plain text fromat in single line like...Sent

Using HTTP_AAE Receiver adapter.

The response message was failed while excution of the message mapping with the error

Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_SMS_CUST_RES_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Content is not allowed in prolog.


please share the comments how to pass the Status of the message to SAP ECC from SAP HTTP adapter


Response message is in a single line - Sent , Authorization failed.



Regards,

Sudhir

former_member317957
Participant
0 Kudos

Thanks ...got it.

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Experts,

Any input to by above queries will be appreciated..

Regards....