This content has been marked as final. Show 5 replies
There isn't exactly an update option for the Web service data control - you need to re-create it if you changed the WSDL.
Does that mean I have to recreate my mobile application? I don't see any way to delete and recreate just the web service data control.
it means, you have to re-create your web service data control.
Just create a new web service data control and give it exact the same name as the existing one.
You will be asked by Jdev whether to update/override the existing one.
I have found that also the re-creation of the web service data control does not work as expected.
E.g. new methods exposed in the service interface are not listed in the available methods in the web service re-creation process.
A dummy-update (e.g. remove or add a already existing method from the web service data control) is needed.
After this a subsequent re-creation of the web service data controll will list the new exposed methods.
Bug 15853883 has been created for this.
hope this helps
Thank you very much, that does help.
Edited by: larry.phillips on Nov 16, 2012 8:51 AM
As a matter of best practice, although it's more work, generally you would want to leverage a programmatic approach to invoke these web services in ADF Mobile applications. In other words, the general pattern is like this:
- You create a set of Java Objects that correspond to your data model. For example, for a web service that returns a list of employees, create a "Data POJO" with the corresponding attributes. Shay's video (http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/adfmobiledemo/adfmobiledemo.html) goes through how to create these data objects.
- You then create a set of "Factory" POJOs that instantiate and populate the data objects. Use the examples and helper classes described in this article (https://blogs.oracle.com/mobile/entry/web_services_example_part_2) to invoke web services and convert data into Java Objects.
- You can then create Bean Data Control based on these POJOs. This is what you bind your user interface to.
This gives you more flexibility when dealing with Web Services changes, as well as adding code to, for example, more gracefully handle lack of network connectivity or validate user input prior to invoking the web services.
BTW because the embedded JVM is based on JavaME CDC spec, there is no Java Web Services Proxy support. There are helper classes however that would allow you to invoke Web Services Data Controls as described above.
Virtually of all the ADF Mobile beta participants went with similar approach - only difference is whether they are invoking SOAP or JSON-based services, or if these data come from local database.