X

Shay Shmeltzer's Oracle Development Tools Tips

Updating an ADF Web Service Data Control When Service Structure or Location Change

Shay Shmeltzer
Director of Product Management - Oracle

The web service data control in Oracle ADF gives you a simplified approach to consuming services in ADF applications, and now with ADF Mobile the usage of this service seems to be growing.

A frequent question we get is what happens if the service that I'm consuming changes - how do I update my data control?

Well, first we should mention that if you do a good design of your application before you actually code - then things like Web service method signature shouldn't change. The signature is the contract between the publisher and the consumer, and contracts shouldn't be broken.

But in reality things do change during development stages, so here is how you can update both method signatures and service location with the Web service data control:

After watching this video you might be tempted to not copy the WSDLs to your project - which lets you use the right click update on a data control. However there is a reason why the copy is on by default, it reduces network traffic when you are actually running your application since ADF doesn't need to go to the server to find out the service structure. So for runtime performance, you probably should keep the WSDL local.

 I encourage you to further look into both the connections.xml file where your service location is saved, and the datacontrols.dcx file where its definition is kept to get an even deeper understanding of how ADF works underneath the declarative layers.


Join the discussion

Comments ( 17 )
  • simo Friday, December 21, 2012

    Thanks!


  • guest Thursday, January 3, 2013

    Thanks for the informaition Shay. But i think there are some differences in adf mobile. We cant update DC by left clicking and update way or when we add some extra feature(update , find , any other) to wsdl and then try to update , we cant see the new features in the wsdl.


  • guest Wednesday, February 13, 2013

    hi,

    is it possible to create view links for web service data controls

    if yes how.

    thanks in advance


  • Shay Thursday, February 14, 2013

    You'll be able to use view links if you wrap the access to the Web services with programmatic view objects.

    Note though that Web services can return complex nested values and the WS data control knows to handle this.


  • Kyle T. Wednesday, April 24, 2013

    Shay,

    I'm not sure if you're aware of this, but when you build additional view criteria in the BC service and you try to "UPDATE" the WC DC it doesn't allow you to select the new view criteria methods. Is this a bug or is there a different way to go around it?


  • Shay Wednesday, April 24, 2013

    Kyle - did you update the AM Service Facade to include the new view criteria you added? This should then update the WSDL which you should then be able to pick up with the WS data control.


  • guest Wednesday, April 24, 2013

    I did.

    When I deployed my updated service to the server I can access it and invoke the methods just fine.

    When I try to create a new WS DC and it asks to update my wsdl none of the new View Criteria methods come across.

    I'll see if I can creat a test case using the HR schema.


  • guest Friday, May 10, 2013

    I am new to ADF, could you please elaborate more on this?

    "You'll be able to use view links if you wrap the access to the Web services with programmatic view objects.

    Note though that Web services can return complex nested values and the WS data control knows to handle this."

    I am consuming two REST JSON-xml web service in my ADF. I am trying to create a view link between these two in the Data Control to make it look like master-detail relation. Could you please give an example of how to do it.

    Thanks a lot.


  • Shay Friday, May 10, 2013

    guest - you can read more about using ADF BC VOs as wrappers for Web services here:
    http://www.oracle.com/technetwork/issue-archive/2012/12-jul/o42adf-1653060.html

    And in the ADF Documentation too.


  • Dave B Friday, June 21, 2013

    Hi Shay,

    Does this work the same for ADF projects generated to work with SOA or BPM Human Tasks? We're having trouble getting our web service data controls to update to include the new operations we have added. What version of JDeveloper were you using for this?

    Thanks.


  • guest Friday, June 21, 2013

    Dave, this will work for the web service data control - I think the BPM data control is a different implementation - so you should ask on their forum how you can achieve the same.


  • guest Monday, June 24, 2013

    Shay,

    I put together a simple demo using the HR schema running locally on 11.1.2.4.

    https://docs.google.com/file/d/0B4_rCR8y7GmbTkI0Qk81VENub1U/edit?usp=sharing

    I created/ran my web service that was built exposing the ADF BC as a service interface. I created a simple mobile app that uses the web services data control (1 with no copy of the WSDL and one with copy of the WSDL).

    I then went back into the web service and added another view criteria (getEmpBySalary) and ran it locally. I went back into the mobile application and right-clicked on the _wCopy in the DataBinding and it modifies the DataBindings (Because I have to SAVE) but it doesn't update the methods.

    Let me know what you think.


  • Kyle T. Friday, June 28, 2013

    Shay,

    Disregard that last message. It was a small mistake I made on my part. I was trying to update the DataControl that had a copy of the WSDL locally on the machine. When I recreated the DataControl my updated / new methods came across fine.


  • Don K Monday, August 26, 2013

    I'm experimenting with using web service data controls.

    How would I add code that gets called before and after every webs service data control is invoked (i.e for performance monitoring). Also where is the end point configured? There are different service URLS's for each environment (dev, qa, productions, etc.. ). Also how to I catch web service errors to present a user friendly message instead of letting ADF display a cryptic error to the user if the call fails due to communication issue or other server issue.


  • Dimitris Thursday, February 5, 2015

    Hi,

    I am doing some experiments with BI Publisher Web Services.

    How can I display the parameter names and the parameter values (if parameter lov is defined) of one bi publisher report in a single ADF table row?

    For this purpose I am using the getReportDefinition method.

    My problem is that the parameter names and parameter values belong to different iterators.

    Thank you


  • guest Tuesday, February 28, 2017

    Hi Shay,

    How can I access the ws from bean? I need to print the payload xml.

    Thanks


  • Kanika Gupta Tuesday, January 8, 2019
    Hi,

    I am consuming REST Service in my ADF project. How can I get change URL in connections.xml at runtime. I have dynamic URLs for RETS Service.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.