Send parameters to XI by HTTP

Hi friends,
I would like to offer an interface in XI to establish a synchronous communication for adapters HTTP or XI.
Would need to run the service in XI from a URL like:
http://host_xi:port_xi/path_xi/service_xi?parameter1=X&parameter2=Y&...
And capture in XI a message with the parameters through a HTTP request to the URL above.
I have seen examples of this, but sending the message in XML format from the client HTTP.
Is it possible to do what I need?
Thanks,
Jose.

Hi friends,
I think I already have the solution. To enable communication HTTP and send the parameters by GET method from the sender system, performed as follows:
With a BSP application is able to capture the parameters by GET method.
In a Controller of the BSP is assign the class controller that processes requests HTTP. This class inherits from the controller class CL_BSP_CONTROLLER2.
It reimplement the method DO_REQUEST, and this prepares the URL with the necessary parameters and XML Payload to be sent to Integration Engine of SAP XI.
Thank you all for the help,
Jose.
Edited by: Jose Mª Mudarra Lara on Jun 4, 2008 11:50 AM

Similar Messages

  • How best to send double byte characters as http params

    Hi all
    I have a web app that accepts text that can be in many languages.
    I build up a http string and send the text as parameters to another webserver. Hence, whatever text I receive i need to be able to represent on a http query string.
    The parameters are sent as urlencoded UTF8. They are decoded by the second webserver back into unicode and saved to the db.
    Occassionally i find a character that i am unable to convert to a utf8 string and send as a parameter (usually a SJIS character). When this occurs, the character is encoded as '3F' - a question mark.
    What is the best way to send double byte characters as http parameters so they always are sent faithfully and not as question marks? Is my only option to use UTF16?
    example code
    <code>
    public class UTF8Test {
    public static void main(String args[]) {
    encodeString("\u7740", "%E7%9D%80"); // encoded UTF8 string contains question mark (3F)
    encodeString("\u65E5", "%E6%97%A5"); // this other japanese character converts fine
    private static void encodeString(String unicode, String expectedResult) {
    try {
    String utf8 = new String(unicode.getBytes("UTF8"));
    String utf16 = new String(unicode.getBytes("UTF16"));
    String encoded = java.net.URLEncoder.encode(utf8);
    String encoded2 = java.net.URLEncoder.encode(utf16);
    System.out.println();
    System.out.println("encoded string is:" + encoded);
    System.out.println("expected encoding result was:" + expectedResult);
    System.out.println();
    System.out.println("encoded string16 is:" + encoded2);
    System.out.println();
    } catch (Exception e) {
    e.printStackTrace();
    </code>
    Any help would be greatly appreciated. I have been struggling with this for quite some time and I can hear the deadline approaching all too quickly
    Thanks
    Matt

    Hi Matt,
    one last visit to the round trip issue:
    in the Sun example, note that UTF8 encoding is used in the method that produces the byte array as well as in the method that creates the second string. This is equivalent to calling:
    String roundTrip = new String(original.getBytes("UTF8"), "UTF8");//sun exampleWhereas, in your code you were calling:
    String utf8 = new String(unicode.getBytes("UTF8"))//Matt's code
    [/code attracted
    The difference is crucial.  When you call the string constructor without a second (encoding) argument, the default encoding (usually Cp1252) is used.  Therefore your code is equivalent toString utf8 = new String(unicode.getBytes("UTF8"), "Cp1252")//Matt's code
    i.e.you are encoding with one transformation format and decoding back with a different transformation format, so in general you won't get your original string back.
    Regarding safely sending multi-byte characters across the Internet, I'm not completely sure what the situation is because I don't do it myself. (When our program is run as an applet, the only interaction it has with the web server is to download various files). I've seen lots of people on this forum describing problems sending multi-byte characters and I can't tell whether the problem is with the software or with the programming. Two possible methods come to mind (of course you need to find out what your third party software is doing):
    1) use the DataOutput/InputStreams writeUTF/readUTF methods
    2) use the InputStreamReader/OutputStreamWriter pair with UTF8 encoding
    See this thread:
    http://forum.java.sun.com/thread.jsp?forum=16&thread=168630
    You should stick to UTF8. It is designed so that the bytes generated by encoding non-ASCII characters can be safely transmitted across the Internet. Bytes generated by UTF16 can be just about anything.
    Here's what I suggest:
    I am running a version of the Sun tutorial that has a program running on a server to which I can send a string and the program sends back the string reversed.
    http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html
    I haven't tried sending multi-byte characters but I will do so and test whether there are any transmission problems. (Assuming that the Sun cgi program itself correctly handles characters).
    More later,
    regards,
    Joe
    P.S.
    I thought one the reasons for the existence of UTF8 was to
    represent things like multi-byte characters in an ascii format?Not exactly. UTF8 encodes ascii characters into single bytes with the same byte values as ASCII encoding. This means that a document consisting entirely of ASCII characters is the same whether it was encoded as UTF8 or ASCII and can consequently be read in any ASCII document reader (e.g.notepad).

  • URLConnection problems(Sending parameters with URL)

    Guys i have some problems with sending parameters through URL using URLConnection class.
    That's my code:
    URL url = new URL("http://kiosk.homebank.kz:9090/default.asp?action=SaveContact&src=C_HOMEBANK&ClientId="+request.getParameter("ClientId")+
                        "&IdService="+request.getParameter("IdService")+
                        "&Contact="+URLEncoder.encode(request.getParameter("Contact"),"utf-8")+
                        "&Number="+URLEncoder.encode(request.getParameter("Number"),"utf-8")+
                        "&Work="+URLEncoder.encode(request.getParameter("Work"),"utf-8")+
                        "&Mobile="+URLEncoder.encode(request.getParameter("Mobile"),"utf-8"));
            URLConnection connection = url.openConnection();
            connection.setDoInput(true);
            connection.setDoOutput(true);I want just send these parameters without going to this link. How can i do it using URLConnection class? Help please!

    Try using this set method in the URL class (query is the parameters):
    protected void set(String protocol,
    String host,
    int port,
    String authority,
    String userInfo,
    String path,
    String query,
    String ref)

  • Send parameters from java to SSRS 2008 R2

    I have java code which has cascading parameters like State and County. If i select State respective county would be displayed in County dropdown. Both will have all option as well. Is there a way to handle it in java? Please let me know

    If the report is published in report server then the easiest way is to use URL and display it in an IE browser. We can even send parameters to the URL. Refer
    http://msdn.microsoft.com/en-us/library/ms152835.aspx
    There is another method that we can access a published report, i.e using
    SSRS Web Services.
    Otherwise if you are trying to access SSRS report file then you may need to create object or report viewer control(.net framework).
    Refer http://msdn.microsoft.com/en-us/library/aa337089.aspx
    http://msdn.microsoft.com/en-us/library/ms251671.aspx
    Regards, RSingh

  • Sending parameters to Flex executable

    Hi,
    Is it possible that we can send parameters to Flex executable(s)? By Flex executable I meant, the installed .EXE(for Windows) or .APP(for MacOS), after having them installed through an EXE or DMG created with command prompt.
    Thanks.

    I've seen a discussion with running executable and passing parameters with Runtime.exec from Adobe : http://forums.oracle.com/forums/thread.jspa?threadID=1686479
    But will it work for Flex compiled EXE or SWF also, and how can those parameters catch inside (?)

  • Probelm in Sending Parameters/Attributes in JSP

    I have the following two file and i want to send parameters for index.jsp to middle.jsp and print them. But when i run the files there print "null" value at <%= request.getAttribute("myparameter")%> in midle.jsp.
    Index.jsp
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1>Hi, I am Zaid from Karachi and My hobby is Cricket</h1>
    <h1>Whats Your Name, Hobby and where you belong</h1>
    <form method="GET" action="middle.jsp">
    <input type="text" name="username" size="25">
    <input type="text" name="hobby" size="25"><p></p>
    <input type="text" name="city" size="25"><p></p>
    <input type="submit" value="Submit">
    <input type="reset" value="Reset">
    </form>
    <%
    request.setAttribute("myparameter", "Passion");
    %>
    </body>
    </html>
    middle.jsp
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1>Hello World---!</h1>
    <%= request.getAttribute("myparameter")%>
    <%= request.getParameter("username")%>
    </body>
    </html>

    Consider the lifecycle.
    You request page "index.jsp" It runs index.jsp and produces html. It sets the request attribute "myparameter"
    You request page middle.jsp. It runs middle.jsp.
    Note that this progression requires two seperate requests - one for "index.jsp" and then another for "middle.jsp", which sends the request parameters from the form from your browser to middle.jsp.
    Request attributes only last the life of one request - so when you request "middle.jsp" the request attribute set when running "index.jsp" is not available.
    cheers,
    evnafets

  • Sending parameters to reports by using Run_Report_Object

    Hi All,
    How do I send parameters to report while using Run_Report_Object built-in ?
    Thanks in advance.
    Regards,
    Sanjay Kanakath

    hello,
    there is a builtin for setting the parameters :
    from the forms builder online help :
    DECLARE
         repid REPORT_OBJECT;
         report_prop VARCHAR2(20);
    BEGIN
         repid := find_report_object('report4');
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_EXECUTION_MODE, BATCH);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(repid, REPORT_DESTYPE, FILE);
    END;
    you can use      
    SET_REPORT_OBJECT_PROPERTY(repid,
    REPORT_OTHER,
    'deptno=10');
    to set the Other Parameters property of the report object.
    regards,
    philipp

  • How can i send xml file with a http servlet request

    Hi
    Please tell me how can I send a xml file into http servlet request.
    I have a servlet(action) java file.From this servlet I have generate a xml file. Now I need to send that xml file to another servlet with http servlet request object.
    Dave.

    When you say you have generated an XML file what do you mean?
    Is it a file stored on disk? Then pass the file path as a string to the servlet.
    Is it stored in memory as an object? The pass a reference to the object to the servlet.
    Or are you asking how to communicate between servlets?
    Look in the JavaDocs for the RequestDispatcher class. You can use this class to forward the request to another servlet. Data can be passes using the RequestDispatcher by storing it as attributes using the request getAttribute and setAttribute methods. Also described in the JavaDOcs.
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/RequestDispatcher.html

  • RFC to send an idoc PEXR2002 using HTTP connection to an external server

    Hi,
      Iam working on RFC to send an idoc PEXR2002 using HTTP connection to an external server. first time iam working on this particular scenario on http connections. please clarify on this and explai me in detail about this.
    Points will be rewarded **
    Thanks & Regards,
    Ravi

    HI Jagruthi,
    Have you loaded the metadata into the XI system by using IDX2?
    If it is done then try to delete once and do once again.
    And also delete the IDoc from IR and reimport the IDoc and activate it once again.
    Regards
    Goli Sridhar

  • How to make a link in textflow that send parameters to a function?

    How to make a link in textflow that send parameters to a function?

    In the examples included with the weekly builds there is a CustomLinkEventHandler.as example.  Passing parameters would be done in the CustomClickHandler function.  You could attach the parameters to the LinkElement as user styles using the setStyle API.
    Hope that helps,
    Richard

  • HT1277 somehow I lost all my mail box STMP send parameters and I can't change anything

    somehow I lost all my mail box STMP send parameters and I can't change anything in the program to allow me to set my STMP

    What happens when you try to change the settiings?

  • Send parameters  to Allocation script

    Hi experts, I have an "Allocation Script" working well, but now I want to send parameters to "Allocation Script", I looked in this forum and have not found information, I am sending the package setting and the "Allocation Script"
    PACKAGE INFO
    'DEBUG(ON)
    PROMPT(SELECTINPUT,,,"Seleccionar Categoria ",%CATEGORY_DIM%)
    TASK(Traslado,USER,%USER%)
    TASK(Traslado,APPSET,%APPSET%)
    TASK(Traslado,APP,%APP%)
    TASK(Traslado,SELECTION,%SELECTIONFILE%)
    TASK(Traslado,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\TopDownPremisas.lgx)
    TASK(Traslado,RUNMODE,1)
    TASK(Traslado,LOGICMODE,1)
    ALLOCATE
    *RUNALLOCATION
       *FACTOR=(1+USING)
       *APP                                                 WHAT=GASTOSADM;             WHERE=<<<;                   USING=<<<;
       *DIM ACCOUNTGASTO                 WHAT=BAS(706);               WHERE=<<<;              USING=799Porcentaje
       *DIM RPTCURRENCY                         WHAT=LC;                               WHERE=<<<;              USING=<<<
       *DIM DATASRC                              WHAT=INPUT;                       WHERE=<<<;              USING=<<<
       *DIM AGENCIA                              WHAT=BAS(999);                    WHERE=<<<;              USING=9999
       *DIM DEPENDENCIA                         WHAT=BAS(999);                    WHERE=<<<;              USING=9999
       *DIM PLAZA                                      WHAT=9999;                        WHERE=<<<;              USING=9999
       *DIM CATEGORY                                 WHAT=%CATEGORY_DIM%;   WHERE=ESCENARIO8; USING=ACTUAL
       *DIM ENTITY                                      WHAT=BAS(999);                     WHERE=<<<;              USING=1
       *DIM TIME                                      WHAT=BAS(2011.TOTAL);      WHERE=<<<;               USING=2011.JAN
    *ENDALLOCATION
    I want to is for the category you have choosen is the one that I want to use in  the "Allocate Script" but not know how.

    I followed all the steps, but does not work, I dont know, what I'm doing wrong.
    PACKAGE
    DEBUG(ON)
    PROMPT(TEXT,%CATEGORY_SOURCE%,"Enter SOURCE category",,"ACTUAL,ESCENARIO7")
    PROMPT(TEXT,%CATEGORY_TARGET%,"Enter TARGET category",,"ACTUAL,ESCENARIO7")
    PROMPT(SELECTINPUT,,,"Seleccionar Categoria",%TIME_DIM%)
    TASK(Traslado,FORMULASCRIPT *FUNCTION CAT_SRC=%CATEGORY_SOURCE% *FUNCTION CAT_DESTN=%CATEGORY_TARGET%,)
    TASK(Traslado,USER,%USER%)
    TASK(Traslado,APPSET,%APPSET%)
    TASK(Traslado,APP,%APP%)
    TASK(Traslado,SELECTION,%SELECTIONFILE%)
    TASK(Traslado,RUNTHELOGIC,FORMULASCRIPT)
    TASK(Traslado,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\TopDownPremisas.lgx)
    TASK(Traslado,RUNMODE,1)
    TASK(Traslado,LOGICMODE,1)
    SCRIPTLOGIC
    *IGNORE_SECURITY
    *XDIM_MEMBERSET CATEGORY=CAT_SRC.INPUT
    *XDIM_MEMBERSET CATEGORY=CAT_DESTN.INPUT
    *RUNALLOCATION
       *FACTOR=1
       *APP                                                 WHAT=NOMINA;                       WHERE=<<<;               USING=<<<
       *DIM ACCOUNTNOM                   WHAT=[TOPDOWN]="S";        WHERE=<<<;        USING=706102Porcentaje
       *DIM RPTCURRENCY                             WHAT=LC;                      WHERE=<<<;          USING=<<<
       *DIM DATASRC                      WHAT=INPUT;                      WHERE=<<<;          USING=<<<
       *DIM AGENCIA                      WHAT=BAS(999);                      WHERE=<<<;          USING=9999
       *DIM DEPENDENCIA                             WHAT=BAS(999);                      WHERE=<<<;          USING=9999
       *DIM PLAZA                                  WHAT=9999;                      WHERE=<<<;          USING=9999
       *DIM CATEGORY                               WHAT =CAT_SRC;                    WHERE =CAT_DESTN; USING = ACTUAL;
       *DIM ENTITY                                  WHAT=BAS(999);                      WHERE=<<<;          USING=1
       *DIM TIME                                  WHAT=BAS(%TIME_SET%);      WHERE=<<<;          USING=2011.JAN
    *ENDALLOCATION
    Please help!

  • How to send Parameters FORM to PHP WEB Page with method POST (secure)?

    Hello everyone,
    i hope someone can help me to find a solution to this problem!
    i have to send "+precious+" parameters from an oracle form to php page, like username and password, with a secure method... i tried with WEB.SHOW_DOCUMENT procedure but it uses GET Method and when the web page open up you can read those parameters in the url...no good!
    some suggestion?
    Thank a lot in advance... FMicio

    The other way you have is to make a PJC java bean ...
    which uses HTTPClient library..
    for example:
    PostMethod post = new PostMethod("http://jakarata.apache.org/");
            NameValuePair[] data = {
              new NameValuePair("user", "joe"),
              new NameValuePair("password", "bloggs")
            post.setRequestBody(data);
            // execute method and handle any error responses.
            InputStream in = post.getResponseBodyAsStream();
            // handle response.I have done a multipart form data post to upload files to my db over httpClient.. and other things...
    Or with java.net.* api-s
    try {
        // Construct data
        String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
        data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
        // Send data
        URL url = new URL("http://hostname:80/cgi");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        wr.write(data);
        wr.flush();
        // Get the response
        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        while ((line = rd.readLine()) != null) {
            // Process line...
        wr.close();
        rd.close();
    } catch (Exception e) {
    }Or you can call your web page (post data) from your database
    http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
    Edited by: Peterv6i on Mar 30, 2012 3:49 PM
    Edited by: Peterv6i on Mar 30, 2012 3:55 PM

  • How to send a document in net.HTTP.request as a POST variable?

    I have read and reread the doc on net.HTTP.request, and it says I can pass an argument of oRequest, but I have not succeeded at passing in the current document, which is what I want to do.
    I've tried app.activeDocs[0], or encoding that to a string, but though it makes the call without error, nothing is sent.
    Should oRequest be simply a document, or a variable made up of name-value pairs? How do we send multiple parameters to a POST otherwise?
    I've succeeded fine with calling using GET, but when I tried to pass the document as a GET variable, I got nothing either.
    I'm sending to a LiveCycle REST end point so either POST or GET is fine.
    Thanks!

    POSTing the current document is straightforward *provided* your script is running outside the document context (i.e. in the console or a folder-level script). There's no access from doc-level scripts for obvious reasons.
    For example, putting this in the JS console will POST the current file to a URL:
    Net.HTTP.request({
      cVerb:'POST',
      cURL: 'http://localhost/submit.php',
      oRequest: Collab.documentToStream(this),
      oHandler: {
        response: function (msg, uri, err) {
           if (err!=undefined) app.alert(msg);
    Your problem with talking to a vanilla webservice is that you cannot send the RFC1867 delimeters (i.e. form a "multipart/form-data" request) as the ReadStream object doesn't have a concatenation method in the Acrobat JSAPI. That's also how you would usually prepend other form fields, but if you're careful with your server-side coding you can send those as GET parameters in cURL. Normally you'd be polite and pass a Context-Type header in the aHeaders array - it won't matter to the transmission process but will allow your webservice to predict what the heck it's been sent.
    Your webservice will then have to read the raw data. In PHP for example, you won't get anything in the $_FILES global but you can grab the PDF by reading everything from the input buffer, with the line:
    $pdf = file_get_contents("php://input");
    If that line was in the server script that the above JS code was aimed at, the variable $pdf will contain an exact binary copy of the currently-open document.

  • HTTP Sender with EOIO leads to HTTP Response 500

    Hello everybody,
    since we are using SP12 we have problems with the HTTP sender when using EOIO. If I use the two parameters ....qos=EOIO&queueid=myQueue... I got a HTTP Reponse Code 500: Internal Server Error in the sender system (for the test I use a Java Program). When I use the qos EO (without a queue ID) it works.
    Does anybody now this problem?
    Regards,
    Thomas

    Have u seen this
    HTTP Queue for EOIO
    Also have a look here SAP Notes – 804124, 807000
    Regards,
    Prateek

Maybe you are looking for

  • Authentication request repeated only on Safari

    Safari has a problem with a certain website requiring username and password. After entering data and clicking send, the authentication form pops right back with both fields empty. It goes on until I get locked out. Neither OmniWeb, Camino nor FireFox

  • Un-Installing Creative Applicatio

    How do you go about un-installing/deleting some of the Creative applications such as Audio Stream Recorder and Creative Media Source. I installed these by mistake when running a re-installation of my sound card drivers. They are not listed in the Add

  • Stream to 2 stereos AND use internet

    Hi, I can stream to one stereo and use the internet, but when I stream to 2 stereos the internet stops working, even on another laptop that is not doing the streaming. Everything is up to date. iTunes 4.7.2 I have a base station and a remote base sta

  • Where I can find doc about schemas of DB Secure Search 10.1.8.2?

    Hello ALL, I use SES 10.1.8.2 and I very interesting to find documentation about structure of DB SES 10.1.8.2. I mean what information contains in every schemas ? Please give me reference for official documentation Best Regards

  • Mail 0 KB/s

    My Mac Mail suddenly started coming in very slow on my main computer. On another Mac and my Droid it still comes in at full speed. I click Get Mail and it starts to run and then slows down to 0 KB/s and then just stops with nothing coming in. It happ