on 06-01-2012 1:04 PM
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.