Abstract
The following provides available information about migrating from previous versions of the Globus Toolkit.
Table of Contents
Table of Contents
Java WS Core Framework has been updated to use the final version of the WSRF/WSN and WS Addressing specifications. This document provides an overview of the changes and provides a link to the specifications.
![]() | Note |
|---|---|
Features that are new in the final specification have not been implemented, only the features from the previous specification have been ported. |
The following is a suggested approach to updating the higher level services:
The specification WSDL names and namespace have changed. The section WSDL Files and Namespace Changes provides a mapping from old WSDL file names and namespaces to the new equivalent. All operations in the old specification are in the new specification, so no other WSDL change should be needed.
If your service uses compact and schema directories, ensure that the new WSDLs are correctly written and deployed in schema.
The old targets for stub generation can be used as is. Ensure that modified WSDLs have been deployed to
GLOBUS_LOCATION before you run the targets.
Some class and package names have changed. There is minimal change in the core infrastructure API, but the
addressing package has been moved from org.apache to org.globus.
The section Package and class name changes provides a table with some mappings from old to new class names. Note this does not cover all cases, but the most commonly used code.
For changes to features and sample code, refer to the section on Code change details. The section discusses changes per feature and should provide details on how to edit your code.
Also, Constant changes provides information on some constants that have changed.
You should not have to change anything in your Ant build files or deployment infrastructure.
For samples, you can look at counter service.
The Apache WS Addressing project is being archived. So the code base has been moved to the
Globus repository and has been checked into wsrf/java/lib-src/ws-addressing.
The library now has org.globus package names and guarantees support only for
the final version of the WS Addressing specification.
One of the key changes in the specification is that Reference Parameters are used now rather than Reference Properties. Java WS Core adds and expects EPR key information in Reference Parameters element now.
Unlike the old specification, fault cause consists of a single BaseFaultType,
rather than an array of BaseFaultType. The FaultHelper
utility has been modified to handle this. Now when a fault cause is added, the helper class walks through the chain of
fault causes to find one without a fault cause set and then sets the new cause. Higher level services can continue to
use the same API as before and faults should get serialized and deserialized correctly.
If in your testing, you look for a specific error code in a Fault Cause, it is
not an array anymore. You will need to walk though the chain of fault causes. An example of such a test is
testTargetedXPathQueryInvalidRP() in
org.globus.wsrf.impl.properties.QueryResourcePropertiesTests.java.
The new specification allows SetTerminationTime to have either an
xsd:dateTime or xsd:duration.
Java WS Core currently does not support duration and
only uses the xsd:dateTime value
set in the request. A bug in Axis ends up with SetTerminationTime data
binding having a contructor that takes two parameters.
None of the new methods in the final specification have been implemented; only a minor change in schema,
which is taken care of in the providers and Simple* implementations.
A new data type Filter has been defined, which is used to provide subscription information, including the Topics to subscribe to.
Currently we only support TopicExpressionType and hence FilterType is expected to have just one element.
SubscribeSubscriptionPolicy: the only piece we used before was useNotify. As per latest specification, that is default. If useRaw is set in subscription policy a UnsupportedPolicy fault will be thrown, any other policy set will cause a UnrecogonizedPolocy fault.
Example subscription request:
Subscribe request = new Subscribe(); request.setConsumerReference(consumerEPR); TopicExpressionType topicExpression = new TopicExpressionType(); topicExpression.setDialect(WSNConstants.SIMPLE_TOPIC_DIALECT); topicExpression.setValue(Counter.VALUE); MessageElement element = (MessageElement)ObjectSerializer .toSOAPElement(topicExpression, WSNConstants.TOPIC_EXPRESSION); FilterType filter = new FilterType(); filter.set_any(new MessageElement[] { element }); request.setFilter(filter);
Destroy was used in the old code to remove notification subscription,
Unsubscribe should be used now.
SubscriptionManager subscriptionPort =
subscriptionManagerLocator.getSubscriptionManagerPort(
subscriptionEPR);
...
subscriptionPort.unsubscribe(new Unsubscribe());Notify message has changed and a new utility has been added to take care of deserialization of the message:
import org.globus.wsrf.encoding.DeserializationException; import org.globus.wsrf.utils.NotificationUtil; import org.oasis.wsrf.properties.ResourcePropertyValueChangeNotificationType; // Notification callback public void deliver(List topicPath, EndpointReferenceType producer, Object message) { ResourcePropertyValueChangeNotificationType changeMessage = null; try { changeMessage = NotificationUtil.getRPValueChangeNotification(message); } catch (DeserializationException e) { // handle exception }ResourcePropertyValueChangeNotificationTypeAPI hasgetNewValues()andgetOldValues()instead ofgetNewValue()andgetOldValue().
This is not relevant, unless you want to write a new subcription manager and not use the one in Core.
The recent specification defines two port types for subscription manager: one with pause/resume and another without. To maintain previous functionality, the default subscription manager service provided in Core uses the pause-able subscription manager port type.
GetRP- RequiredDestroy- RequiredSetTerminationTime- Not requiredRequired resource properties:
consumer reference
filter type
subscription policy
creation time
The BaseSubscriptionProvider and
PausableSubscriptionProvider cover all the required functionality.
(Refer to Subscribing to Notification section above for more details on what is supported)
The interface org.globus.wsrf.Subscription has been split into two.
A new interface, PausableSubcription has been introduced in the same
package and contains the method for pause/resume functionality. By default, subscription support in Core
uses the PausableSubcription interface only.
If pause/renew capability is required, resources need to implement PausableSubscription
instead of Subscription. If you are looking to maintain old functionality,
change to PausableSubscription.
All WSRF/WSN and WSA namespaces have changed. The file names have also changed, but they have been updated in the same directory. This table shows the mapping from old filenames and namespaces to the new ones.
Table 1. Mappings for existing WSDL files and namespaces
A WS Resource specification had been added. ResourceUnknown and
ResourceUnAvailableFaultType are defined in this namespace, instead of
multiple definitions in lifetime and resource in the old specification.
Table 2. New WSDL files and namespaces
| Filename | Namespace |
|---|---|
| wsrf/compact/wsrf/resource/r-2.xsd | http://docs.oasis-open.org/wsrf/r-2 |
| wsrf/compact/wsrf/resource/rw-2.wsdl | http://docs.oasis-open.org/wsrf/rw-2 |
This section describes package name changes and equivalent classes.
Table 3. Package names and class name mappings
| No. | Old name | New Name |
|---|---|---|
| 1 |
|
|
| All these faults have been moved to a single common namespace and hence one package. | ||
| 2 |
|
|
| Equivalent as per new specification. | ||
| 3 |
|
|
| Moved over Apache addressing code to Globus repository and namespace. | ||
| 4 |
|
|
| Moved over Apache addressing code to Globus repository and namespace. | ||
| 5 |
|
|
| Moved over Apache addressing code to Globus repository and namespace. | ||
| 6 |
|
|
| Moved over Apache addressing code to Globus repository and namespace. Reference parameters are now used to store resource key information. | ||
| 7 |
|
|
API has changed here. There is no direct to set port, schema, etc.
Use getValue() and change the URI that is returned. | ||
| 8 |
|
|
| Refer to notes on Subscription Manager [link me]. | ||
Table of Contents
GT3 used GWSDL to describe service messages and
operations. GT4 uses standard WSDL with one extensibility attribute to describe resource properties.
Please see the WS-ResourceProperties specification for details on expressing the resource
properties in WSDL.
In GT3 every service inherited some basic operations and functionality (from
GridService port type) as required by the OGSI
specification. However, in GT4 there is no such requirement (because the WSRF/WSN specifications do not require
it). Also, the Factory port type defined in the OGSI
specification does not exist in WSRF/WSN specifications. Therefore, there is no standard
create operation or functionality provided by GT4.
GT3 relied on wrapped formatting of the WSDL. GT4 uses standard document formatting. This change introduces differences in how the Java interface for the service looks. Please see the design document and the document/literal section for more details.
In GT3, the business logic of the service and the state were coupled together in one class. In GT4, the business logic and the state are decoupled and placed in two separate classes. The business logic is put in a service class while the state is put in a resource class. The service is stateless while the resource is stateful. Also, GT4 introduces ResourceHome classes that are responsible for managing and discovering resources. Please see the programming model overview for details.
Even though a GT4 developer needs to modify two or three separate files the coding effort is about the same as in GT3.
In GT3, most of the configuration information was stored in the
server-config.wsdd file. In GT4, since the business
logic and state were decoupled, the service information is still kept in
server-config.wsdd but resource information is now placed in the
new jndi-config.xml file. Please see the JNDI section for more details.
J
R
- ResourceHome
In Java WS Core, resources are managed and discovered via ResourceHome implementations. The ResourceHome implementations can also be responsible for creating new resources, performing operations on a set of resources at a time, etc. ResourceHomes are configured in JNDI and are associated with a particular web service.
S
W
- Web Services Description Language (WSDL)
WSDL is an XML document for describing Web services. Standardized binding conventions define how to use WSDL in conjunction with SOAP and other messaging substrates. WSDL interfaces can be compiled to generate proxy code that constructs messages and manages communications on behalf of the client application. The proxy automatically maps the XML message structures into native language objects that can be directly manipulated by the application. The proxy frees the developer from having to understand and manipulate XML. See the WSDL 1.1 specification for details.
- Web Services Notification (WSN)
The WS-Notification family of specifications define a pattern-based approach to allowing Web services to disseminate information to one another. This framework comprises mechanisms for basic notification (WS-Notification), topic-based notification (WS-Topics), and brokered notification (WS-BrokeredNotification). See the OASIS Web Services Notification (WSN) TC for details.
- Web Services Resource Framework (WSRF)
Web Services Resource Framework (WSRF) is a specification that extends web services for grid applications by giving them the ability to retain state information while at the same time retaining statelessness (using resources). The combination of a web service and a resource is referred to as a WS-Resource. WSRF is a collection of different specifications that manage WS-Resources.
This framework comprises mechanisms to describe views on the state (WS-ResourceProperties), to support management of the state through properties associated with the Web service (WS-ResourceLifetime), to describe how these mechanisms are extensible to groups of Web services (WS-ServiceGroup), and to deal with faults (WS-BaseFaults).
For more information, go to: http://www.globus.org/wsrf/ and OASIS Web Services Notification (WSRF) TC .
![[Note]](/docbook-images/note.gif)