How to call webservice from Java application

Hi XI gurus
Pls let me know how to call a webservice from Java application.
I wanted to build synchronous interface from Java Application to SAP using SAP XI
For example, i need to create Material master from Java application and the return message from SAP, should be seen in Java application
Regards
MD

Hi,
If your  JAVA Application is Web based application, you can expose it as Webservice.
JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
So we can Use SOAP Adapter or HTTP in XI..
If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
If you are dealing with the Webservice and SAP Applications means check this
Walkthrough - SOAP  XI  RFC/BAPI
REgards
Seshagiri

Similar Messages

  • How to call javascript from java application

    How can we call a function written in javascript from java application (core java not applet)? How will java identify javascript?
    Is there any such options ?

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

  • Related documents or links on how to call webservices from WDJ

    Hi all
    i need documents & links on how to call webservices from Webdynpro for Java.
    if anybody send the documents on sample scenarios on the same then it is the great help to me...
    Thanks
    Sunil

    Hi Sunil,
    May these links help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/f289c67c759a41b570890c62a03519/frameset.htm
    http://help.sap.com/saphelp_nwce10/helpdata/en/64/0e0ffd314e44a593ec8b885a753d30/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm
    and  the below thread to call weservices in java.
    Re: How to call a web service from Java
    Regards,
    Supraja

  • How to call a WD JAVA application from a WD ABAP application

    Hi experts,
    Here I have two applications with me. One has been created through WebDynpro ABAP while the other one has been created through WebDynpro JAVA. Now i have to call upon the JAVA aplication from my ABAp application. In other words in need to integrate both the applications so as to have an easy navigation in between them.
    In the whole process I need to take care that the data is not lost from both ABAP or JAVA side.
    Please help me someone knows the solution.
    Regards,
    Kaustubh Maithani

    Hi,
    Usally to run WebDynpro for Java Application, we get the Application URL.
    If you want to call this WebDynpro Java Application from Webdynpro Abap, then create UI element like Link to Action or LinktoURL and give the url as WebDynpro for Java URL.
    Regards,
    Lakshmi Prasad.

  • How to call webservices from ADF page

    Hi,
    I am using ADFBC.
    I want to call webservices from ADF page.please give examples of sample program on how to call a web service from the ADF pages.please give examples.
    please help me.
    Thanks,

    http://marianne-horsch-adf.blogspot.com/2011/03/how-to-create-web-service-based-adf.html
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/70-dependent-listboxes-using-ws-286107.pdf
    http://www.oracleimg.com/technetwork/developer-tools/jdev/adfcomplexwstypes-101013.html
    http://technology.amis.nl/blog/9726/quickly-creating-reploying-and-testing-a-webservice-interface-for-adf-business-components
    http://oracamp.com/passing-parameters-between-web-services-and-jsf-pages

  • How to call xml from java

    Hi
    I want to use xml for updating files in an existing jar . so i want to call xml from java code and then come back to java code and do the remaining work in java code, pl guide me how to do this . what APIs are helpful for this regard
    Thanks

    You can't update files in a jar. Even if you could, you wouldn't use XML for that. You don't call XML. XML is not a programming language. So, basically your entire question is misguided.

  • How to call a AWT java application from TELNET ?

    Dear All,
    I've created a java Application using AWT, can anyone advise how it could be called using TELNET.
    Thanks in advance,
    Best regards,
    Lana

    Additionally, multi-posted to the Java Mobile sub-forum of this OTN site, as well.
    How to create a java application & call it from a PDA via TELNET
    Your impatience is your issue, not anyone else's.

  • How to call webservice using standalone application

    Hi,
    Actually i am trying to connect with one free webservice using client. but i am uanble to get the result and it is throwing the Exception.Exception is Execution failed. Exception: java.net.ConnectException: Connection timed out: connection reset
    i am using the following code.
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import org.apache.axis.utils.Options;
    import javax.xml.namespace.QName;
    import java.io.*;
    public class AddFunctionClient {
    public static void main(String [] args) {
    try {
         String endpoint = "http://www.startvbdotnet.com/web/sample2.asmx?wsdl";
         System.setProperty("http.proxyHost", proxyHost);
              System.setProperty("http.proxyPort", portNumber);
         Service service = new Service();
         Call call = (Call) service.createCall();
         call.setTargetEndpointAddress( new java.net.URL(endpoint) );
         call.setOperationName(new QName(endpoint, "add"));
              System.out.println("connected");
              System.out.println("value is"+call.invoke(new Object[]{new Integer(10),new Integer(20)}));
         } catch (Exception e) {
         System.err.println("Execution failed. Exception: " + e);
    can any one help on this

    Hi,
    If your  JAVA Application is Web based application, you can expose it as Webservice.
    JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
    So we can Use SOAP Adapter or HTTP in XI..
    If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
    If you are dealing with the Webservice and SAP Applications means check this
    Walkthrough - SOAP  XI  RFC/BAPI
    REgards
    Seshagiri

  • How to call webservices function - java importer 6i -Duncan?

    I've imported methods of a webservice from salcentral following instructions in otn.
    Now I need to figure out how to call the resulting function in forms
    Here is the function, the pl/sql error is wrong number or type of arguments
    Anyone done this and know how to get the function signature correct?
    I want to call checkemail
    PACKAGE BODY MXCheckerStub IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    cls ORA_JAVA.JCLASS;
    fid ORA_JAVA.JFIELD;
    mid ORA_JAVA.JMETHOD;
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('mypackage/MXCheckerStub');
    mid := JNI.GET_METHOD(FALSE, cls, '<init>', '()V');
    args := NULL;
    RETURN (JNI.NEW_OBJECT(cls, mid, args));
    END;
    -- Method: CheckEmail (Lorg/w3c/dom/Element;)Ljava/util/Vector;
    FUNCTION CheckEmail(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('mypackage/MXCheckerStub');
    mid := JNI.GET_METHOD(FALSE, cls, 'CheckEmail', '(Lorg/w3c/dom/Element;)Ljava/util/Vector;');
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, JNI.GET_CLASS('org/w3c/dom/Element'));
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;

    I would try to take an aproach where I'll generate a stub for the WSDL in JDeveloper, and also write a
    Java class that calls this stub and return a simple variable (String, int, or boolean).
    Then I would call this class from Forms.
    I believe this would make it easier.

  • How to call webservices from IDM

    Hi,
    can anyone provide some documents how to call a web service from IDM 7.1
    Thanks in Advance
    Regards,
    mary

    There is an easy way to do it. Just use JavaScript and Java based webservice.
    Copy the webservice jar in location where the IDM console is located.
    Add path to jar file in IDM console configuration.
    If your webservice looks like this:
    Import jar in your JavaScript code like this:
    Execute it like this:
    Best Regards,
    Ivan

  • JDeveloper Team - How to print Barcodes from java application

    We are developing an Inventory based application in JDeveloper 3.2.2/Oracle 8i/Netscape Enterprice web server on Windows NT platform. The application is developed in swing technology.
    We have to print Barcodes on Intermec 3400/4100 or Zeebra Z4000 (connected to COM1/COM2) from our java application from one of our screens.
    Can you please point me to right place or get me sample source how to achieve this. We are working on a timebound deadline and we are really counting on your sincere response ASAP. Thanks in advance.
    VR
    null

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

  • How to call dll from Java

    Hi everybody,
    I am trying to call a dll from my java application. Pls tell me how to do it, I seached and found JNI. Is it true
    pls help me and send me some examples
    Thank you and have a nice day

    java_and_me wrote:
    I am trying to call a dll from my java application. Pls tell me how to do it, I seached and found JNI. Is it trueYes, it is true. JNI is the way to go. You'll probably have to write some C code on your own as well, as the DLL is unlikely to be in the format expected by Java already.
    pls help me and send me some examplesOf course. [Here you are|http://www.lmgtfy.com/?q=JNI+tutorial].

  • How to call webservice using java client

    Hi,
    I am new to webservice related stuff.Can any body help me.
    How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
    Thanks
    venuj

    user10394151 wrote:
    Hi,
    I am new to webservice related stuff.Can any body help me.
    How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
    Thanks
    venujTry this simple webservice client.
    You will need apache-axis.jar in your classpath. The following client is apache axis based. A similiar client can be built also using the JAX-WS only[without apache-axis.jar].
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    public class WEBSERVICE_CLIENT{
    public static void main(String [] args) {
    try {
    String endpoint ="<YOUR WS ENDPOINT>";
            Service  service = new Service();
            Call     call    = (Call) service.createCall();
            // YOU CAN SET VARIOUS PROPERTIES IN THE "CALL" OBJECT...LIKE
            // USERNAME,PASSWORD,PROPERTIES OF HTTP HEADER. SEE "CALL" OBJECT'S API FOR MORE PROPERTIES.
            call.setTargetEndpointAddress( new java.net.URL(endpoint) );
            call.setOperationName(new QName("<YOUR WS SERVICE NAMESPACE>", "<WS SERVICE TO BE INVOKED>"));
            String msg = (String) call.invoke( new Object[] { "data" } );
            System.out.println("RETURNED MESSAGE : "+msg);
          } catch (Exception e) {
            System.err.println(e.toString());
    }

  • How to access .asmx from java application

    Hi All,
    I want to access .asmx file using java application. I am using Eclipse IDE and created
    some samples from this url: http://www.eclipse.org/webtools/jst/components/ws/M5/tutorials/BottomUpWebService.html
    I got the Soap request and response format from wsdl file. But, i don't know access
    the .asmx file. If u have any samples or give some suggestions that will be helpful for me to
    proceed

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

  • How to call transaction from webdynpro application

    Hi Experts,
    I have a web dynpro component zxx_comp.its corresponding web dynpro application zxx_app.
    my requirement is , when i test the webdynpro application, i have to call a transaction zxx_txn corresponds to the module pool program zxx_pgm  directly . How can i do that?
    Regards
    Ashwin KV

    Hi Ashwin,
    Use the following to open a T-Code from WD application.
    CALL METHOD cl_http_server=>if_http_server~get_location
    IMPORTING
      host = lv_host
      port = lv_port
      out_protocol = lv_protocol.
    DATA lv_url type string.
    concatenate lv_protocol  '://' lv_host  ':' lv_port  '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction='zxx_txn' into lv_url.
    DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
    lo_window_manager->create_external_window(
         EXPORTING
           url    = lv_url
         RECEIVING
           window = lo_window ).
    Regards,
    Harsha

Maybe you are looking for

  • Using a variable with "tell application"

    I'd like to use a variable (app_name) with "tell application" in the following function: on getAdobeDoc(app_name) tell application app_name tell current document return (name as Unicode text) end tell end tell end getAdobeDoc but I'm getting the foll

  • How to send an e-mail?

    Hi. I'd be very happy if someone can help me. I'm developing a desktop application in (J2SE). Because of better debugging it would be very useful to send an "Error message" to my e-mail whenever an exception occures. How can I do that?

  • Required "Ledger" parameter in FSG submission form

    Hello friends, As you know, we can generate FSG report across ledger (across SOB in 11i) and consolidate financial statement across ledger. Generally, we may set up different ledger for different report column in column definition. But in R12, there'

  • Revealing / Hiding DIVs Not Working

    Howdy, on one of my pages I used getelemntbyid to reveal and hide DIVs. It works perfectly in that page. I want to make a page that uses the same structure but different content, so I copied the entire page code into a new document, so I had a duplic

  • Syntax Errors - 30025 and 30008

    Hi there, I'm in urgent need of some assistance! For some reason, and I say that because I don't know why I'm getting these errors today and I didn't when I closed the document yesterday. However, I am getting these syntax errors  see picture. Let me