Axis : Calling an exe program on a Soap server

Hi All,
I'm trying to use a web service to call from client C an .exe program running on Server S.
But I'm stuck at the line Runtime.getRuntime().exec("cmd /c start C:\\axis\\runtime.bat");
I tried different syntax for the command line but no luck.
Is what I'm doing completely wrong or impossible?
Thanks a lot

Can I use samba in order to call commandYes, smaba supports "magic" files that cause a program to be executed when they are accessed. Note, this does not provide for arguments but you can put these in a file which you command reads.
or is there any way to open an telnet session within java applicationYes. just use a Socket connection.

Similar Messages

  • 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 to call an exe program from the JSP page?

    How to call and display the interface from a exe (residing on C: drive) on my JSP page. Our customers supplied us with an exe file and they want this to be incorporated on the JSP page that has other components also, like forms, etc. The interface of the program has to be displayed in specific co-ordinates on the JSP page. Any help is highly appreciated. Thanks in advance.

    Can't be done with JSP.
    JSP runs java on the SERVER only.
    All that gets to client is an HTML page. So all that
    you can do at the client is what an HTML page can do.
    Obviously that doesn't include running a file on the
    client machine.
    Take a look into Applets, or maybe ActiveX controls.Thanks for the reply.
    Any idea on how to use the ActiveX controls in this regard?

  • Call several .exe program via one RFC destination

    Hi,
    We use a RFC destination (one for each connected user) to communicate between SAP R/3 (4.6c) and an AS400 application via RFC server in .NET.
    We need to call some .NET functions (for transactionnal purpose) and we wish not to mix functions refering to AS400 and .NET.
    Is it possible to use one RFC destination to call functions in at least 2 .NET program ?
    If not, is there other ways to make those communications work ?

    Hi
    It is not possible. I don't think of any other way to resolve this.
    Thanks & Regards,
    Govind.

  • Calling an .exe  from a webserice

    Hi,
    I have the following requirement.
    Develop a webservice that makes a call to an .exe program running on a server. The exe program when called would return with some output based on the input request made.
    Just wanted to check if this is possible and if yes, how will that be done
    Thanks in advance
    Shekar

    should be possible, if the webservice is running on a webserver with really shitty security settings that allows servlets to run any code on the system.
    Would like to see you stop someone calling "format c:" though, or similarly destructive commands...

  • Calling Non SAP programe from SAP program

    Hi Experts...
    Can we cal Non SAP programs Like Windows EXE programs from ABAP programs ?
    If yes Then How .....
    Regards ...
    ..Ashish

    Hi Ashish ,
    Ya we can call a non SAP program from SAP program.
    For example we can call a EXE program from the SAP program using the RFC connection created in SM59.
    In Sm 59 you can create a TCP/IP connection and give the path of the executable there.

  • Executing Windows EXE program through JNLP

    Hello,
    I am trying to execute Windows .exe and dlls through Java web start/JNLP but unable to implement successfully. I tried by creating the content (exe and dlls) as a jar file and added as native resource library in the JNLP but not sure how to call the exe program?
    Any help or sample code is much appreciated.
    Thanks,
    Edited by: b_raja on Feb 21, 2008 2:58 PM

    I am trying achieve similar thing using JNLP. So far in my research, I think you need to use the installer-desc and have an implementation in ExtensionInstallerService.
    Refer to the JNLP specifications. I havent tried to implement that yet, but will update here if I get anywhere.
    Cheers

  • Calling a C program as an RFC from SAP : VERY URGENT

    Hi All,
    I have got a SAP program which is trying to call a C program on the UNIX server of the SAP system. I have created the RFC destination in SM59 and have tested the connection to be working fine. inside the C program , a code has been written to create a sample file on the server. Now when i am executing the SAP program, though the file gets created, but i am getting an Exception of "SYSTEM ERROR" at the SAP side.
    Can anybody help on this regard why I am getting that error?
    Its very URGENT

    Hi Priyanth,
      I am not sure but check this out
      If you are using any commands , check if that command is configured in SM69

  • How to call a exe or bat file from java program

    hi,
    i actually want to know that how to call a exe or bat file from program so that i can run them parallely.

    Try this :
    String strCmd = "myFile.bat";
    try
         Runtime rTime = Runtime.getRuntime();
         Process process = rTime.exec(strCmd);
         InputStream p_in = process.getInputStream();
         OutputStream p_out = process.getOutputStream();
         InputStream p_err = process.getErrorStream();
         p_in.close();
         p_out.close();
         p_err.close();
    catch(Exception e) {
         throw new Exception("Unable to start, "+strCmd);
    }

  • Calling an external program (*.exe file) on the client

    Hi,
    I use 9iDS and I'd like to call an external program (*.exe file) on the client, but this exe file is located on the server not on the client.
    So it should be something like a mixture between host and client_host(webutil) command. Is it possible to use client_host where a virtual path is passed to?
    Regards Sören

    Are you saying you want to run on the exe on the client but its located on the server???
    In that case you would have to do a webutil file transfer to move it to the client before executing. Or, if you are calling a DLL, webutil will download it automatically from the server to the client (see the C API example on the webutil page).
    Regards
    Grant Ronald
    Forms Product Management

  • Help .. I need to call Exe program from java & run it quickly

    Hi...
    I have an Exe program ..
    when it run in windows ( called by windows ) it takes 300 M.S
    but when we called it in java It takes 3000 M.S .. Why..
    where is the problem ..
    ... Help please
    Thank u..

    What are you doing with the input and output streams of the spawned process?

  • What html code will start an EXE (program) with a click on a webpage link?

    The code in bold below worked. After I switched my browser from IE 11 to Firefox to get the hover on hotspots to work, the program gave me this error message. I moved the EXE file to my local file folder and tried it as shown below. Still no success. Any suggestions?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Family Tree Charts</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><style type="text/css">
    <!--
    body,td,th {
        color: #000;
    -->
    </style></head>
    <body link=blue vlink=blue>
    <table width="100%" height="25" border="0" cellpadding="4" cellspacing="0">
      <tr>
        <td width="93%" height="27" bgcolor="#EFEFEF"> <div align="center"><font color="#999999">
        <b>This Software Allows You To Review Neat Charts of Your Family Tree </b></font></div></td>
        <td width="7%" bgcolor="#CCFFFF"> <div align="center"><A href="Mementos_Menu.html"><font size="2">Back</font></a></div></td>
      </tr>
    </table><BR><center>
    <br>
    <FONT color=#ff00ff><strong>Click the link below to download a special software program for your PC.</strong></FONT><br>
    <br>
    <a href="http://jdmcox.com/"><strong>Cox Website</strong></a><br><br>
    <strong>ITEM 1</strong> (AT THIS  WEBSITE) IS  THE <strong>FAMILY TREE CHART</strong> PROGRAM.<br>
    It is called <strong>Simple Family Tree</strong><br>
    <table width="80%" border="2" cellspacing="2" cellpadding="2">
      <tr>
        <td width="49%" align="left" valign="top"><FONT color=#ff00ff><strong>Click the link below to use this special software program after you download and install the program.</strong></FONT><br>
    <br>
    <!--<a href="C:\Program Files (x86)\Simple Family Tree\Simple Family Tree.exe"><strong>Family Tree Charts Program by Doug Cox</strong></a><br><FONT color=#ff00ff>
    -->
    <a href="C:\Users\Tom and Polly\Documents\Genealogy CD\Simple Family Tree\Simple Family Tree.exe"><b>Family Tree Charts Program</b></a><br><br>
    <FONT color=#ff00ff><strong>Click  the &quot;run&quot; button for both warning messages.<br>
    Click the &quot;READ THIS!&quot; menu option when the program opens.<br>
    Click  "X" in the upper right to close the program.<br><br>
    You can update the family data in future years with this program too.</strong></FONT>
    <br></td>
        <td width="51%" align="left" valign="top"><FONT color=#ff00ff><strong>NOTE 1: Be sure your HTML code for this webpage has a proper line to link to the location where the software was installed. You can use NOTEPAD to make HTML code changes. My existing line is: </strong></FONT><br>
          "c:\<u>program files (x86)</u>\simple family tree\simple family tree.exe"<br><br>
          <FONT color=#ff00ff><strong>The underlined portion will need to agree with where the program was installed. Just change the directory (see underlined sample above). Good luck. If I am still living, call me.<br><br>
          NOTE 2: After you download, install, and try to use the program, you may get an error message window that looks like this -&quot;0 FAMS @F191 @ FAM&quot;. This means you have an individual record in your GEDCOM file that does not have a parent. Be sure all GEDCOM records have at least one parent even if you must name the parent UNKNOWN.</strong></FONT></td>
      </tr>
    </table>
    <br></center> 
    <table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#CCCCCC">
        <tr>
          <td bgcolor="#EFEFEF"> <font size="2">&copy;2002 Sales and People</font></td>
        </tr>
    </table></body>
    </html>

    Herbert:
    Here is my latest code attempt, but I get messages about the lines in BOLD that I do not understand.
    Perhaps you will see what I need to fix. Sure appreciate what you have found and shared with such a neophyte (aka dumbo).
    Tom
    <!--
    body,td,th
    -->
    function RunExe(path) {
    try {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf("msie") != -1) {
    MyObject = new ActiveXObject("WScript.Shell")
    MyObject.Run(path);
    } else {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    var exe = window.Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);
    exe.initWithPath(path);
    var run = window.Components.classes['@mozilla.org/process/util;1'].createInstance(Components.inteinterfaces.nsIProcess);
    run.init(exe);
    var parameters = ["/c start Simple Family Tree.exe"];
    run.run(false, parameters, parameters.length);
    } catch (ex) {
    alert(ex.toString());
    This Software Allows You To Review Neat Charts of Your Family Tree
    Back
    Click the link below to download a special software program for your PC and your GED file.
    *Cox Website*
    ITEM 1 (AT HIS  WEBSITE) IS  HIS FAMILY TREE CHART PROGRAM.
    It is called Simple Family Tree
    Click the link below to look at my GEDCOM file contents.<br>Instructions are provided in the READ THIS menu option at the top of the window.
      *Show Yarnall Chart*
    *Return to this webpage by clicking on the backarrow after looking at the chart.
    You can update the family data in future years with this program too.*
    ©2002 Sales and People
    Date: Thu, 2 Jan 2014 02:09:18 -0800
    From: [email protected]
    To: [email protected]
    Subject: What html code will start an EXE (program) with a click on a webpage link?
        Re: What html code will start an EXE (program) with a click on a webpage link?
        created by Herbert2001 in Dreamweaver support forum - View the full discussion
    Perhaps this might be helpful:
    https://addons.mozilla.org/en-US/firefox/addon/opendownload-10902/
    It allows executables in Firefox to be run - it is an extenstion, though, so it must be installed in Firefox before your page will work.
    Another option is this solution, but it will still require a manual change in Firefox:
    http://forums.mozillazine.org/viewtopic.php?f=19&t=803615
    Or this: http://stackoverflow.com/questions/6472435/running-exe-in-firefox-why- do-i-get-an-error
    However, you will still have problems with getting it to work cross-browser. Honestly, browsers are not supposed to have access like that to the client side file system, which absolutely makes sense for the web.
    That is why you may have to approach the solution from a different angle - perhaps create a server side cloud version of your application(s) which can be easily accessed and run by your family members. I believe you used C to develop the applications? Although I have no experience with this framework, Wt might be a solution to convert your projects to server side applications:
    http://www.webtoolkit.eu/wt
    Good luck!
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5972893#5972893
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5972893#5972893
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5972893#5972893. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Dreamweaver support forum at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Can I use SOAP calls to remotely access functions on a SOAP server?

    Hi,
    I've used JavaScript and SOAP with "regular Acrobat" (e.g. Acroforms) to connect to a SOAP server, followed by Acrobat automatically setting up functions that I can call from JavaScript that, courtesy of SOAP, are relayed to the SOAP server for execution.  For example, a SOAP server that implements a Temperature function.  After doing the Net.SOAP.connect, my JavaScript magically has access to the Temperature() function, which is then executed remotely on the SOAP server courtesy of SOAP protocol.
    My question is: With Livecycle Designer and it's XFA-based forms, do I have the same ability to programmatically connect to a SOAP server and automatically have JavaScript functions set up that I can call on the server?  From what I've read, there are LC Submit and Execute operations which interact (e.g. exchange data) with a specified SOAP server, but it isn't clear that LC provides the ability to end up with a set of functions that I can call from my JavaScript that are then executed on the SOAP server.
    Stated more simply: Does LiveCycle Designer have the ability to connect to a SOAP server and automatically set up JavaScript functions that I can call (that then get relayed to the SOAP server for execution, followed by the return of data to my XFA-based program)?
    Thanks.
    Dave

    Hi Varma_LC and pguerett,
    First, thank you both for your quick responses!  It sounds like I shouldn't have any trouble using XFA forms and SOAP together.
    Let me ask a related question (not about LiveCycle & SOAP, but just about SOAP).  I'm trying to return two values from one SOAP call.  http://www.avoka.com/blog/?p=998&cpage=1#comment-1692 describes how to do this.  Unfortunately, it's not working for me.
    I'm able to retrieve single values from my SOAP server just fine.  When I try to return two values, the Acrobat JavaScript debugger says both values are "UNDEFINED".  The key part of my code is:
       var IntValue =   // define an int
         soapType: "xsd:int",
         soapValue: "1"
       var NValue =
           n1: IntValue  // n1 is the parameter my SOAP server expects
       var GetTheData = service.GetAllData(NValue);  // Go get the data and populate the GetTheData object
       console.println("GetTheData = " + GetTheData.CmdError + GetTheData.CmdResults);
       Param_1V.value = GetTheData.CmdError;     // This is a text box to display the returned value
       Param_2V.value = GetTheData.CmdResults; // This is also a text box to display the returned value
    Both the console.println & the two text boxes (beginning with Param) print out the same results, namely "UNDEFINED".
    I ran my SOAP client and SOAP server on two different computers, and then used WireShark to look at the SOAP protocol.  The SOAP protocol looks fine, and contains CmdError and CmdResults XML opening/closing tags around the actual data I'm trying to read from the SOAP server. Plus there are GetAllDataResponse and GetAllDataResult XML opening/closing tags around the data XML tags.
    I'm using Acrobat 9 and I developed my SOAP server using Windows Communication Foundation (WCF) 3.5.  The same JavaScript program that is unable to retrieve two values returns one value just fine (a different service... call, of course).  In other words, it's being done in one program, not two separate programs.  So, my singular Net.SOAP.connect call seems to be working fine.
    When I do the Net.SOAP.connect, I display the returned services, and GetAllData is listed, so Acrobat JavaScript knows about this particular service.
    BTW, the WCF built-in client works fine in retrieving/displaying the two returned values, correctly detecting and displaying both returned values.  Of course, the WCF client may have different "rules" than Acrobat has in terms of processing SOAP messages.  I've seen differences before between the WCF client and Acrobat.
    Any insights either of you have or anyone else has would be *greatly* appreciated. I've never used try/catch to trap JavaScript errors, if there is some type of error I should logically be looking for, I would be interested in information on that as well.
    Thanks!
    Dave

  • External WebService call from CAF Core returns Invalid soap message

    I am trying to perform the very simple action of calling a WebService from a CAF Core app service.
      1. I imported the WS (Axis Web service running on NW 2004s SP9 server) with WSDL (option 2 on import external service page).
      2. I then assembled the call in an app service method and invoke it.
      3. I made sure to configure the end point for the service and the method using the External Service configuration.
    When I execute the CAF core method using a simple Callable Object test client, I get the following error:
    com.sap.caf.mp.base.exception.EngineException: Invalid soap message received
         at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.processComplexTypeMode(SOAPToMessageValueConverter.java:290)
         at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.generateComplexTypeValue(SOAPToMessageValueConverter.java:179)
         at
    truncated.
    I have also captured the XML request/reponse trace using tcpmon :
    REQUEST:
    POST /NWTestExpressWAR/services/TestExpressService HTTP/1.1
    Host: 192.168.99.120:8078
    Content-Type: text/xml; charset=UTF-8
    Content-Length: 348
    SOAPAction: http://www.testsys.com/TestExpressService/getAvailableModels
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:GetAvailableModels xmlns:ns1="http://www.testsys.com/TestExpressService"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
    RESPONSE:
    HTTP/1.1 200 OK
    Server: SAP J2EE Engine/7.00
    Set-Cookie: saplb_*=(J2EE11743000)11743050; Version=1; Path=/
    Content-Type: text/xml; charset=utf-8
    Date: Mon, 04 Dec 2006 02:19:39 GMT
    Transfer-Encoding: chunked
    Set-Cookie: JSESSIONID=(J2EE11743000)ID1261187150DB11296929644926762709End; Version=1; Domain=192.168.99.120; Path=/
    1f3
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><GetAvailableModelsResponse xmlns="http://www.testsys.com/TestExpressService"><modelNames><name>Great Oak Manufacturing-January03 Test</name><name>PriceCheck-default</name></modelNames><errorMessagesReturn/></GetAvailableModelsResponse></soapenv:Body></soapenv:Envelope>
    0
    The only problem I can think off is that the transfer-encoding is marked as chunked which is causing the characters '1f3' and '0' to appear after and before the response and that this is causing the app to crash.
    192.168.99.120 is the server the hosts the WS. It is also a 2004s SP9 server. The client server that hosts the CAF core service is of the same configuration. 8078 is the port I redirect for tcpmon purposes.
    Could anyone shed some light on my problem?
    Thanks,
    Pratap.

    It looks like NW WS client cannot handle Transfer-encoding of chunked even though this is part of HTTP 1.1. What seems to be happening is that the NW WS client is creating a HTTP 1.1 request. The service (axis ws running on NW) seeing this is creating a HTTP 1.1 response w/ chunked encoding. However, the client cannot handle this encoding and barfs. The solution is to change the service to return a HTTP/1.0 response since NW cant handle HTTP 1.1.
    Pratap.

  • How to call a external program in java?

    Help!!
    Is there any method that can a java program can call a external program? For example execute a exe file.
    Thanks.

    Yes.
    Runtime.getRuntime().exec("exactly what you would type at the command line");
    But be aware that this is operating-system-specific and full of gotchas. When you run into one of them, come back to the forum and do a search, this is a frequent topic of discussion.

Maybe you are looking for

  • Best way to Upgrade from 8.1.5 to 8.1.6 rel 2

    What's the best way to upgrade my software? I don't have anything that I can't afford to loose. Do I uninstall 8.1.5 then install 8.1.6 or will 8.1.6 overwrite the previous install? null

  • Is there a way to use a progress bar with Xerces XML Parser?

    My program is parsing very long XML files that take several minutes to parse. I am using Xerces as the parser. I would like to use a progress bar to show the progress, but I haven't found any way to get Xerces to give progress updates. Is this possib

  • Just a simple problem.

    I noticed in the tutorial that when the teacher was creating a walk cycle for the sad potato, the key frame he set at the end would remain the same once he made a keyframe in the middle. This is not the case for me. When I set a keyframe at the end,

  • Syncing Problem (PLZ Help me)

    I have an ipod touch second generation. My C Drive got corrupt and had to format it. So when I installed new itunes(today) and connected my Ipod a message flashed "Ipod can be synced with only one library at a time" So I clicked "Erase And Sync". All

  • Waveform chart to looking like this excel format

    hello, i am using the DAQ assistant.  i configured it to have 9 channels of data. can someone guy me into exporting the data to look like this excel file? how can i take the data from the waveform chart and input it into the RAWDATA STRING so that it