You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 31 Next »

Outdated page

Refer to the servicemix-wsn2005 for updated informations

SOAP stacks and XML marshaling

We now use JAX-WS and JAXB 2.0 to create POJOs and interfaces for the common WS-* specifications like WS-Addressing, WS-Notification, WS-ReliableMessaging, WS-Resourceframework etc. The only downside of this approach is its Java 5 specific. We hope with a tool like Retroweaver can one day allow JAX-WS and JAXB 2.0 based code to work perfectly on Java 1.4 JVMs.

Using JAXB / JAX-WS we create the POJOs and service interfaces for the common WS-* interfaces (WS-Notification, WS-Addressing, WS-Resource*). Here is the javadoc.

WS-Notification

The WS-Notification support is currently implemented as POJOs which can then either be called directly inside an application or can be wrapped up as a remote web service using a JAX-WS compliant SOAP stack. We are currently using the JAX WS RI which is licensed under CDDL.

We have interfaces for the WS-Notification services in the org. servicemix.wspojo.notification package. e.g. here's the NotificationConsumer interface. These interfaces are generated by JAX-WS from the WSDLs and only depend on Java 5 and the JAX-WS and JAXB 2.0 annotations.

Then our implementation of these WS-Notification interfaces are here.

Using WS-Notification

To be able to publish or subscribe you need either a NotificationConsumer or NotificationBroker. The current implementation of both is the ActiveMQNotificationBroker - which will create a connection to an ActiveMQ broker (by default making an embedded broker inside the same JVM].

You can then publish WS-Notification messages as follows...

Error formatting macro: snippet: java.lang.NullPointerException

You can perform a subscription as follows

Error formatting macro: snippet: java.lang.NullPointerException

Runtime dependencies

Apart from the usual ActiveMQ and ServiceMix dependencies this implementation of WS-Notification depends on

  • the JAX-WS and JAXB 2.0 APIs (annotations) which are included in Java 6, but on Java 5 you will need the jaxb-api.jar and jaxws-api.jar
  • a JAX-WS implementation if you wish to support remote services over SOAP. We are currently using the JAX-WS RI
  • No labels