X

The blog for hints & tips about Oracle Application Development Framework and Mobile Application Framework

Which option to choose for accessing Web Services in ADF

Frank Nimphius
Master Principal Product Manager
Oracle ADF provides three options for integrating Web
Service:



· Web Service Data Control

· JAX-WS proxy client and POJO Data Control

· JAX-WS proxy client and programmatic View
Objects

Note: In the
above, I exclude REST services in my recommendation because this is what ADF
will address much better using the URL data control in JDeveloper 11g R2
(available) and with improved functionality in the upcoming Oracle JDeveloper
12c release.

For deciding which option to use for integrating Web
Service, here is what I consider "a good rule of thumb"

1. Use Web
Service Data Control
only for simple service like weather reports or stock
quotes

2. Use JAX-WS
proxy client
for all more complex services and access them from

a. Programmatic
view object and entity if your business service is ADF Business Components as
this allows for better integration with database queried  views

i. Use View Objects only for read only access

ii. Use View Objects and Entities for CRUD Web
Service integration

b. POJO Data
Control

i. If your
business service is not ADF BC.

ii. If the WS doesn't require
integration in ADF business component

iii. If WS access should be from a bounded task
flow in an ADF library for maximum reuse

As a general hint of best practice: Never
use the JAX-WS generated proxy client directly. Always access it from a wrapper
bean to avoid code losses or problem in cases where the proxy client needs to
be re-generated.

Note: ADF Code Corner published an article explaining how to cache Web Services results when using JAX-WS proxy clients to avoid unnecessary round trips. See: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/92-cache-ws-queries-523136.pdf


                                         
    
                    
          
        
              
       

                                
                                                                

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.