File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes How to call webservice from Oracle without using Oracle Wallet & UTL_DBWS &UTL_HTTP package with SSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to call webservice from Oracle without using Oracle Wallet & UTL_DBWS &UTL_HTTP package with SSL" Watch "How to call webservice from Oracle without using Oracle Wallet & UTL_DBWS &UTL_HTTP package with SSL" New topic
Author

How to call webservice from Oracle without using Oracle Wallet & UTL_DBWS &UTL_HTTP package with SSL

Krishnamurthy Subramanian K
Greenhorn

Joined: Jan 12, 2009
Posts: 5
To call a webservice written by 3rd party from our Oracle procudure in a secured mode we tried to use UTL_HTTP & UTL_DBWS package which needs Oracle Wallet (For which we need to pay amount in Pounds). To avoid this extra payment for the secured connection can any one let me know the way to achieve this webservice connectivity from Oracle or Stand alone Java program.

Can any one help me. Urgent.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
"java lead",

Please check your private messages regarding an important administrative manner.
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
java lead wrote:To call a webservice written by 3rd party from our Oracle procedure in a secured mode


Secured how? HTTPS (TLS/SSL), WS-Security, ... ?

Though I'm probably unreasonably apprehensive, I'd expect that running the type of Java code that is required to access a (secured) web service from inside the Oracle server environment (even as an External Procedure) is probably fraught with problems and obstacles which may ultimately be insurmountable; possibly due to the kind of access to hardware or "sensitive" OS functionality that may be required by the code or any libraries that it may depend on.

So it may actually be worth considering the following scenario - build a servlet that does all the work for you.
  • Assemble the request data in a "request table".
  • Use UTL_HTTP to POST the "request key" to the servlet (not GET as that is supposed to be idempotent)
  • The servlet uses the "request key" to retrieve the "request data" and builds the "web service request" and performs the actual "web service call"
  • The servlet takes the "web service response", breaks it down and stores the "response data" in a "response table"
  • A trigger could detect the arrival of the "response data" and initiate continuation of processing. Alternately the return of the servlet HTTP response on the UTL_HTTP call could signal the availability of the response data (provided no errors were encountered).
  • Krishnamurthy Subramanian K
    Greenhorn

    Joined: Jan 12, 2009
    Posts: 5
    From your reply I could get the information that calling a webservice from an oracle server through a secured connection will have lot of issues. Hence its not advisible to execute this approach. My doubt here is what kind of problems we will face if we go by the above connectivity ? Also please let me know what is the other option to look at it. Thanks.
    Krishnamurthy Subramanian K
    Greenhorn

    Joined: Jan 12, 2009
    Posts: 5
    I should use only jdk 1.3 to write a client code to access a remote web service. If I need to use Apache AXIS will it work or should I go for higher versions of jdk like 1.4 and above.
    Peer Reynders
    Bartender

    Joined: Aug 19, 2005
    Posts: 2922
        
        5
    Krishnamurthy Subramanian K wrote:From your reply I could get the information that calling a webservice from an oracle server through a secured connection will have lot of issues.


    I don't know - however the JVM inside the RDBMS environment is bound to be more restricted in its access to the outside world (and what libraries can be used/included) compared to a JVM running on an OS.

    I should use only jdk 1.3 to write a client code to access a remote web service. If I need to use Apache AXIS will it work or should I go for higher versions of jdk like 1.4 and above.


    Much of this duscussion depends on how the web service is secured (HTTPS (SSL/TLS), WS-Security, etc.). Also you are only writing a client, not a web service, so while a WSDL-to-Code generator could be helpful it isn't necessary and its usefulness may be diminished depending on how the web service is secured. There are versions of SAAJ that work with JDK 1.3 (possibly even the one that is in the Axis 1.x distribution).

    Use of SAAJ however means that you will have to get really comfortable with SOAP and XML.
    SAAJ client
    "Java Web Services in a Nutshell" Sample: Chapter 3 SAAJ (PDF)



     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: How to call webservice from Oracle without using Oracle Wallet & UTL_DBWS &UTL_HTTP package with SSL