Dynamic Query string in Receiver HTTP_AAE adapter

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

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=test 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.

Similar Messages

  • Error dynamic File Name in Receiver File Adapter

    Hi all,
    Dynamic file name for Receiver file Adapter Problem
    my multi mapping look like this in design mode
    messages
         message1
              SD01_E
                   FileName
                   row
         message2
              SD02_E
                   FileName
                   row
    by processing the xml look like this:
    <ns2:SD01_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    or
    <ns2:SD02_E xmlns:ns2="urn:lsv.de/SAP/XXX">
    <FileName>L40SA939.xiConstant</FileName>
    - <row>
    in file receivere adapter  i have try this but it dos not work
    payload:SD01_E,1,FileName,1
    Error:com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 0(:main:, row:1, col:0)
    is there any way to have access to Filename  in different root elements??
    regards
    Ralf

    Hi Ralf,
    i think, you need for each XML msg (each different root element) a new adapter -> a new IF determination, new rec agreement and a new channel.
    Regards,
    Udo

  • Receiver HTTP Adapter Dynamic Query String

    Hello,
    I am using HTTP Adapter on receiver side.
    My URL is  <b>http://server:port/abc/def?xyz=123&luw=345</b>
    When I am using Adapter specific attributes.
    If I check apply Parameters and pass
    Parameter 1 as xyz and Parameter 2 as luw and pass their values through dynamic configuration will they get appended to the dynamic querystring
    http://server:port/abc/def at the end and I get back the complete URL.
    Can this be achieved? I am stuck on this.
    Regards,

    Srihari,
    The best way to debug this and check what is happening would be to use the TCP gateway tool as shown in this blog by Stefan Grube.
    /people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway
    Send the request to the TCP gateway and forward it from there to the correspionding target.
    You will be able to see the URL being passed including the Query String parameters.
    Regards
    Bhavesh

  • How to build dynamic query strings in the query using DB adapter 'Pure SQL'

    Dear Forum,
    I am building an application which will access DB to fetch some result set. The query involves retrieving data from multiple tables(nearly 10 tables). So I have created a DB adapter using 'execute pure sql' option. With this query works fine, but my inputs parameters will vary. So I need to make my query dynamic to append the query strings at runtime depending on the inputs.
    For example I have 3 input variables - input1,input2 and input3 (in my request xsd) which are used in the pure sql query. Now if I get a 4th input parameter input4 in the request, I need to append this to query string as 'AND input4=[some value]' at runtime. Otherwise my query should have only 3 parameters. Please suggest how this can be achieved.
    Regards,
    Satya.

    This is a strange requirement, depending on the columns you have and what are optional in them, one way is to have separate operations and each opeartion will have different inputs and for each operation , a different DB Adapter is called. But this way, it results in more number of operations for the service as well as more number of references in the composite. Even if you pass the column inputs to the SQL procedure, it will result in a large number of if-else cases..
    Thanks,
    N

  • Dynamic File name in Receiver File adapter

    Hi,
    My Scenario is Proxy to File.
    I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
    How can i create a dynamic filename? i searched the forum, but i could not get the correct answer,
    Please help me out.
    Regards
    Srinivas

    Hi Srinivas,
    > My Scenario is Proxy to File.
    > I must create filename dynamically in the receiver file adapter by taking the sales order number and divison from the source.
    public String targetFileName(String Sono, String Div, Container container) throws StreamTransformationException
    DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String MyFileName = sono + div + "<filename>"+".xml";
    conf.put(key, MyFileName);
    return MyFileName;
    File name you can format according to your requirement.
    And one more thing for this you have to specify the ASMA properties. For this check the below link step-1 and step-2.
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards
    Ramesh

  • Setting dynamic file name in Receiver file adapter - not from payload

    Guys I just remember reading a weblog but can't find it now that I need it, on how to set the file name in message mapping dynamically but not using any payload field.
    Please let me know if you remember this.
    Thanks a lot,
    Viktor Varga

    also u can check in
    <a href="/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II</a>
    <a href="/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14: The same filename from a sender to a receiver file adapter - SP14</a>

  • Dynamic  File Name for Receiver File Adapter

    Hi All,
    How can we use dynamic name for Receiver file adapter?
    Can anyone help.
    Thanks in Advance
    Chemmanz

    Hi Chemmanz,
    The dynamic filename generation concept is as follows.
    In your filename field. just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    If you have any clarifications, do get back,
    Regards,
    Bhavesh

  • Dynamic attachment name with receiver mail adapter and use mail package

    We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
    I could probably do this using the adapter module (as per the following link),
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?

    Hi,
    1) XML payload as attachment (with dynamic name)
    2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
    These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
    The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
    <?xml version="1.0"; encoding="UTF-8"?>
    <p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
    <Subject>My Invoice</Subject>
    <From>from email address<;/From>
    <To>to email address</To>
    <Content_Type>text/plain;name="MyFile.csv";</Content_Type>  --> file name here
    <Content>123;A49;aaa</Content>   -> attachment xml here
    </p2:Mail>
    And you have to select MailPackage in the receiver mail adapter.
    Regards,
    Aravind

  • How to set "Cc" field in Dynamic Email address in Receiver Mail adapter

    I have done the configuration for setting up the dynamic email address using the XSD provided by SAP in note no 748024. It is working fine.
    Michal's blog “Mail Adapter (XI) - how to implement dynamic mail address.” was a gr8 help in doing this.
    But there is no clue of setting up of "CC" in email.
    There should be "CC" in email is our bussiness requirement.
    Would appreciate your helps.
    with regards,
    Ravi Siddam

    Hi,
    If you do not need mail package for other reasons, I suppose it is enough to provide a value in Dynamic Configuration for fields "THeaderTO" and "THeaderCC" and the select "Use Adapter-Specific Message Attributes" and "Variable Transport Binding" in receiver Mail Adapter.
    see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm">SAP help</a> for more details.
    Regards,
    Daniele

  • Dynamic query configuration in sender jdbc adapter

    Hi,
    According my undertsnading in XI.3.0 dynamic query in sender JDBC adapter is not possible.
    could any one confirms the possibility of this feature in XI 7.0 .
    Thanks,
    venu

    Hi VJ,
    sorry for late responding to your answer.
    One of our requirements is the query statement that we write in sender communication channel should be changed dynamically, for example in where condition the condition parameters values required to change.
    Thanks,
    venu

  • Filename attachment to dynamic email address in receiver email adapter

    Hi,
    Can i send a file with dynamic name to a dyanmically generated Email Id as attachment using receiver Email adapter ?
    Thanks
    Rupesh Kumar

    Hi,
    I had gone through the links given , but it doesn't answer my question completely. I think i need a java code to send dynamically generated filename to be send to dynamically generated email ID.
    The file name and the email Id is available in the sender adapter.
    This filename should be send as attachment to the Email Id using receiver Email adapter.
    Thanks & regards,
    Rupesh

  • Jasper Reports Dynamic Query String

    Hi guys. Could you help me out? I'm trying to create a program with jasper reports where the query string should be dynamic. Meaning the sql queries are to change depending on certain conditions. For example, Condition A executes sqlqueryA while condition B executes sqlqueryB. All on the same report. Although of course not at the same time. Is it possible? Could you give me a sample code? I have no idea at all. Thanks.

    Hi guys. Could you help me out? I'm trying to create a program with jasper reports where the query string should be dynamic. Meaning the sql queries are to change depending on certain conditions. For example, Condition A executes sqlqueryA while condition B executes sqlqueryB. All on the same report. Although of course not at the same time. Is it possible? Could you give me a sample code? I have no idea at all. Thanks.

  • Dynamic attachment name in receiver mail adapter for 1 attachment?

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

  • In HTTP receiver, how to make a dynamic query string in URL

    Hi,
       I have a scenario where after a map we get an XML output as shown below
    <FUNLOC>000010038</FUNLOC>
    <SECONDARY_KEY>0000010038</SECONDARY_KEY>
    <SOURCE>SAP customer</SOURCE>
    <NAME>NAME NAME12 NAME13</NAME>.
    Now what i need that my HTTP receiver URL should add these tags as
    FUNLOC=000010038&SECONDARY_KEY=0000010038&SOURCE=SAP customer&NAME=NAME NAME12 NAME13.
    Can any one help me out in step by step process to archive this.
    This will be a great help from you.
    Thanks in advance,
    Smita

    Hi Smita,
    Check these threads You can find the solution there.
    https://forums.sdn.sap.com/click.jspa?searchID=5694804&messageID=3189288
    https://forums.sdn.sap.com/click.jspa?searchID=5694804&messageID=3717577
    Regards,
    Sreenivas

  • Dynamic attachment name in receiver mail adapter

    Hi  all,
    i am doing a receiver mail scenario (PI 7.1). my requirement is like this :
    Receiver file need to be send in receiver mail attachment and attachment name should be dynamic
    format for the attachment name should be like this
    R+value from a particular field in payload +Timestamp
    for example my file name should be like this  R001_510815021009062532.xml  
    which is     R+ 001_510815 + 021009062532 + .xml
    can anybody suggest me how to go for this requirement? is ther any UDF or should i go for adapter module developement?
    Thanks
    sandeep sharma
    Edited by: sandeep sharma on Oct 13, 2009 8:55 AM

    Hi K Fatima,
    I read your solution.I have a similar requiement but I need to send the entire output payload as an attachment,so I am using XSLT to send the payload as an attachment.
    I am creating the file name through dynamic configuration in XSLT but the name of attachment is not as required but its any random generated name:
    *code used:*
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:map="java:java.util.Map"
      xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" />
    <xsl:output indent="yes" />
    <xsl:param name="inputparam"/>
    <!-- mail parameters -->
    <xsl:template match="*">
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
    <xsl:variable name="new-value" select="Shipment/InternalShipmentNum"/>
    <Subject>Mail</Subject>
    <From>xyz</From>
    <To>abc</To>
    <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
        <xsl:variable name="new-value"    
            select="concat($dynamic-value, 'subfolder\')" />
        <xsl:variable name="dummy"
            select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" />
    <!--Content type -->
    <Content_Type>application/xml</Content_Type>
    <!Content Description>
    <Content_Disposition>attachment;filename "<xsl:copy-of select="$new-value"/>"</Content_Disposition>
    <!--Content Disposition -->
    <Content_Description><xsl:copy-of select="$new-value"/></Content_Description>
    <Content>
    <xsl:copy-of select=".">
    <xsl:apply-templates/>
    </xsl:copy-of>
    </Content>
    </ns:Mail>
    </xsl:template>
    </xsl:stylesheet>
    Please suggest ! I need the value in "Shipment/InternalShipmentNum" as name of attachment.
    Thanks in advance!
    Indu Khurana

Maybe you are looking for

  • How to write a SQL Query without using group by clause

    Hi, Can anyone help me to find out if there is a approach to build a SQL Query without using group by clause. Please site an example if is it so, Regards

  • AppleScript - How do I make multiple dialogs display at the same time?

    Is it possible to make more than one dialog be displayed at one time with AppleScript? Thanks in advance.

  • Fax sending error, line busy?

    Hy all! I have some problem with the fax sending from the PC. I setted up the fax recieving and it work perfectly without any problem, but when I try to send a fax to someone through the "Windows fax and scan"  it writes, the line is busy, trying aga

  • Solaris won't boot after installation on ESX 3.5

    Hello everyone, After installing last Solaris 10 x86 (download last iso from sun site) on a virtual machine on ESX 3.5 does not start at boot because it shuts down without displaying any errors. Someone has done it? How to set up your vm? I have alre

  • How to install ASM on Oracle Enterprise Linux 6.3

    I am a bit lost .. I have Oracle Enterprise Linux 6.3 and ULN subscription: The only package available through yum is oracleasm-support.x86_64 I have downloaded http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm but i