|
Extension SDK 9.0.5 | ||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
WebServiceModelListener | Listener interface to provide notification of model change events. |
Class Summary | |
JAXRPCJavaModel | This class represents the data model for a Java class or EJB exposed as a Java web service. |
JAXRPCJmsModel | This class represents the data model for a web service that accesses JMS destinations. |
JAXRPCPlsqlModel | This class represents the data model for a PL/SQL package exposed as a web service. |
JAXRPCSvcModel | This class represents common parts of the data model used behind all types of JAX-RPC web service. |
StubSkelArtifact | A representation for artifacts generated by the stub/skeleton wizard. |
StubSkelModel | This class provides a public API for generating web service stubs and
skeletons. The most simple use case is to create a new stub, based on an existing WSDL document. |
WebServiceManager | A utility class for performing various web serivce management tasks, such as locating existing services. |
Exception Summary | |
WebServiceNotFoundException | Marker class for web service not found exceptions. |
New public API to web services
The public API to web services has been improved in JDeveloper 9.0.5, to allow JMS and PL/SQL web services to be treated in a similar way to Java web services. The code underneath has also been changed substantially to make it easier for us to support new types of web services if the need arises.
However, from the API user's perspective, things stay more or less as they did before.
Creating a web service:
The most simple use case is to create a new web service, based on an existing class. To do this, create a new web service data model class, as below:
JAXRPCJavaModel model = new JAXRPCJavaModel(); model.beginEdit(); model.setClassName("mypackage1.Class1"); // ... more properties to set here ... model.saveEdit(true, null);
As well as JAXRPCJavaModel, you can also choose to create a JAXRPCPlsqlModel or a JAXRPCJmsModel. The properties you need to set on the data model are described in the JavaDoc for those classes.
Pseudo-transaction mechanism
The web services API implements a pseudo-transaction mechanism that
restricts how you can make and save changes to the data model. There's no
restriction on when you can call the set methods on a model, but you will only
be able to save the changes if you have first called beginEdit
.
Once you have made all the changes you need, calling saveEdit
will
invoke the appropriate generator and save the model and artifacts onto the
filesystem. If you want to scrap any changes you made, call
undoEdit
to return the model to its previous state.
Invoking wizards
You can invoke the wizard that edits a particular web service model by
calling the invokeWizard
method on it. The wizard will take care
of all beginEdit
, saveEdit
and undoEdit
calls. The return value of invokeWizard is true if the user hit the "OK" button
and false if they hit the "cancel" button.
Validation
All of the validation relevant to a model is included in that model or one
of its superclasses. The validate
method accepts an array of
String constants that represent the model properties to validate - these
constants are defined as public static
members of the model.
Supplying an empty or null array to validate
will validate all
properties in the model. If any validation errors are encountered, these will
be thrown as an Exception
, containing a translated string
explaining the cause of the error. Validation ends after the first error is
found.
WebServiceManager
The WebServiceManager
class contains a series of static methods
that allow you to find a web service in a project based upon the name of the
Java class used in a Java or PL/SQL web service, or the URI of the of web
service. There are also methods to help locate web service container nodes and
generate GUIDs for services.
|
Extension SDK | ||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Copyright © 1997, 2004, Oracle. All rights reserved.