org.jibx.ws.pox.client
Class PoxClient

java.lang.Object
  extended by org.jibx.ws.client.Client
      extended by org.jibx.ws.pox.client.PoxClient

public final class PoxClient
extends Client

A client for invoking services using Plain Old XML (POX) messages.


Constructor Summary
PoxClient(String location)
          Create a POX client to connect to a service at the specified location.
PoxClient(String location, IBindingFactory factory)
          Create a POX client to connect to a service at the specified location.
PoxClient(String location, IBindingFactory factory, MessageOptions options)
          Create a POX client to connect to a service at the specified location.
 
Method Summary
 Object call(Object request)
          Send a request to the service and wait for the response to be returned.
 
Methods inherited from class org.jibx.ws.client.Client
close, setBindingFactory, setInBodyBindingFactory, setMessageOptions, setOutBodyBindingFactory, setTransportOptions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoxClient

public PoxClient(String location)
          throws WsConfigurationException
Create a POX client to connect to a service at the specified location.

Parameters:
location - the location of the service
Throws:
WsConfigurationException - on configuration exception, for instance the location is invalid.

PoxClient

public PoxClient(String location,
                 IBindingFactory factory)
          throws WsBindingException,
                 WsConfigurationException
Create a POX client to connect to a service at the specified location. The client will use the specified JiBX binding factory for marshalling and unmarshalling the message body.

Parameters:
location - the location of the service
factory - the factory containing bindings for the outbound and inbound message body. Bindings are only required for non-empty outbound or inbound bodies.
Throws:
WsBindingException - if client cannot be created due to an error with the JiBX bindings
WsConfigurationException - on configuration exception, for instance the location is invalid.

PoxClient

public PoxClient(String location,
                 IBindingFactory factory,
                 MessageOptions options)
          throws WsBindingException,
                 WsConfigurationException
Create a POX client to connect to a service at the specified location. The client will use the specified JiBX binding factory for marshalling and unmarshalling the message body.

Parameters:
location - the location of the service
factory - the factory containing bindings for the outbound and inbound message body. Bindings are only required for non-empty outbound or inbound bodies.
options - output options
Throws:
WsConfigurationException - on configuration exception, for instance the location is invalid.
WsBindingException - if client cannot be created due to an error with the JiBX bindings
Method Detail

call

public Object call(Object request)
            throws IOException,
                   WsException
Send a request to the service and wait for the response to be returned.

Specified by:
call in class Client
Parameters:
request - object to be marshalled to XML as body of request (may be null, for an empty request body)
Returns:
response object unmarshalled from body of response (may be null, for an empty response body)
Throws:
IOException - on error in communicating with service
WsException - on error in request processing, or a WsConfigurationException if either:
  • request is non null and a binding factory or handler has not been set for the outbound body, or
  • the response contains a non-empty body and a binding factory or handler has not been set for the inbound body.


Project Web Site