How can I call a java-program as receiver

Hi Folks,
I have to call a java program, based on the XI-Server as receiver. My qustions are:
What is the right adapter type
What are the parameters to give the xml to the program
Thanks a lot
matthias

Hi Mathias,
I would suggest, generate a java proxy of ur inbound interface (reciever).
1. In the java proxy implementation method you will
    have  access to the message sent to the interface,
2. You could then use this message(XML) and Call ur
    custom java program from the java proxy.
here is a link on how to implement java proxies
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
Naveen

Similar Messages

  • How can i  apply this  java program for  a jsp page?

    import java.io.*;
    import java.util.*;
    public class FileProcessing
      //create a vector container  for the input variables
         Vector variables = new Vector();
      //create a vector container for the constants
         Vector constants = new Vector();
      /*create a string expression container for the equation
         as read from the file */
         String expression = " ";
      //create double result container for the final result
         double result = 0;
         public boolean processFile(String filename,String delim)
          //index for values vector
              int num_values = 0;
          //index for constants vector
              int num_constants = 0;
          //current line being read from the external file.
              String curline = " ";
          //start reading from the external file
              try
                   FileReader fr = new FileReader(filename);
                   BufferedReader br = new BufferedReader(fr);
                   while(true)
                        curline = br.readLine();
                        if(curline == null)
                             break;
                    //determine the type of current interaction
                        boolean variable = curline.startsWith("input");
                        boolean constant = curline.startsWith("constant");
                        boolean equation = curline.startsWith("equation");
                        boolean output = curline.startsWith("result");
                   //on input variables
                        if(variable)
                          StringTokenizer st = new StringTokenizer(curline,delim);
                          int num = st.countTokens();
                          int count=0;
                          while(st.hasMoreTokens())
                               String temp = st.nextToken();
                               if(count==1)
                                    byte b[]= new byte[100];
                                    System.out.println(temp);
                                    System.in.read(b);
                                    String inputval = (new String(b)).trim();
                                    variables.add(num_values,inputval);
                                    num_values++;
                               count++;
                        // on constant values
                        if(constant)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==1)
                                       byte b[]= new byte[100];
                                       System.out.println(temp);
                                       System.in.read(b);
                                       String cons = (new String(b)).trim();
                                       constants.add(num_constants,cons);
                                       num_constants++;
                                  count++;
                        // on equation
                        if(equation)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==2)
                                       this.expression = temp;
                                  count++;
              // now we are ready to evaluate the expression
                       if(output)
                          org.nfunk.jep.JEP  myparser= new org.nfunk.jep.JEP();
                          myparser.setAllowAssignment(true);
                          for(int i=1;i<variables.size()+1;i++)
                             String name = "arg"+Integer.toString(i);
                             myparser.addVariable(name,new Double(variables.get(i-1)
                                                .toString()).doubleValue());
                          for(int i=1;i<constants.size()+1;i++)
                               String name = "arg" +Integer.
                                         toString(i+variables.size());
                               myparser.addConstant(name,new Double(constants.get(i-1).toString()));
                   //output is obtained as follows
                          myparser.parseExpression(expression);
                          result = myparser.getValue();
                          System.out.println("Assay value: "+result);
              catch(Exception e)
                   System.out.println(e.toString());
              return true;
         public static void main(String[] args)
              FileProcessing fp = new FileProcessing();
              fp.processFile("input.eqn",":");
    }//my text file name is: "input.eqn" (given below)
    input:Enter Value1:arg1
    input:Enter Value2:arg2
    input:Enter Value3:arg3
    constant:arg4
    constant:arg5
    Equation:arg1+arg2+arg3
    result:

    how can i apply this java program for a jsp pagewhy do you want to do this ?
    Your program reads from a file on the disk and formats based on a patterm.
    Jsp is not intended for such stuff.
    ram.

  • How can i run my java program with out java language

    Hai to every one ..Iam new to java language ...am using windows xp operating system , i did not installed java language in my system .. how can i run a java program with out installing java language... Which files is requied to run java program..?
    any one can help me??

    Hai to every one ..Iam new to java language ...am
    using windows xp operating system , i did not
    installed java language in my system .. how can i run
    a java program with out installing java language...
    you ... can ... not ... do ... this
    Which files is requied to run java program..?
    any one can help me??a JVM. Download it from sun's website.
    [url http://java.sun.com/javase/downloads/index.jsp]Download JavaSE here

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How can you get a java program working on a cell phone?

    I was thinking of making some stuff for cell phones so i was wondering how you get a normal java program to work on cells.

    its all j2me - midlet package....Huh? The jsr-118 MID profile alone has 11 packages, one of which is javax.microedition.midlet. Notj2me - midlet.
    works best on nokia phones.Sez who? You seem to be confusing Java ME with Symbian C.
    you can use net beans midlet packge add-on.Only it's called the NetBeans Mobiliity Pack.
    Its easy to use and has lots of tutorials.Ditto for the Wireless toolkit for CLDC.
    just search on google.Yes, but with which keywords?
    @OP:
    NetBeans mobility pack comes with a short tutorial and several samples, you also need to download the latest WTK as the ver. 2.2 which comes bundled with NetBeans is just too buggy to work with. Then there are the manufacturer-specific SDKs from Nokia, Motorola, Sony Ericsson and (maybe) others.
    If and when you get started in Java ME aka j2me, it will be appropriate to post any questions you might have on the mobility forums, not here.
    Google "j2me tutorial" for many good hits.
    luck, db

  • How can I call a java object from Web dynpro ABAP application?

    I made Web dynpro ABAP application and posted it to SAP EP.
    For certain business purpose, we need to call external 3rd party java object using 3rd party's java api in Web dynpro application.
    Is there anybody who experienced this kind of java interface issue?
    I know Web dynpro Java environment can fully support this kind of requirement. but regarding Web dynpro ABAP, I couldn't find any clue for this.
    Any comment or suggestion would be greatly appreciated.
    Thanks,
    Raymond, ABAP Consultant

    if you have jco configured, then you can make calls to java api from ABAP .
    check out this weblog.
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Raja

  • How can I call a C program or call a C function in my JAVA code?

    Could I call a C program or a C function in my JAVA code?
    somebody told me that I should define a native() method, but what should I do in this native() method?
    could u give me an example?
    thanks in advance.

    Maybe these will give a clue:
    http://java.sun.com/docs/books/tutorial/native1.1/index.html
    http://java.sun.com/j2se/1.3/docs/guide/jni/

  • How can I open a java program through another program?

    Can someone tell me what's wrong with my code?
    <CODE>
    String thisFile = "javaw -classpath D:/DirectLink/classes;C:/JBuilderX/jdk1.4/jre/lib/rt.jar directlink.DirectLink";
    try {
    Runtime.getRuntime().exec("cmd /C start " + thisFile);
    catch (Exception e) {
    </CODE>
    This code will handle other programs however I don't know how to write it so it will work with calling another class.

    Yeah, I made sure it was in the path. I even used the
    exact command from a command prompt. Well almost, I
    had quotes around the classpath.
    Eh? Quotes around the classpath? Sorry if I was being unclear. What I mean is when I call this from a command prompt I put double quotation marks around the classpath like so:
    javaw -classpath "D:/DirectLink/classes;C:/JBuilderX/jdk1.4/jre/lib/rt.jar" directlink.DirectLink
    In the code on top I wrote it as a string and there were no quotation marks around the classpath.
    However, I'm not
    sure if I can use single quotes with java to simulate
    this or whether I can use a \" in it's place.
    I'm not sure what you're saying...but note that when you call exec you're not passing control to the shell, ?>so shell metacharacters are not interpreted.Once again sorry for not being clear. What I meant was I didn't know if I could write it like this:
    tempString = "javaw -classpath \"D:/DirectLink/classes;C:/JBuilderX/jdk1.4/jre/lib/rt.jar\" directlink.DirectLink"
    And whether this would work. All I really was asking is how can I pass the command to cmd so it will interprete it as it did when I entered it in manually before. I wanted to pass the command to cmd with double quotation marks around the classpath because that's how I did it earlier. I just wasn't sure how to do it.
    What I'm wondering is since it's a java class is there a
    better way to call it especially since executing
    commands seems to be different between different OS's?
    You can invoke it directly. Why did you decide to create a new process?Frankly, I don't understand the command very well. I haven't had to use it before and I'm really just trying to get a feel for it. I usually like to get something working, play around with some options, get more of a hands on feel. Then I usually will do more research on it. I was looking at some posts on the exec command and I tried a few of them and this one worked for me when it came to opening apps so I decided to give it a try.

  • How can I use a Java program to write an executable Applescript

    I'm using a PC with Windows XP. I'm a private developer. I've written a project in Java and wish to deploy it to other people using email. I've written an Install program (the Main-Class) and successfully packed this in a jar file with the project class files and some data files all as described in the deployment trail in the Java Tutorials. A recipient with a Mac with OS X downloads the jar file and runs it to install the project class files and some data files. The install program then writes an Applescript file (Vocab.scpt shown below) on the Desktop to make starting my downloaded program easier but it doesn't seem to work and I think it may be because the script file is not "executable". Could this be the case? If so, how could I change my install program to make the script file executable or alternatively use some other system to start the downloaded program?
    Vocab.scpt:-
    # Script to start: Vocab Version: 1.0.0
    do shell script "cd /Applications/Vocab; Java Vocab"
    Many thanks for your interest. Unfortunately I don't have a Mac to experiment with this problem and although I have spent some days on and off trying to find an answer in the mass of information available on Apple's website I can only find small clues here and there to answer my problem (which I would have thought was quite a common one). In Windows a batch file (eg. Vocab.bat) is automatically executable.

    I didn't expect you to have your customer run the command. I would expect you to create the executable and install it. However, there wouldn't be any difference in what you are creating and the .jar file. Either way it is a faceless icon. For that matter, it is no different than a batch file on Windows. I'm not sure what they wouldn't understand with, "copy the Vocab.jar file to wherever you want and double-click it to run the program." In addition, you probably ought to point out that Java is not installed on Mac OS X Lion (10.7.x) and when they double-click the jar file (or whatever you send them), the system will ask if they want to install Java.
    What you really need to do is package up the app inside a Mac application package and provide the user with the application on a .dmg (disk image). Take a look here: http://developer.apple.com/library/mac/#documentation/Java/Conceptual/Jar_Bundle r/Introduction/Introduction.html#//apple_ref/doc/uid/TP40000884
    I also found this which uses ANT to create the bundle: http://informagen.com/JarBundler/

  • How can I run a java program on Linux?

    I have JBuilder's IDE installed on my Linux partition and it works. However I don't know how to compile and test a program without it. Also I tried to install Limewire on Linux and although I've installed the Java SDK on the system. Once before I installed JBuilder and then JBuilder (I guess) installed it again. However it told me it couldn't find the Java Virtual Machine. Isn't this installed with the JDK? I am able to run programs through JBuilder so I can't see why I'd have a problem. Any answers to the above issues would be greatly appreciated.

    Go here and work out how to make a simple app to compile and run on the command line: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/unix.html#2b
    (You should find the JDK from a directory under the jbuilder directory so use that and not the /usr/local/jdk1.4 in the example.)
    Then find the classes or source code of your project and do the same thing to it.

  • How can i call userdefined java functions in a JSP ?

    Hi,
    i want to define some functions in a java class. is it possible to use these functions in a jsp ? how can i achieve this ?

    I suggest you call the function you want in either a custom tag or in the servlets/struts/jsf,... classes you are using.
    If you dont want those and you prefer scriplets then 2 step,s.
    First import the class then call it.

  • How can I stop running java program in console ?

    Hi , my name is Luck , I will explain :
    - I have created java script which execute commands from cmd level
    - In java script I'm starting *. bat file which retrieve information from system example : hostname > C:\test and then I'd like to load from the file C:\test this host name example : MyComputer
    but the problem is that my script execute reading from the file C:\test before any information will be delivered to this file , how can make a system to wait until bat file will finish doing its task , please , if you know the answer post me back , thank you

    I have created java script which execute commands
    from cmd levelI'd be surprised if you did. You probably wrote a Java program. I never heard of Javascript being run from the console.
    - In java script I'm starting *. bat file which
    retrieve information from system example :
    hostname > C:\test and then I'd like to
    load from the file C:\test this host
    name example : MyComputer???
    but the problem is that my script execute reading
    from the file C:\test before any information will be
    delivered to this file , how can make a system to
    wait until bat file will finish doing its task ,
    please , if you know the answer post me back , thank
    youWhat are you talking about? This isn't Java, this isn't Javascript, I have no idea what it is. It's already difficult to understand your problem description.

  • How can I make my java program double clickable?

    I want to make a shortcut on desktop for my java program, in other words, i want to make it double clickable.
    Can someone please give me a step by step instruction on how to do this?
    Thank you very much.

    [Creating executable jar files|http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html]
    [create a batch file |http://forums.sun.com/thread.jspa?threadID=5190624&messageID=9978734]

  • Can I call a Java program from a SQL Server Trigger?

    Hello,
    I want to encrypt some data in a database column in SQL Server. Today I am using java code to encrypt the value and store it in the database using JDBC.
    Now I want to use a VB client to store the encrypted value in the SQL Server DB. Since the encryption is handled by a java class, can I write a trigger in SQL Server that while inserting the raw data, calls the java class for encrypting the value and then inserts the encrypted value into the column?
    In general, is it possible to call a java class from a SQL Server trigger?
    Thanks
    Bipin

    Here are 3 examples of code for insert, update and delete:
    CREATE TRIGGER [PLI_INSERT_TRIGGER] ON [dbo].[PLI]
    FOR INSERT
    AS
    Declare @cmd sysname, @code sysname, @list sysname
         Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted
         Set @cmd = 'java mirrorDb.Copy PLI INSERT ' + @code + ' ' + @list
         EXEC master..xp_cmdshell @cmd
    CREATE TRIGGER [PLI_UPDATE_TRIGGER] ON [dbo].[PLI]
    FOR UPDATE
    AS
    Declare @cmd sysname, @code sysname, @list sysname
         Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted
         Set @cmd = 'java mirrorDb.Copy PLI UPDATE ' + @code + ' ' + @list
         EXEC master..xp_cmdshell @cmd
    CREATE TRIGGER [PLI_DELETE_TRIGGER] ON [dbo].[PLI]
    FOR DELETE
    AS
    Declare @cmd sysname, @code sysname, @list sysname
         Select @code = PLI_K_COD, @list = PLI_K_LISTINO from deleted
         Set @cmd = 'java mirrorDb.Copy PLI DELETE ' + @code + ' ' + @list
         EXEC master..xp_cmdshell @cmd
    you must go "sql server entreprise manager" right click on the table you want to add triggers and select: all activities, manage triggers.
    You have 3 examples: for an insert, for an update and for a delete
    ON [dbo].[PLI] specify the table on which you want to setup trigger.
    FOR DELETE, INSERT, UPDATE specify the event.
    The Declare statement create the variables in which I want to put some values to pass to the java program, for example which table, which event, which key fields.
    the "Select @code = PLI_K_COD, @list = PLI_K_LISTINO from inserted" set the variables with the value of the columns of the table I am interested to read from my java program, for example the variable @code receive the value of the column pli_k_kod (is the key) of the table PLI.
    The "Set @cmd = 'java mirrorDb.Copy PLI DELETE ' + @code + ' ' + @list " prepared the variable @cmd with the java command followed by the package.classname and parameters.
    The EXEC launch the command to the operating system.
    Daniele

  • How can I combine my java programs

    I am developing a small project in java.I have a main menu in my program. I have developed separate programs for inserting, updating and modifying using jdbc and layouts. I want to call these sub programs from my main program without much strain. what could be the simplest way? If I go for creating a package, it is very difficult. pls help me in uniting the programs into one single module.

    You can simply instantiate update, insert and modify classes in your main class and access the methods thru the instances. [ update.update()].
    Though you can do this with or without packaging, packaging is not much difficult as you think.
    -bathra

Maybe you are looking for

  • How to determine a sql query size to display a progress bar

    I would like to show a progress of an sql query within a jsp page. Background: I have a reporting web application, where over 500 contacts can run reports based on different criteria such as date range.... I current display a message stating 'executn

  • How to connect to itunes from school computer

    I am a primary school teacher trying to copy the apps from iPad to computer. However it wont connect to itunes store and therefore says i do not have permision, I assume that this is problably due to the proxy server. Has anyone got any ideas on how

  • Need to download flashplayer 10.3 for my Macbook OS X 10.5.8

    I've been trying to install adobe flashplayer 10.3 endlessly. I've done the download and now I'm at the point where this screen comes up that says "this link needs to be opened with an application," and then gives me the option to choose what applica

  • Library Not Loading in Home Sharing

    I recently purchased a macbook pro and am trying to transfer my iTunes library via homesharing from an old dell inspiron laptop to the new mac.  Both computers have the most recent version of iTunes, are activated for the same homesharing account, an

  • Proxies Missing and Full scans not working

    We had some major issues upgrading our Facilis shared storage to 'multi-user write' and in the process we lost all the proxy files/thumbnails for any video that was NOT stored in a archive device in FCSvr. Now the Facilis is stabilized - but I am lef