cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Query string in Receiver HTTP_AAE adapter

Former Member
0 Kudos

Hi All,

     Currently I am working with a scenario where I need to use HTTP_AAE receiver adapter. I need to create the query string http://server:port/WebOrder?param=value dynamically.

I created below mentioned UDF.

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

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

conf.put(urlParameter1, "value");

return "";

In configuration part I entered below mentioned details in HTTP receiver adapter,

Target Host: server

Target Port: port

Path: /WebOrder?

Click Set Adapter specific Message properties

Click URL Parameters

I entered "param".

But I am getting the below mentioned error.

exception caught with cause com.sap.aii.adapter.http.api.HttpAdapterException: STATUS_CODE_NOT_OK-Not Found.

Could you please help me here.

Thanks

Dipankar

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Dipankar,

As far as I know, it is not possible to construct a dynamic URL call in SAP PI 7.3 with the http_aae adapter.

Check this answer:

http://scn.sap.com/message/13348516#13348516

I've updated  because you already posted in that thread , sorry, you could try the Michal's aproximation,

Regards.

Message was edited by: Iñaki Vila

Former Member
0 Kudos

Hi Lnaki,

     Thanks for your response. Could you please let me know how can I do the same in PI 7.0.

Thanks & Regards

Dipankar

Former Member
0 Kudos

Hi.

Please check the following thread.

http://scn.sap.com/message/13495710#13495710

Regards

Lucho    

Former Member
0 Kudos

Hi Lnaki,

     I completed my scenario in SAP PI 7.31 single stack.

Soon I will upload a document on it.

Thanks to all of you.

Dipankar

Former Member
0 Kudos

Dear Dipankar,

I am trying to create Dynamic Configuration for Query for Receiver Adapter. But not able to do after several attempts.

In the URL , there is a static query which i entered in the Additional query parameter but for the dynamic query parameter I am not able to form the URL.

http://142.23.43.4:80//Correspondence/servlet/IntegrationServlet?action=getNInboxItems&;credentials=user,password


So in the ABAP Proxy itself , I am combining the user and password as shown below.


For UDF , I am using the below.


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";

}

I am not sure what to enter here above in Main Payload Parameter Name.

The issue is simple, but not able to trace it and killing my time.

Regards..

0 Kudos

HI Rebeca,

Please let know which platform you are working in, and what dynamic url you would like to form.

Dipankar

Former Member
0 Kudos

Hi Dipankar,

Much awaited response..

I am working on PI 7.4 SP05 Single Stack.

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

I have posted all the screenshot in the above share.

Edited : Please note that the same issue I have raised in .

Since this thread has been answered , I would suggest you to update on the new thread.

Regards...

0 Kudos

HI,

I hope you are using below mentioned details in the receiver channel to form the URL.


Target Host    142.23.43.4

Target Port     80

Path               /Correspondence/servlet/IntegrationServlet?


If Yes, then try to remove the '?' from the end.


Also please send the Adapter specific Message Properties screenshot from Advance tab.


Dipankar

Former Member
0 Kudos

Hi Dipankar,

Thanks for the reply..

<<If Yes, then try to remove the '?' from the end.>>

No I am not using the '?' in the path.

<<In the advanced tab,>>

At Additional query parameter , where action is static I have given action = getNInboxItems

In Adapter Specific Message Properties,

a. Set the ASMP

b. Param1 (URLParamOne) = credentials

The value of credentials = usepwd ( of the sender Proxy which is dynamic )

Regards...

Former Member
0 Kudos

Dear Team,

I am working on SAP PO 7.4 Single stack. we are have scenario to send sms to customers via portal system and the delivery status has to be updated in ECC. Failed to hit the sms portal by using the HTTP_AAE adapter.

URL - http://103.112.70/smpp/sendsms?username=xxxxx&password=xxxxx&to=919797979797&from=919560054422&text=... message.

Scenario - ECC(proxy) -> PO(HTTP adapter) -> SMS portal

Development:

ESR - In the mapping

Five parameters- username , password , to , from and text from ECC to PO as part of request message.

UDF -

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

DynamicConfigurationKey parmValue;

try{

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

                  conf.put(parmValue, var1);

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

                  conf.put(parmValue, var2);

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

                  conf.put(parmValue,  var3);

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

                  conf.put(parmValue,  var4);

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

                  conf.put(parmValue,  var5);

                  

}catch(Exception ex){}

return "";

Integration Directory-

Communcation channel:

Tranport Protocol - HTTP 1.1

Message Protocol - GET

General Tab-

Addressing Mode - URL Address

Target Host - 103.112.70

Target Port - 80

Path - smpp/sendsms


Mainpayload Parameter Name - MT_SMS_Cust_Req



Advanced Tab-

Header fileds - EMPTY

Query Parameters - sender party - enabled

                              sender service - enbled

                              Receiver Interface - enabled

                              Message ID - enabled

                              Quality of service - enabled


Adapter -Specific Message Properties

set Adapter -specific Message Properties - enabled

URL parameters - enabled


parameter 1(URLParamOne) - username

parameter 2(URLParamTwo)-password

parameter3(URLParamThree)-to

parameter4(URLParamFour)-from

parameter5(URLParamFive)-text


After the configureations..The structture is not getting created as per the url format . In runtime PO system is sending only - smpp/sendsms to SMS portal and getting the response as Not authorized means the username&Password&to&from&text are not hitting the SMS porta.


Please check the configurations and guide me if any configurations were missing.



Regards,

Teja.





former_member182412
Active Contributor
0 Kudos

Hi Users,

Check below blogs, remember for HTTP_AAE adapter namespace by default is http://sap.com/xi/XI/System not http://sap.com/xi/XI/System/HTTP

Regards,

Praveen.

Former Member
0 Kudos

Thanks Praveen,

I have removed the HTTP from the namespace now it was working fine but am facing issues with the response message.

The response message was failed while excuting 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


Regards,

Sudhir.

0 Kudos

Hi?

did u manage to solve your issue?

Answers (0)