Call a web service in java (JDeveloper)

Hello everyone,

I'm working on a project for my studies of computer science (@University of Freiburg, Germany).
I want to call another student web service. I need the other web service as input for my own calculation. (Customer Lifetime Value j4i :)) Unfortunately, I couldn't find tutorials or other help in the web. So I hope you guys could help me.

Basically, I'm looking for a small piece of code in java or a tutorial, that calls a web service to exsiting. Code Java would be particularly useful, since my work is written in java (and later deployed by JDevelloper as a web service). I found a few tuts on service control over the sites of the Oracle, but I do not know how to work with the ctrl files either.

Greetings,
Sebastian

http://www.Oracle.com/technology/OBE/obe11jdev/11/WS/WS.html#T5

Tags: Java

Similar Questions

  • ADF Mobile | call web service from Java. non-reflecting values in the AMX page

    Hi all

    I am using JDEv11124 with ADF Mobile extensions39.62.64.

    My use case is as follows.

    1. my application has 2 Pages a. Login home b.

    2. in the user login Page between user name and click on the "submit" button.

    3. on the homepage I displayed the company they joined.

    4. in the "submit" button is clicked, action defined in the support bean method will be called.

    5. by supporting the action bean method, I'll call the method of the Web Service to validate the entered user name, if the entered user name is valid, that I have to post its company name in the home page.

    6. I am moving back from the web service of datacontrol in Home.amx page

    7. calling web services from Java as follows:

    GenericType = result

    (GenericType) AdfmfJavaUtilities.invokeDataControlMethod ("Comp", null, "getCompany",

    pNames, params,

    PTypes);

    System.out.println ("after the call to the service" + result.getAttributeCount ());

    8. in the Java class, I get the response correctly (as the company designating the username entered as 'SOCIETY'), where when I navigate to the home page, I don't see any results for the method return (name of the company that dropped like OutputText in Home.amx)

    Did I miss something for this. or something more that I need to do to make it work?

    Please suggest.

    Thank you

    Vieira

    Hi all

    I was able to achieve this by executing my method in bean support.

    This code is as follows:

    AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext ();

    MethodExpression me =.

    () AdfmfJavaUtilities.getMethodExpression

    "#{bindings.retreiveLocationInformation.execute}".

    (, Object.class, Class [] {}) new;

    me. Invoke (adfELContext, new Object [] {});

    Thanks to Luc Bors WebLog Luc Bors Weblog: ADF Mobile: implementation of "Pull to refresh" model

    Kind regards

    Vieira

  • My native BB app, how to connect to the remote URL and call a Web service method to retrieve the XML base result using Eclipse Version 3.7.2

    Hello

    I am new to the development of native applications from BB using JDE. I'm testing Simulator. From my native BB app, I connect a remote URL and call a Web service method to extract some basic result XML.

    I need to write a login code remote URL to achieve? If so, how?

    So, how can I use this connection object to call the Web service from this URL remotely.

    Please help me out of it...

    Many thanks in advance...

    What i am doing is, On clicking the "Login" button i want to call the webservice method like below mentioned code...
    Here WaveServices is a class and getAllCinemas() is a static method inside which a webservice method call is made..
    
    loginButtonField.setChangeListener(new FieldChangeListener() {
                public void fieldChanged(Field paramField, int paramInt) {
                    WaveServices.getAllCinemas();
                }
            });
    

    Indeed, the question was raised and answered here:

    http://supportforums.BlackBerry.com/T5/Java-development/from-my-native-BB-application-how-to-connect...

  • Call the web service with Digest authentication

    Hello

    I JDevelper 12.2.4, I need build the java class to call the web service with Digest authentication.

    Any suggestion?

    Refer to:

    http://StackOverflow.com/questions/14896324/consuming-WCF-service-with-Digest-authentication-from-Java

  • problems with the XML that is returned when you call a web service with CF11

    Hi, I ran into an unusual behavior when calling web services.

    I call a web service that returns an XML like this:

    < children >

    < child >

    John < firstname > < / name >

    DOE < name > < / lastname >

    < / child >

    < / children >

    during the call to the web service of CF10, it works fine. However, when the CF11, I don't get this:

    < child >

    John < firstname > < / name >

    DOE < name > < / lastname >

    < / child >


    no < child >? for some reason, CF11 ignores / hides the highest level XML. This does not happen on previous versions. Why? the server that hosts the web service's CF11 too.

    Report it as a bug in Coldfusion. In any case, I recommend making sure your web service returns a string, not an XML object.

    This is because a web service must be universal. Appellants to .NET, Java, PHP, ASP and so on, will interpret a chain exactly the same way. Whereas an object XML Coldfusion is a construction that is heard only in CFML.

    Your return string should also start with the XML declaration, like this

    John

    DOE

    So it is clear to the appellant in which brought the cat.

  • Call to Web Service of Oracle PL/SQL not to call the Web service in SOA Server

    Hello

    Try to call the Web service to oralce pl/sql function

    created a function

    Unable to invoke the web service from the server of the SOA.

    CREATE or REPLACE FUNCTION HelloWorld_WebServices(S_STRING Varchar2) RETURN VARCHAR2 as

    Server sys.utl_dbws. SERVICE;

    APPEL_ sys.utl_dbws. CALL;

    service_qname sys.utl_dbws. QNAME;

    port_qname sys.utl_dbws. QNAME;

    response sys. XMLTYPE;

    application sys. XMLTYPE;

    BEGIN

    sys.utl_dbws.set_http_proxy ("hostname: Port'");

    service_qname: = sys.utl_dbws.to_qname ("ns1", "process");

    Server: = sys.utl_dbws.create_service (service_qname);

    APPEL_: = sys.utl_dbws.create_call (server);

    sys.utl_dbws.set_target_endpoint_address (APPEL_, ' http:/host name: port/soa-infra/services/OFS/HelloWorld/helloworld_client_ep ');

    sys.utl_dbws.set_property (APPEL_, 'OPERATION_STYLE', 'process');

    asks: = sys. XMLTYPE ("< ns1:process xmlns:ns1 ="http://xmlns.oracle.com/OFSOrderServices/HelloWorld/HelloWorld"> < ns1:input > < / ns1:input > < / ns1:process > '"); 

    answer: = sys.utl_dbws.invoke (APPEL_, request);

    return response.extract('//HelloWorld/child::text() ','http://xmlns.oracle.com/OFSOrderServices/HelloWorld/HelloWorld'). getstringval(); 

    DBMS_OUTPUT. Put_line ("values of the OutputsVariables8");

    -Of return ';

    END;

    Run - the code below:

    Select HelloWorld_WebServices ('Hi') to double;

    Error:

    ORA-29532: Java call terminated by eception Java exception: java.lang.NoClassDefFoundError

    ORA-06512: at "SYS." UTL_DBWS', line 403

    ORA-06512: at "SYS." UTL_DBWS', line 400

    ORA-06512: at the 'APPS '. HELLOWORLD_WEBSERVICES', line 74

    29532 00000 - "Java call terminated by eception Java exception: %s."

    * Cause: A mistake or a Java exception has been reported and could not be

    solved by Java code.

    * Action: Modify Java code, if this behavior is not expected.

    Hello

    Fixed the error

    After loading once again of DBA and network provided access files JAR/JVM firewall

    and the correction on the threshold

    Return response.extract (' / result/child::text () ','xmlns = "http://xmlns.oracle.com/OFSOrderServices/HelloWorld/HelloWorld" '). getstringval();

  • call a Web Service of JavaFX running als WebStart to incorporate in a browser or

    Call a Web Service from a JavaFX running as an application all right.

    Wenn execute the same JavaFX as integrate WebStart or browser, I get a runtime exception:

    =================================

    Java plug-in 10.7.2.10
    JRE-Version use 1.7.0_07 - b10 Microsoft Client Java VM
    Benutzer-home-Verzeichnis = C:\Users\Olaf
    ----------------------------------------------------
    c: Konsolenfenster löschen
    f: objects in Finalisierungs-tail finalisieren
    g: garbage collection
    h: sharp Hilfemeldung ads
    l: class Loader-list ausgeben
    m: Speicherauslastung print
    o: logging auslosen
    q: Konsole ausblenden
    r: policy configuration loaded neu
    s: System-und deployment-Akbulak ausgeben
    t: Threadliste ausgeben
    v: the ausgeben thread stack
    x: Class-Loader-Cache leeren
    0-5: trace-ebony auf < n > set
    ----------------------------------------------------
    Correspondence: beginTraversal
    Match: digest selected JREDesc: JREDesc [version 1.6 +, heap =-1-1, args = null, href = http://java.sun.com/products/autodl/j2se, salt = false, null, null], JREInfo: JREInfo of index 0:
    the platform is: 1.7
    product: 1.7.0_07
    location: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files (x86)\Java\jre7\bin\javaw.exe
    args is:
    is native platform: Windows x 86 (x 86, 32-bit)
    JavaFX runtime is: JavaFX 2.2.0 found at C:\Program Files (x 86) \Java\jre7\
    the Enabled argument is: true
    saved is: false
    system is: true

    Match: ignoring maxHeap:-1
    Match: ignoring InitHeap:-1
    Match: digestion vmargs: null
    Match: digested vmargs: [JVMParameters: isSecure: true, args:]
    Match: JVM args after accumulation: [JVMParameters: isSecure: true, args:]
    Match: Digest LaunchDesc: file:/C:/Users/Olaf/Documents/NetBeansProjects/JavaFXApplication4/dist/JavaFXApplication4.jnlp
    [Match: Digest properties:]
    Match: JVM args: [JVMParameters: isSecure: true, args:]
    Match: endTraversal...
    Match: JVM args final:
    Correspondence: Correspondence of Running JREInfo Version: 1.7.0.07 == 1.7.0.07
    Match: Running JVM args match: I: <>satisfy fault: <>
    CacheEntry[file:/C:/Users/Olaf/Documents/NetBeansProjects/JavaFXApplication4/dist/JavaFXApplication4.jar]: updateAvailable = true, lastModified = Tue Sep 04 21:16:35 CEST 2012, length = 39432
    java.lang.ExceptionInInitializerError
    at com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver (unknown Source)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL (unknown Source)
    to com.sun.xml.internal.ws.client.WSServiceDelegate. < init >(Unknown Source)
    to com.sun.xml.internal.ws.client.WSServiceDelegate. < init >(Unknown Source)
    at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate (unknown Source)
    to javax.xml.ws.Service. < init >(Unknown Source)
    to javafxapplication4.ws.NewWebService_Service. < init > (NewWebService_Service.java:42)
    to javafxapplication4. JavaFXApplication4.start (JavaFXApplication4.java:25)
    to com.sun.javafx.applet.FXApplet2$ 1.run(FXApplet2.java:131)
    to com.sun.javafx.application.PlatformImpl$ 4.run(PlatformImpl.java:173)
    at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)
    in com.sun.glass.ui.win.WinApplication.access$ 100 (WinApplication.java:29)
    to com.sun.glass.ui.win.WinApplication$ $2 1.run(WinApplication.java:67)
    at java.lang.Thread.run (unknown Source)
    Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" 'xml.catalog.ignoreMissing', 'read')
    at java.security.AccessControlContext.checkPermission (unknown Source)
    at java.security.AccessController.checkPermission (unknown Source)
    at java.lang.SecurityManager.checkPermission (unknown Source)
    the impossible (unknown Source)
    the impossible (unknown Source)
    to com.sun.org.apache.xml.internal.resolver.CatalogManager. < init >(Unknown Source)
    to com.sun.org.apache.xml.internal.resolver.CatalogManager. < clinit >(Unknown Source)
    ... 14 more
    ======================================================

    Any hint for me.

    THX

    OLAF

    Sign your application.

    http://docs.Oracle.com/JavaFX/2/deployment/deploy_overview.htm#CEGJGHDA

  • Calling a web service using SSL from a client that runs as a web application.

    I have the keystore containing the certificates to call a web service through a two-way ACE by using SSL. If I create a stand-alone java application and using the following parameters, I'm able to hit the web service:

    System.setProperty("javax.net.ssl.keyStore","C:/bea/JDK150~1/jre/lib/security/SFCRM.jks");
    System.setProperty ("javax.net.ssl.keyStorePassword", "changeit");
    System.setProperty("javax.net.ssl.trustStore","C:/bea/JDK150~1/jre/lib/security/SFCRM.jks");
    System.setProperty ("javax.net.ssl.trustStorePassword", "changeit");

    Also, if I use these same 4 lines of code in my web application to call the web service, I successful as well.

    The problem is, in the real world, you can't hardcode your keystore/truststore path access and password in your application like this.

    What is the right way to configure these client parameters? I do somewhere in the logical Web administration console? I tried to configure the Keystore and SSL tabs for my server using the administration console, but he can't seem to find the private key file. I get an exception that is prohibited by the web service as soon as I leave the System.setProperty lines.

    The tab of keystore, I use a Custom Keystore and Java Standard Trust store. My custom identity keystore path is C:/bea/JDK150~1/jre/lib/security/SFCRM.jks, type jks keystore, and I updated the password changeit. On the SSL tab, I've specified the alias of the private key to use for the web service as well as the password (there is no password, so I put in changeit, the keystore password).

    It does not work. I even tried using a Custom Keystore and trust stores custom and by setting the C:/bea/JDK150~1/jre/lib/security/SFCRM.jks path for both. Still does not work.

    I have a feeling that these tabs are intended for the configuration server SSL only.

    How to set the path of the keystore for customers running as web apps on my web server of logic?

    SSL-> advanced

    Use server certificates:

    "Determines whether the customer should use server certificates/keys as the identity of the client during the initialization of a connection via https."

  • How to call the web service?

    Hello

    I want to know how to call the web service from my application HTML5 & javascript.

    Please help me find this detail as what I can access easily. and I want to access web services online (a method of it) I'm not concered with how background Web service takes place.

    I just want that when you call a web service method, I will return the result.

    Please try this out for a WebService call

    var xmlhttp;
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("get","your url",true);
    xmlhttp.setRequestHeader("Accept","application/json");
    xmlhttp.setRequestHeader("Content-type", "application/json");
    xmlhttp.onreadystatechange=function() {
     if (xmlhttp.readyState==4) {
      if (xmlhttp.status == 200) {
        console.log(xmlhttp.responseText);
      }
     }
    }
    xmlhttp.send();
    

    This will display the result of the invocation of webservice. The url is the application that you deploy and the type can be get/post. If xmlhttp.send (post) takes argument for the display of the data. You can call it by clicking a button in HTML.

  • Call SOAP Web Service using UTL_HTTP vs APEX_WEB_SERVICE. MAKE_REQUEST

    Dear all,

    When I call the SOAP using APEX_WEB_SERVICE Web services. MAKE_REQUEST, so I'm able to get the response from the web service. Character, however all the German are replaced by those of the JUNK. However the data just fine when I test web services using SOAP UI.

    To resolve this problem, I tried to call the web service using UTL_HTTP. However when I use UTL_HTTP, then I get following error.

    ORA-24247: access denied by network access control list

    Can someone advise me...

    < Li > why German characters are replaced with the data side when calling WebService from APEX, while it works very well in SOAP UI
    < Li > when can I access web service successfully using APEX_WEB_SERVICE, then why he throws error ORA-24247 when I call using UTL_HTTP?


    DB: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    APEX: 4.0.2.00.07
    Web server: EPG
    SELECT * FROM NLS_DATABASE_PARAMETERS;
    
    PARAMETER                      VALUE                                  
    ------------------------------ ----------------------------------------
    NLS_LANGUAGE                   AMERICAN                                 
    NLS_TERRITORY                  AMERICA                                  
    NLS_CURRENCY                   $                                        
    NLS_ISO_CURRENCY               AMERICA                                  
    NLS_NUMERIC_CHARACTERS         .,                                       
    NLS_CHARACTERSET               AL32UTF8                                 
    NLS_CALENDAR                   GREGORIAN                                
    NLS_DATE_FORMAT                DD-MON-RR                                
    NLS_DATE_LANGUAGE              AMERICAN                                 
    NLS_SORT                       BINARY                                   
    NLS_TIME_FORMAT                HH.MI.SSXFF AM                           
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM                 
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR                       
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR             
    NLS_DUAL_CURRENCY              $                                        
    NLS_COMP                       BINARY                                   
    NLS_LENGTH_SEMANTICS           BYTE                                     
    NLS_NCHAR_CONV_EXCP            FALSE                                    
    NLS_NCHAR_CHARACTERSET         AL16UTF16                                
    NLS_RDBMS_VERSION              11.2.0.1.0                               
    
     20 rows selected
    Kind regards
    Hari

    The solution was...

    I just put following line before making the call to the web service by using APEX_WEB_SERVICE. MAKE_REQUEST.

    /*In my case DB character-set is AL32UTF8, so I set it to UTF-8. */
    
    UTL_HTTP.SET_BODY_CHARSET ('UTF-8');
    

    More information see SET_BODY_CHARSET procedures

    If I do not set this, it uses the as ISO-8859-1 character set, which is the cause of my problem.

    Kind regards
    Hari

  • the initialization of a variable in a bpel workflow to call another web service

    Hello

    I'm fairly new development bpel. I don't have a early created myself but unfortunately, I only got to work on existing projects from now on. I am wanting to add an invocation of another web service to an existing bpel service. I added the wsdl for .bpel and composite.xml files info, and I can see the operations, so my plan is to see the service properly, and I created the necessary links.

    I just need to initialize the variables that I'm passing on this web service. Basically need to invoke the web service passing in xml format that would go into these elements:

    < ns1:dataRequest >
    < ns1:appName > < / ns1:appName >
    < ns1:progName > < / ns1:progName >
    < ns1:valueUsed > < / ns1:valueUsed >
    < ns1:setting > < / ns1:setting >
    < / ns1:dataRequest >

    Can someone just point me in the right direction on this. I think I need to create a new .wsdl file that I've read so far, but I have a lot of time looking for this problem - it is low on my priorities. So I thought that it might accelerate things to go ahead and ask here before I dive into it later.

    Thank you

    Hello

    As far as I get your situation is you want to call a web service from BPEL process existing. Here are the steps that you can follow.

    (1) create a partner link in the BPEL process that calls the external Web service.
    (2) create an activiyt to invoke in BPEL process that invokes the foregoing created partner link
    (3) create an Assign activity that initializes the variable which is an entry to invoke activity.

    Let me know if you have confusion with this approach.

    Thank you
    AJ

  • Matter of business for OSB 10.3.1 when to call the web service from SAP ECC 710

    Hello

    1. I was a unit test for a business service that calls a web service from SAP ECC 710 (this service is published directly to a RFC function via SOA Manager module);

    2. the problem is when I use the OSB test console, which generates the request below message:

    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    * < soap: Header xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > *.
    * < / soap: Header > *.
    < soapenv:Body >
    < xmlns:urn urn: Zmmjf503 = "urn: sap - com:document:sap:soap:functions:mc - style" >
    string of < ContractInfo > < / ContractInfo >
    < / urn: Zmmjf503 >
    < / soapenv:Body >
    < / soapenv:Envelope >

    the response message is:
    < SOAP - env:Envelope xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope/" >
    < SOAP - env:Header >
    < n0:MessageID = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:n0 >
    UUID:4cbe5b84 - 474 c-9abe-e100-00000ad00164
    < / n0:MessageID >
    < n1:Action SOAP - env:mustUnderstand = "1" xmlns:n1 = "http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope" / >
    < / soap - env:Header >
    < SOAP - env:Body / >
    < / soap - env:Envelope >


    Above the response indicates that the BS called SAP Web server successfully, but seems that the service did not get the request message.

    3. the Web service can be called successfully through SoapUI. and I checked the soapUI request message; and it can work if I just change the request:

    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    * < soap: Header = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap > < / soap: Header > *.
    < soapenv:Body >
    < xmlns:urn urn: Zmmjf503 = "urn: sap - com:document:sap:soap:functions:mc - style" >
    string of < ContractInfo > < / ContractInfo >
    < / urn: Zmmjf503 >
    < / soapenv:Body >
    < / soapenv:Envelope >

    and I got the right answer:
    < SOAP - env:Envelope xmlns:soap - env = "http://schemas.xmlsoap.org/soap/envelope/" >
    < SOAP - env:Header / >
    < SOAP - env:Body >
    < n0:Zmmjf503Response xmlns:n0 = "urn: sap - com:document:sap:soap:functions:mc - style" >
    < Recmsg > <! [CDATA [<? xml version = "1.0" encoding = "utf-8"? > < DocumentResponse > < CONDITION > 0 < / STATE > < HTBH > < / HTBH > < MESSAGE > < / MESSAGE > < / DocumentResponse >]] > < / Recmsg >
    < / n0:Zmmjf503Response >
    < / soap - env:Body >
    < / soap - env:Envelope >

    4 it bother me, because the only difference between the above two request messages is the header (one contains a "newline"):
    ------------------------------------------------------------------------------------------------------------------------------
    * < soap: Header xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > *.
    * < / soap: Header > *.
    -------------------------------------------------------------------------------------------------------------------------------
    VS
    --------------------------------------------------------------------------------------------------------------------------------------
    * < soap: Header = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap > < / soap: Header > *.
    ----------------------------------------------------------------------------------------------------------------------------------------

    5 I thought that the SOAP engine should ignore "carriage returns", seems this is a problem of SAP ECC710.

    Do you have someone having this problem? Thank you


    Concerning
    Wen

    Hello Wen,

    I tried to use exactly the same request (carriage return) to call the service through soapUI, and it does not work... just like BS OSB
    should I assume that it is a matter of SAP ECC?

    That same demand also doesn't SOAPUI so certainly it's an issue with SAP ECC. I doubt that SAP ECC is the treatment the carriage return as an end of file marker. Check with support.

    Kind regards
    Anuj

  • Using CFHTTP to call a web service

    We use a CF5 server and will not update to MX anytime soon. I need to call a web service and understand that I can do that with CFHTTP. Can someone direct me to any docs or give me examples of how to do that?

    Answered my own question. The problem I had was returning complex data types. CFHTTP. FILECONTENT actually returned as WDDX MX web service, so I was able to use the CFWDDX tag to transform a structure of SOAP in a CF structure, and it works perfectly.

  • How to get started with consuming java Web services from WSDL - JDeveloper 11.1.1.7

    Hi all

    I developed a SOAP based WebService (JAX - WS) for product information. I deployed on stand-alone Weblogic server and the resulting WSDL file generated.

    In the ADF, we totally 3 options to work with the WSDL file.

    1 web Service DataControl (which will directly create a DataControl to access services exposed by Web service through WSDL)

    2 web Service proxy. (A proxy for the Web service of the Fund and offers to the client to interact with the exposed services)

    3. Java Web Service WSDL.

    From these 3 options, I am aware of the first two options. But on the way to the 3rd point or Java Web Service from WSDL, I'm not in a position to know. in what scenario, we will use this service.

    Now I have created the java web services starting from the WSDL. After generating the files of the project structure is as below.

    Please let me know where to start to interact with my application services. (We must separate class DC or any other way to interact)

    otn.PNG

    Please let me know your inputs on this. valuable suggestions would be appreciated.


    Thank you and best regards,

    Miko Auntie.

    Hi all

    On top of the implementation class (ProductsSEIImpl.java), we have an option called create a Client for the Web Service Annotations.

    This is the right option to choose, so that the client Classes get generated pertaining to this service. Of the client class, we can access the services available?

    Please comment on this if I depart.

    Thank you best regards &,.

    Miko Auntie.

  • How to get the IP address of the calling client to the web service built in Jdeveloper 11.1.1.7 application?

    I built an application of web service in Jdeveloper 11.1.1.7 to be used by other clients. Just the General steps as follows (Server web service Application is generated--> deployed on the server-> used by clients with the location of the WSDL file).

    Now, I met a requirement where I need to get the port number and IP address for the client.

    Questions :

    How to get the IP address of the calling client to the web service application generated in Jdeveloper?

    Commune technologies used to build web service applications is AXIS or CXF. What Jdeveloper technology use to built web service application?

    The common technologies used to build web service applications is AXIS or CXF. What Jdeveloper technology allows built web service application?

    It depends on the option selected during the creation of web services (if I remember correctly, there are several options, style J2EE 1.4 RPC style JavaEE JAX - WS 1.5,...)

    For example, to get the ip address of the compatible with jax - ws web service, you need to inject the context in your service class with:

    @Resource
    WebServiceContext wsContext;
    

    and then inside your method:

    MessageContext mc = wsContext.getMessageContext();
    HttpServletRequest req = (HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST);
    String ip = req.getRemoteAddr();
    

    Dario

Maybe you are looking for