POX Specific Features

JiBX/WS supports POX (Plain Old XML) services. The input and output messages consist solely of the XML payload without any additional data such as SOAP envelope.

POX server

To create a POX server, specify the protocol in the service definition to be POX.

SOAP specific features of the service definition, such as SOAP header handlers and SOAP fault handlers, are not supported. All other features of the service definition are supported.

Exception handling

By default, a runtime exception of type UnhandledWsException will be thrown whenever the service class throws an exception, or an error occurs in the handling of the POX message (for example invalid message format). This behavior can be overridden by implementing a custom service exception handler.

POX client

To create a POX client, either use the PoxClient class directly, or via the PoxProtocol implementation of the Protocol.createClient() method.

Examples

The POX Hello example demonstrates a basic POX client and server, using the org.jibx.ws.pox.client.PoxClient class directly.

The Seismic example demonstrates a more complete application that uses the factory method to select either a SOAP or POX client.