cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP_AAE Adapater - using of dynamic url parameter doesn't work

Former Member
0 Kudos

I have an ABAP – PI – HTML scenario with a PI 7.3 system. I have to request a HTML website with dynamic url parameters. I have something like this:

http://server/website?param=value

And of course the value of "value" has to come from my payload. I use the JAVA HTTP (HTTP_AAE) adapter because I want/have to use GET for this.

First of all I wrote a UDF for puting the payload values to the dynamic configuration. Here is the sample code of the 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, "search");

return "";

I used this function in my message mapping and after that I can find the following dynamic configuration in my message monitoring (sxmb_moni):

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!--  XML-Validierung Eingang Response   -->
<SAP:DynamicConfiguration SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SAP:Record namespace="http://sap.com/xi/XI/System/HTTP_AAE" name="URLParamOne">search</SAP:Record>
</SAP:DynamicConfiguration>

All looks good so far.

So I configured my HTTP_AAE adapter. Under "advanced" I checked "Set Adapter-specific Message Properties" and then I checked "URL Parameters" I entered the word "param" in the entry field for URLParamOne.

See: http://help.sap.com/saphelp_nw73/helpdata/de/6d/c2b39dae45482e90d3352345cbf427/frameset.htm

But it doesn't work. It seems that the website doesn't get my "?param=value".

While investigating this problem I followed this blog:

http://scn.sap.com/people/william.li/blog/2007/09/07/posting-and-testing-using-xipi-http-adapter

With this test website I can see the query string and it is unfortunately empty. I have no idea what the reason is.


Some remarks and observations:

  • I've tried to add some dynamic header information (similar way), it also doesn't work.
  • If I use POST I have no query string and if I use GET I have the payload (empty body) as query string in the response of my test website.
  • If I add a static query parameter I can see it in the response of this test website.

Accepted Solutions (0)

Answers (5)

Answers (5)

vishnu_prasadk
Advisor
Advisor
0 Kudos

Hi Gil Ritter,

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

This will work. I have tested it.

Could you also provide the OSS message number that you had created?

Regards,

Vishnu

Former Member
0 Kudos

Hi Vishnu,

    HTTP_AAE adapter receiver communication channel have the option for six dynamic URL parameters.

If I need more than six URL parameters, then how can I set that.

Thanks & Regards

Dipankar

vishnu_prasadk
Advisor
Advisor
0 Kudos

Hi Dipankar,

You can only set six 'dynamic' parameters. How ever you can set static parameters in the additional paramters table.

If this is not clear, I will provide a screen shot for the same.

Regards,

Vishnu

Former Member
0 Kudos

Hi Vishnu,

     Thanks for your replay, It will be highly appreciable if you can send me a screenshot of mapping and channel setup.

Thanks

Dipankar

Former Member
0 Kudos

Hi Dipankar and Vishnu,

I suppose from the trail it seems that Gil havent made any response on the update. I am also working on the same scenario and probably you can update with your findings any.

Regards

Robinson Thomas

Former Member
0 Kudos

Hi Robinson/Gil,

For example you need to create the below mentioned http qury string.

http://server:8080/website?param=5

Use the below mentioned udf in the message mapping.

DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey Parameter1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System", "URLParamOne");
conf.put(Parameter1, "5");
return "";

In HTTP_AAE receiver adapter channel use the below mentioned set up.

Target Host: server

Port: 8080

Path: /Website  (This is the most important part...DONT add ? after /Website)

Check the Adapter Specific message attribute properties

Also check the URL parameters

Put param in Parameter1 (URLParamOne)

Now your scenario will run without any issue.

Best Regards

Dipankar

vishnu_prasadk
Advisor
Advisor
0 Kudos

Hi Dipankar,

Find the screen shot below. These are static query parameters which can be added to the outgoing request.

Regards,

Vishnu

0 Kudos

Hi Vishnu,

I want to retreive the URL from HTTP POST response which is coming in field Location. Can we acheive this by using HTTP Header Fields (Synchronous Response) option in ASMA in Http AAE adapter in PI 7.3.

Below is the response we get for http post.

response_line : HTTP/1.1 201 Created

server_protocol : HTTP/1.1

status_code : 201

status_reason : Created

server : Apache-Coyote/1.1

location : http://xxxxx:8080/services/rest/org/venue/175150

content-type : application/xml

content-length : 0

date : Fri, 04 Jan 2013 16:58:42 GMT

connection : close

I need to retrieve the value in Location.

Regards,

Sabitha

vishnu_prasadk
Advisor
Advisor
0 Kudos

Hi Sabitha,

In 7.31 you can set this. Which 7.3 version are you referring to?

Regards,

Vishnu

Former Member
0 Kudos

Hi Gil,

     I am also working in the same scenario, where in one case I need to send HTTP request asynchronously and in other synchronously in SAP 7.3 Java single stack.

Can I work in my scenarios now...do you have any information.

Thanks

Dipankar

Former Member
0 Kudos

Michal, I'm not sure if I can use your way. I have a synchronous call. Furthermore I have
no problem with the response. In my case (Web CMS Sophora) I can set the url
parameter "view=xml" to get a xml response instead of a website. I only need dynamic url parameters. Beside this I have no experience with Java proxies. So I would prefer to use
the standard.

Praveen, I've already tried both spellings.

I believe I will start an OSS call.

former_member181985
Active Contributor
0 Kudos

I believe you should use "UrlParamOne" instead of "URLParamOne". This what mentioned in this link: http://help.sap.com/saphelp_nw73ehp1/helpdata/en/6d/c2b39dae45482e90d3352345cbf427/content.htm

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

an alternative (but first please post OSS message to SAP for the issue with standard adapter)

would be to use the approach I've described here:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/01/05/michals-pi-tips-exchange-rates-fr...

then you'd need to change the class HTTGetter so it will take the URL from dynamic configuration

and you're ready

This way you'd have the whole code under your control (which is a good and bad things - depending on who you look at it   ) as this class is not very difficult to work with,

Regards,

Michal Krawczyk

Former Member
0 Kudos

Michal, I made an OSS call and here is the answer:

Dear Customer,

I got news from our developers that currently the java

http adapter[AAE]is not designed to support the dynamic URL configuration via

ASMA.

This is already mentioned to the help documentation colleagues who will

need to update the same in the help.sap.com, so as to eliminate any

kind of confusions further.

So I have to try your way next but I have to finish another project first.