cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic URL in http receiver adapter

Former Member
0 Kudos

Hi All.

My interface is from file to http where I need to pass dynamic url in http adapter. So i didcouple of things like

1) My sender will be like

<?xml version="1.0" encoding="UTF-8"?>

<ns0:SENDER_SQLDATA_MT xmlns:ns0="urn:parmalat.com.au:TESTSQL_MILKSUPPLY">
   <data>http://www2.parmalat.com.au/Farmers?sql=delete+transactionlog</data>
</ns0:SENDER_SQLDATA_MT>

2) )I created udf

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

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

conf.put(url, urlparm);
return "";

3) In http receiver adapter I did following things

1) I check the use adapter specific message attribute

2) I check the Apply url parameters

Parameter1 = urlparm

but when i check in sxmb_moni I can see the dynamic configuration as

<SAP:Record namespace="http://sap.com/xi/XI/System/HTTP" name="urlParamOne">http://www2.parmalat.com.au/Farmers?sql=delete+transactionlog</SAP:Record> 

</SAP:DynamicConfiguration>

In the outboundBinding I can see

- <SAP:Attribute>

<SAP:Name>urlParamSelectionRcvr</SAP:Name>

<SAP:Value>1</SAP:Value>

</SAP:Attribute>

But still I am getting the error as

<SAP:Stack>Dynamic Header - Missing Message Attributes: Fields/Parameters</SAP:Stack>

I read blogs provided by williams and I lloked at different forums but still not able to fix this.

Can anyone please help me.

Regards

Raj

Accepted Solutions (0)

Answers (1)

Answers (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

The technical name for the URL is TargetURL and not URLParamOne. See this link from SAP Help

http://help.sap.com/saphelp_nwpi711/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/frameset.htm

So the correct code will be:

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

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

your correct if I use tick URL check box I can use TargetURL but I am using Apply url paramters so I need to use urlParamOne paramater.

Can anyone please help me how to acheive with urlParamOne because I query will be more than 400 characters sometimes.

Regards

Raj

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Can anyone please help me how to acheive with urlParamOne because I query will be more than 400 characters sometimes.

Even if you use the URLParamOne, If I recall correctly, the URL has only a 200-character limit. See the response of Michal in this thread:

http://scn.sap.com/thread/1390692

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

My first question cant be breakdown our url into

ParameterOne...Paramaetersix

Second my testing with the query less thn 200 with urlparmaters still I am getting error

Suppose if I tick Fail If Adapter-specific message attribute missing I am getting error as

<SAP:Stack>Dynamic Header - Missing Message Attributes: Fields/Parameters</SAP:Stack>

If I dont tick that I am getting error as

><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML><HEAD><TITLE>The page cannot be found</TITLE> <META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252"> <STYLE type="text/css"> BODY { font: 8pt/12pt verdana } H1 { font: 13pt/15pt verdana } H2 { font: 8pt/12pt verdana } A:link { color: red } A:visited { color: maroon } </STYLE> </HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD> <h1>The page cannot be found</h1> The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. <hr> <p>Please try the following:</p> <ul> <li>Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly.</li> <li>If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted. </li> <li>Click the <a href="javascript:history.back(1)">Back</a> button to try another link.</li> </ul> <h2>HTTP Error 404 - File or directory not found.<br>Internet Information Services (IIS)</h2> <hr> <p>Technical Information (for support personnel)</p> <ul> <li>Go to <a href="http://go.microsoft.com/fwlink/?linkid=8180">Microsoft Product Support Services</a> and perform a title search for the words <b>HTTP</b> and <b>404</b>.</li> <li>Open <b>IIS Help</b>, which is accessible in IIS Manager (inetmgr), and search for topics titled <b>Web Site Setup</b>, <b>Common Administrative Tasks</b>, and <b>About Custom Error Messages</b>.</li> </ul> </TD></TR></TABLE></BODY></HTML></SAP:P3> 

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>HTTP server code 404 reason Not Found explanation <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML><HEAD><TITLE>The page cannot be found</TITLE> <META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252"> <STYLE type="text/css"> BODY {</SAP:Stack>
I I tried in all ways to do but not able to achieve..can you please see my dynamic conf in the top and canyou let me know where I am doing mistake
I
markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

I just tested your URL using Fiddler

http://www2.parmalat.com.au/Farmers?sql=delete+transactionlog

and you are getting the correct response e.g 404 page not found. You should raise it to the receiving system to provide you with the correct URL. Since the page is not found, you are getting an HTML response which you can parse via Java/XSLT mapping (if your business process requires it).

Hope this helps,

Mark

nageshwar_reddy
Contributor
0 Kudos

My first question cant be breakdown our url into

ParameterOne...Paramaetersix

Second my testing with the query less thn 200 with urlparmaters still I am getting error

What do you have in Path? Apply URL parameters will complement what you have in the path. For example, If your path is /testpath and you have Parameter 1 as testparamone, the final URL will be http://<target host>:<service number>/test?testparamone=<value set dynamically in URLParamOne>.

You can not break down URL into ParameterOne ... Parameter Six. You can breakdown only query string into parameters.