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

Tags: Java

Similar Questions

  • How to get the web client to refresh its point of view of the deployment of openstack

    Hello

    I had a problem with my MariaDBs which caused Violence to fail to start after his stop. The webclient service displays a message that failed "bootstrap" and newspapers showed that the databases where failing to start. I got data bases and went 'vioconfig start' of the converted VIO openstack starting towards the high fine. IM able to connect to the dashboard and perform all tasks as before so, everything seems to work very well. However the webclient service always shows VIO in a State with the "bootstrap" of initial start error and error. How can I get the webclient service to acknowledge that Violence now is working well?

    Hello

    Here are the steps to synchronize the user interface with the backend.

    1 > please use the user interface to start and stop the Openstack and avoid using CLI tool (because the tool doesn't have sync the database)

    2 > if you do not have to use the user interface to start the deployment (generally, it was caused by the inconsistent database), then you can manually recovered databases.

    3 > using the method as Arvind suggested but instead of changing the status of 'RUNNING', please change it to "STOPPED".

    4 > then come to the user interface to use the user interface to start the cluster.

    Hereby you will have everthing sync upward.

    Kind regards

    Yixing.

  • Workstation 9 - How to get the Web Interface

    As published in this thread: http://communities.vmware.com/message/2045995 but for VMW8, I can not access or find information in the manual on how to access the web interface of 'New' in VMW9?

    Any tips?

    Thank you!

    The WSX server for 9 Workstation is a separate download and install, see https://my.vmware.com/group/vmware/details?downloadGroup=WKST-900-WIN&productId=293&rPId=2920

    See also the configuration and usage WSX in VMware Workstation.

    -Andreas

  • How to access the web service from Oracle?

    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0

    I'm making a call to a web service through a procedure/function...

    I tried to use
    CREATE OR REPLACE PROCEDURE Call_Rest_Webservice
    
     AS
    
      t_Http_Req Utl_Http.Req;
    
      t_Http_Resp Utl_Http.Resp;
    
      t_Request_Body VARCHAR2(30000);
    
      t_Respond VARCHAR2(30000);
    
      t_Start_Pos INTEGER := 1;
    
      t_Output VARCHAR2(2000);
    
    BEGIN
    
      /*Construct the information you want to send to the webservice.
      
      Normally this would be in a xml structure. But for a REST-
      
      webservice this is not mandatory. The webservice i needed to
      
      call excepts plain test.*/
    
      t_Request_Body := 'the data you want to send to the webservice';
    
      /*Telling Oracle where the webservice can be found, what kind of request is made
      
      and the version of the HTTP*/
    
      t_Http_Req := Utl_Http.Begin_Request('**webservice address**',
                                           'GET',
                                           'HTTP/1.1');
    
      /*In my case the webservice used authentication with a username an password
      
      that was provided to me. You can skip this line if it's a public webservice.*/
    
      --Utl_Http.Set_Authentication(t_Http_Req, 'username', 'password');
    
      /*Describe in the request-header what kind of data is send*/
    
      Utl_Http.Set_Header(t_Http_Req, 'Content-Type', 'text/xml charset=UTF-8');
    
      /*Describe in the request-header the lengt of the data*/
    
      Utl_Http.Set_Header(t_Http_Req, 'Content-Length', Length(t_Request_Body));
    
      /*Put the data in de body of the request*/
    
      Utl_Http.Write_Text(t_Http_Req, t_Request_Body);
    
      /*make the actual request to the webservice en catch the responce in a
      
      variable*/
    
      t_Http_Resp := Utl_Http.Get_Response(t_Http_Req);
    
      /*Read the body of the response, so you can find out if the information was
      
        received ok by the webservice.
      
        Go to the documentation of the webservice for what kind of responce you
      
        should expect. In my case it was:
      
        <responce>
      
          <status>ok</status>
      
        </responce>
      
      */
    
      Utl_Http.Read_Text(t_Http_Resp, t_Respond);
    
      /*Some closing?1 Releasing some memory, i think....*/
    
      Utl_Http.End_Response(t_Http_Resp);
    
    END;
    But it's me ORA-29272: HTTP request failed
    ORA-06512: at "SYS." UTL_HTTP", line 1029
    ORA-12545: Connect failed because target host or object does not exist

    But I can connect to the web server by going on * webservice address * through my browser.

    Is there an ACL must be open in order to have this capacity? I asked my s/n, but she asked me that I will need to give its name to username/password / ip in order to open an ACL...
    However there is no name to username/password required during a tour of the web service...

    Any help would be much appreciated...

    Thank you

    Published by: 986006 on March 4, 2013 08:38

    Y.L wrote:

    This is because the database could not connect to the specified server. Bad host name or IP address specified. Inability to resolve the hostname to an IP address. Firewall blocking. Etc.

    The host name, I put here can be visit through my browser. I think that it is not question of the host server... So, it could be a firewall on my side of the database which must be opened in order to visit the host?

    The "web browser" (your PL/SQL using UTL_HTTP code) code is running on the Oracle database server. He needs the same type of network access that has your browser on your PC. (firewalls open, authentication of the proxy if necessary, etc.).

    On 11g. Not on 10g.

    I saw the code example you post from the link you provided... those who only works on 11 g?
    If we can work on 10g, which package or what are the steps I need to follow in order to have that works on me?

    The code I posted works on both versions. My comment was regards the ACLs. No ACLs exist on 10g. If you only need to execute privs on the affected packages (e.g., UTL_HTTP, etc.).

    ACL were introduced with 11g - 11g, you also need the ADMINISTRATOR to create an ACL for you which will allow access to the UTL_HTTP network so now.

  • How to use the web service to update the data?

    Hi team,

    Need help in establishing a procedure for updating data using the web service, in the first instance, I think that it's the same reading webservice but I will produce an error:

    29273 00000 - "the HTTP request failed.

    * Cause: The UTL_HTTP package cannot run the HTTP request.

    * Action: Use get_detailed_sqlerrm to check the detailed error message.

    Correct the error and restart the HTTP request.

    using this tag soap_request.

    < ns1:Request >

    < ns1:header >

    < ns1:InterfaceName > OSMMVNECreateOrder < / ns1:InterfaceName >

    < ns1:InterfaceId > OSM - XXX < / ns1:InterfaceId >

    < ns1:CorrelationId > TEST-06262015 < / ns1:CorrelationId >

    < / ns1:header >

    < ns1:Mvno > MTI < / ns1:Mvno >

    < ns1:orderId > < / ns1:orderId >

    < ns1:orderType > CHANGE_STATUS < / ns1:orderType >

    < ns1:orderDetails >

    < ns1:subscriberId > 9469273 < / ns1:subscriberId >

    < ns1:newStatusId > 2 < / ns1:newStatusId >

    < / ns1:orderDetails >

    < / ns1:Request >

    the < ns1:subscriberId > 9469273 < / ns1:subscriberId > the Subscriber must search and

    < ns1:newStatusId > 2 < / ns1:newStatusId > will replace the current state.



    any suggestion on how to do it?



    Best regards

    Nelz Ki

    There is no difference between calling a web service to write data, against the appellant for reading data. SOAP is SOAP. He cares not.

    Example to interact with a web service is in Re: PLSQL webservice call

    Regarding your error - stack display Tower full of error to see what said the trace of the error. The data you've posted unfortunately no sense to isolate the error.

  • How to add THE web service to the ACL?

    I want to access a web service from a PL/SQL procedure (using UTL_HTTP) since a 11g R2 database. However, before you do anything, I need to give access to the web service by adding the web service to the access control list (ACL).

    I want to test the web service is full here: http://www.service-repository.com/service/overview/-1789095104

    This is a free WS, you can use to test the code WS.  The endpoint is http://www.w3schools.com/webservices/tempconvert.asmx

    Therefore, adding www.w3schools.com to list ACL will be fine, I think? Am I wrong?

    I tried the method below but I get this error and the user guide is not clear what to do.

    SQL > exec dbms_network_acl_admin.assign_acl (LCD = > 'temp_ws1.xml', host = > 'www.w3schools.com');

    BEGIN dbms_network_acl_admin.assign_acl (LCD = > 'temp_ws1.xml', host = > 'www.w3schools.com'); END;

    *

    ERROR on line 1:

    ORA-31001: handle or path of the invalid resource name ' / sys/acls/temp_ws1.xml '.

    ORA-06512: at "SYS." DBMS_SYS_ERROR', line 86

    ORA-06512: at "SYS." DBMS_NETWORK_ACL_ADMIN', line 94

    ORA-06512: at "SYS." DBMS_NETWORK_ACL_ADMIN', line 479

    ORA-06512: at line 1

    Any help would be greatly appreciated.

    This,

    host-online "www.w3shools.com."

    is not the same thing as this,

    host-online "www.w3schools.com".

  • How to consume the web service using PLSQL in 11g

    Hello

    I created a site using jDeveloper, web services which when I put in the web browser and press enter, it will display the settings screen and when I pass the value for the parameter, and then it displays the output of the XML returned by the PL/SQL (called in the Web Service) package. Now, I want to call this webservice in PL/SQL and read XML data and fill in the staging table. Can anyone suggest me how to achieve this functionality by using Oracle PL/SQL

    I use the database 11g and jDeveloper Version :-Studio Edition version 10.1.3.0

    Thank you very much in advance.

    Vijay

    The WSDL file describes the web service.

    To obtain the WSDL, you enter the URL of the web service and add some ? WSDL to the URL. This indicates the web service to return to its definition.

    For example

    URL of the Web Service: http://wsf.cdyne.com/WeatherWS/Weather.asmx

    WSDL URL: http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL

    When you read (using 'web browser' UTL_HTTPpackage) the XML response from the web service, read as strings (PL/SQL varchar2, size 32 K max).

    You should read the answer as the strings, then writing/writeappend these channels in a CLOB (using the DBMS_LOB package). If you are VERY sure that the web service call ALWAYS returns an XML of less than 32 k, you can skip using a CLOB.

    Whatever it is, read you the response from the web service in the form of text (such as plain text, it is what is sent). The next step on your part is to parse text into an XML DOM (document object model) - and storing the DOM in an Oracle XmlType variable.

    When in a DOM, you can use Oracle XML functions to extract the attributes and values of the key element of the response from the web service.

  • Cannot create the web service proxy in jdeveloper

    Hi all

    I'm unable to create a proxy web service by using the URL of the web service (https://domains.live.com/service/managedomain2.asmx?wsdl). I get an error saying "no WSDL not could be found. I am able to open the same URL in the browser. As the web service is secured by SSL, do I need to add anything on the jdeveloper to access this web service? Help, please


    Note: The web service must be called on https

    -MJ

    Hello

    The parameters are the proxy settings that are necessary for JDeveloper to connect to external sites - other than those available in the internal intranet.
    To connect to internet/external sites, you must have for this parameter. Here, as you try to connect to the external site - Windows live, you will need these settings.

    Thank you
    Nini

  • Can not get the web service works

    I get the following error message when you try to call ASP.NET web service on the same host.

    TypeError: Error #1034: has no Type constraint: cannot convert function-2010 in Namespace.
    to mx.rpc.wsdl::WSDL/::processNamespaces()
    to mx.rpc.wsdl::WSDL$iinit()
    to mx.rpc.wsdl::WSDLLoader/mx.rpc.wsdl:WSDLLoader::resultHandler()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    to mx.rpc::AbstractInvoker / http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
    to mx.rpc::AbstractInvoker / http://www.adobe.com/2006/flex/mx/internal::resultHandler()
    at mx.rpc::Responder/result()
    at mx.rpc::AsyncRequest/acknowledge()
    to: DirectHTTPMessageResponder / completeHandler)
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    I use http://localhost/Hello/Service1.asmx?WSDL as the wsdl and it works when I browse it with the browser.

    Any help would be much appreciated.
    Thank you

    Got it... Finally!

    In my Tools.as file I had a static method named Split(Array,delimiter). I added this because I didn't like the stock of String.Split implementation... ie you get nothing if the delimiter is not found in the string, I wanted an array containing a single element in this document, the original string.

    in any case... There was a conflict of names with the Split method in the SDK because as soon as I changed the name of the method of SplitMeUp it worked and I got no longer error when loading of the WSDL.

  • How to save the Web page developed by Jdeveloper 10 g on Oracle EBS R12

    Hi experts,

    I created the Web page using Jdeveloper tool. Now, I need to register to this website for Oracle EBS R12. I already try the rest of the Metalink Article document: 394780.1, but cannot fill. Could you please guide me step by step.

    Java oracle.jrad.tools.xml.importer.XMLImporter
    $APPL_TOP/cimb/xxhrapp/12.0.0/mds/webui
    -jdk13
    -mmddir "D:\temp\HRapp_EBS\view\public_html".
    username - appdev20
    -password appdev20
    -rootdir
    $APPL_TOP/cimb/xxhrapp/12.0.0/mds/
    rootPackage - / cimb/oracle/apps/xxhrapp
    -validate
    -dbconnection "(description = (address_list = (address = (community = tcp.world)
    (protocol = tcp) (host = HRIS - dev.cimb.com) (port = 1521))) (connect_data =
    (SID = DEV20))) "Import utility
    Copyright (c) Oracle Corporation 2006. All rights reserved.
    Use:
    import the package directory path * or path of the XML file
    -rootdir "XML source directory"
    -username "username".
    -password "Password".
    -dbconnection "Connection string in database in the TNSNAMES file format"
    [- mmddir "Directory for MMD files"] *.
    [- rootPackage "Package name corresponding to rootdir"]
    [- userId "userid repository"]
    [- jdk13] *.
    [- includeSubpackages] *.
    [- displayOnly] *.
    [- confirm] *.


    Example 1: import d:\jdeveloper\jdev\myprojects\pages\mypage.xml - rootdir d:\jdeveloper\jdev\myprojects userId - 1 rootPackage / oracle/apps/ak - RPG - RPG password username - dbconnection "(description = (address_list = (address = (community = tcp.world) (protocol = tcp) (host)(port = 1521) incq027bc.idc.oracle.com)) (connect_data = (sid = des9i2)))" "


    Example2: import d:\jdeveloper\jdev\myprojects\pages\mypage.xml - displayOnly - includeSubpackages - validate rootdir - d:\jdeveloper\jdev\myprojects - mmddir d:\jdeveloper\jdev\lib\ext\jrad\config\mmd - 1 rootPackage - userId/oracle/apps/ak - RPG - RPG password username - dbconnection "(description = (address_list = (address = (community = tcp.world) (protocol = tcp) (host)(port = 1521) incq027bc.idc.oracle.com)) (connect_data = (sid = des9i2)))"-jdk13 "

    * Note: The path of the Directory package, - mmddir -, includeSubpackages,-validate
    and - displayOnly options are supported only with - jdk13

    $ /app/oracle/DEV20/apps/apps_st/appl/cimb/xxhrapp/12.0.0/mds/webui: cannot run
    $- jdk13: not found
    $ - mmddir: not found
    $ - username: not found
    past $-mot: not found
    $ - rootdir: not found
    $ /app/oracle/DEV20/apps/apps_st/appl/cimb/xxhrapp/12.0.0/mds/: cannot run
    $ - rootPackage: not found
    $- validate: not found
    $ > >
    -dbconnection: not found



    Thanks in advance

    Concerning
    Hieu

    Hieu,

    Since you are using OA Framework, you should ask on the [http://forums.oracle.com/forums/forum.jspa?forumID=210 url] OA framework Forum.

    John

  • How to deploy the web service PAPI

    I am new to OBPM.
    I use BPM studio 10.3 to create processes.
    I set the preferences of the engine "from PAPI web services." This works.
    But I do not know how to deploy them to web services PAPI since the BPM web service console shows that no service is deployed.

    Please tell me how to deploy BPM processes.

    Thank you very much

    Published by: YE on March 27, 2009 09:58

    To expose processes that Webservice, please follow the steps below.
    Just click on process--> select process Webservice then it will open a new window, and then specify the name of the corresponding input parameter Web service method.

    Then build the application and test the service by clicking on the icon LaunchDeployedWebServiceswebapp in Eclipse, it will open the new window, it contains information about Web service, URL endpoint to access the WSDL Style HTTP WS, WS-Security authentication basic authentication.

    Thank you best regards &,.
    M.Kumaraswamy.

  • How to start the web service

    Need to use the web server or to publish web pages, is there anywhere to start easily, thank you.

    Help-> find examples - > LV Queue Server

    /Y

  • best way to get the web service XML JSON etc legacy database

    We have a bunch of old scientific databases for which we would like to expose data via an XML web service.  International XML schemas have been developed in the standards for the sharing of these data we need to provide the data in.  These patterns have very different data of our legacy data structures.  We want to leave our databases within the same structures but to expose the data in them in the XML schemas.

    Building SQL indications XMLFOREST SQL etc. that returns the XML doesn't seem very practical that the structures are very different and the SQL must be very very complex and would be very tedious to make and maintain.  Is there another way to make in the database?  There are tools outside the database such as who can help in that we used in the past and could be used again - but I had much rather that on the database if possible.

    Building SQL indications XMLFOREST SQL etc. that returns the XML doesn't seem very practical that the structures are very different and the SQL must be very very complex and would be very tedious to make and maintain.

    Using SQL/XML is the most flexible way to generate XML from relational data, as you have full control over what you do.

    If the target XML structure is complex, any method will be complex to implement completely in the database anyway.

    There is no tool integrated with Oracle that would take an XML schema and make the mapping with relational data.

    What you can do is a third-party tool allows to design a XSLT stylesheet that would take care of transforming an XML format canonical (easily created from the database of a query) in the target XML instance.

    In this way the complexity lies in the style sheet, and the real transformation could be made within the database.

  • Unable to connect to the Web Services Proxy/unused (a HP 7500 JO)

    Hello

    Here's the situation:

    Previous installer:

    .  I have connected my 7500 for the corporate network (IP = 172... series)

    .  registered the product with ePrintCenter

    .  used a PC under Windows to print (and scan) with the printer

    .  web proxy entry "webproxy.phila.gov".

    .  However, because homeland security rules, I could never work, so I just let it go

    Current situation

    .  has taken the home printer and set up on my home network, i.e.,.

    -using the 192.168.xx.xx series

    -Router broadband Netgear ' G' (1 years) set up at the 192.168.xx.254

    -SSID & encryption assigned

    -printer, the value 192.168.xx.155 (static IP address, the subnet and the gateway assigned as well)

    -My DNS is identical to the bridge and it works fine for all the internet access to this day

    -with the help of a PC and a Macbook Air to print and scan and everything works fine

    .  HOWEVER,.

    -Initially, 'web services' were active (carried over from when I was on the company neetwork?)

    ..  Are looking for, found and downloaded updates

    -When I went to hp.com ePrintCenter he showed the product as 'registered '.

    ..  He would'nt I would like to connect (with a name and a password I had used previously), or create a new account

    ..  I never remember getting an email address of the printer

    ..  and I had never been able to send anything to the printer to print because of my problem of network security

    -Yes, after trying all sorts of things, I:

    ..  I tried to get another email without success

    ..  tried to re - enable web services, but he said I need to 'proxy', and I discovered that he had always "webproxy.phila.gov."

    ..  I have reset the values by default web services and network values

    ..  I put the static IP address return address in (i.e., printer, subnet and gateway (it has nowhere to put in a DNS one))

    ..  printing and scanning to 192.168.xx.155 works fine

    ..  From my iPad AirPrint works very well

    .  BUT, I still can not online and therefore web server, web services are not enabled, therefore not ePrint

    -everytime I try, it says it needs a proxy

    - but I don't have a proxy installed on my internal home network bit

    -Comcast/Xfinity, my ISP, do not use a proxy

    So, I'm dead in the water.  I can't figure out how to get the web services enabled; I do not use a proxy, so I don't know how to go beyond this issue. How to regenerate address of the printer; and so, how do I connect an account on the ePrintCenter (or get them to send me my old account information).  I'm dead in the water and cannot use a feature most of my printer that I desperately want to be put in place and functional.

    Any help would be greatly appreciated!

    Tommy

    Problem solved, but I don't know exactly how I did it. However, I went back in and let the printer assign the IP address. Then I turned the printer off and on again. Last I kept pressing the button "Printer e-mail address", who has repeatedly failed, but then finally went through and print the 'printer' page, I quickly used to connect to the ePrintCenter and put everything in place.

    Now it's working.

  • OSB: How to get the proxy service_name

    Hi all
    Could someone please tell me how to get the proxy service name within the stream of messages of OSB.


    Kind regards
    Rakesh Ranjan.

    Published by: Rakesh Ranjan on October 1, 2010 14:27

    Variable context Inound ($inbound) keeps the value of the service name and the name of the invoked operation. Use the expression $inbound/@name to get the name of the service and the expression $entrants / name of the ctx:service/ctx:operation/text() for the invoked operation.

    Do not forget that this Polish name will be there only for services that have operations (such as a WSDL based service)

    Kind regards
    Anuj

Maybe you are looking for