Generate webservice proxy using oracle ant tasks

Posted by adrian.muraru on Oracle Blogs See other posts from Oracle Blogs or by adrian.muraru
Published on Fri, 02 Apr 2010 03:02:28 -0800 Indexed on 2010/04/02 11:13 UTC
Read the original article Hit count: 325

Filed under:

Proxy generation tends to be very slow when done using jdeveloper wizard and even more this time increases when jdeveloper is started over a remote desktop connection.
So here's step-by-step howto that can be used to generate webservice proxy from your *nix shell

  1. Create a dir in your scratch area : e.g. /tmp/<username>/genproxy
  2. Get build.xml file attached, save it in the dir above and change the properties defined in it to match your ws endpoint.
    More specifically you need to edit:
    • proxy.wsdl - the path (either locally or URL) where WSDL file can be accessed from
    • proxy.handler - the handler class
    • proxy.package - the class package where the proxy will be generated
  3. Start a new shell session (out of the ADE view if you're using one) and set the environment needed for proxy generation using ant and Oracle WebServicesAssembler genProxy [1]
    $ setenv ORACLE_HOME /opt/jdev_local/10.1.3/

    $ setenv PATH $ORACLE_HOME/ant/bin:$PATH
    Note that the above env setup is needed even if you already have ORACLE_HOME set and ant utiliy available in your PATH.
    That way you'll be sure the proxy will be generated using the same libraries your jdeveloper is using in its wizard
  4. Generate proxy
    $ cd /tmp/<username>/genproxy
    $ ant genproxy
    And voila, the proxy files should be available in ./src directory.

[1] More information about genProxy can be found at : [2] In my case this method is much faster then using the jdeveloper wizard (15secs compared to 25minutes)
[3] There is one minor drawback though, the jdeveloper .proxy configuration file is not generated.


© Oracle Blogs or respective owner