org.jibx.ws.soap
Class SoapProtocol

java.lang.Object
  extended by org.jibx.ws.soap.SoapProtocol
All Implemented Interfaces:
Protocol

public final class SoapProtocol
extends Object
implements Protocol

Defines a specific version of the SOAP protocol.


Field Summary
static SoapProtocol SOAP1_1
          SOAP Version 1.1.
static String SOAPACTION_HEADER
          HTTP header field to carry operation name (SOAP 1.1 only).
 
Method Summary
 org.jibx.ws.transport.MessageProperties buildMessageProperties(String opname, MessageOptions msgOptions)
          Returns message specific properties for an outbound message.
 Client createClient(String location, IBindingFactory factory, MessageOptions options)
          Create a client to connect to a service at the specified location using this protocol.
 org.jibx.ws.process.Processor createProcessor()
          Returns a processor for this protocol.
 org.jibx.ws.process.Processor createProcessor(ExchangeContext exchangeContext)
          Returns a processor for this protocol, configured according to the specified exchange context.
static org.jibx.ws.server.ServiceExceptionHandlerFactory getDefaultExceptionHandlerFactory(boolean includeStackTrace)
          Creates ServiceExceptionHandlers that send a SOAP fault response message.
 org.jibx.ws.server.MediaTypeMapper getMediaTypeMapper()
          Returns a mapper for mapping media type code to media types for this protocol.
 String getName()
          Returns the protocol name.
 String getOperationName(org.jibx.ws.transport.InConnection conn)
          Get the operation name for a request.
 org.jibx.ws.server.ServiceFactory getServiceFactory()
          Returns a factory that creates services for this protocol.
 String getUri()
          Get the appropriate namespace URI.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOAPACTION_HEADER

public static final String SOAPACTION_HEADER
HTTP header field to carry operation name (SOAP 1.1 only).

See Also:
Constant Field Values

SOAP1_1

public static final SoapProtocol SOAP1_1
SOAP Version 1.1.

Method Detail

getUri

public String getUri()
Get the appropriate namespace URI.

Returns:
URI

createProcessor

public org.jibx.ws.process.Processor createProcessor()
Returns a processor for this protocol.

Specified by:
createProcessor in interface Protocol
Returns:
a SoapProcessor

createProcessor

public org.jibx.ws.process.Processor createProcessor(ExchangeContext exchangeContext)
Returns a processor for this protocol, configured according to the specified exchange context.

Specified by:
createProcessor in interface Protocol
Parameters:
exchangeContext - provides the context for the message exchange that the processor is to perform
Returns:
a SoapProcessor

createClient

public Client createClient(String location,
                           IBindingFactory factory,
                           MessageOptions options)
                    throws WsBindingException,
                           WsConfigurationException
Create a client to connect to a service at the specified location using this protocol. The client will use the specified JiBX binding factory for marshalling and unmarshalling the message body. The binding factory may also be used for protocol specific details, such as unmarshalling any SOAP fault details. See the relevant subclass for details.

Specified by:
createClient in interface Protocol
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. May also be used for protocol specific details. See the relevant WsClient subclass for details.
options - options for outbound message
Returns:
a SoapClient
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.

getServiceFactory

public org.jibx.ws.server.ServiceFactory getServiceFactory()
Returns a factory that creates services for this protocol.

Specified by:
getServiceFactory in interface Protocol
Returns:
service factory

getName

public String getName()
Returns the protocol name.

Specified by:
getName in interface Protocol
Returns:
name of the protocol

getMediaTypeMapper

public org.jibx.ws.server.MediaTypeMapper getMediaTypeMapper()
Returns a mapper for mapping media type code to media types for this protocol.

Specified by:
getMediaTypeMapper in interface Protocol
Returns:
media type mapper

buildMessageProperties

public org.jibx.ws.transport.MessageProperties buildMessageProperties(String opname,
                                                                      MessageOptions msgOptions)
                                                               throws WsConfigurationException
Returns message specific properties for an outbound message. Some properties are protocol specific, for example SOAP 1.2 bindings dictate different media types than SOAP 1.1.

Specified by:
buildMessageProperties in interface Protocol
Parameters:
opname - operation name (null if unspecified)
msgOptions - options for media types of the message
Returns:
properties protocol specific message properties
Throws:
WsConfigurationException - on configuration error

getOperationName

public String getOperationName(org.jibx.ws.transport.InConnection conn)
Get the operation name for a request.

Specified by:
getOperationName in interface Protocol
Parameters:
conn - input connection used for request
Returns:
operation name, or null if not supplied

getDefaultExceptionHandlerFactory

public static org.jibx.ws.server.ServiceExceptionHandlerFactory getDefaultExceptionHandlerFactory(boolean includeStackTrace)
Creates ServiceExceptionHandlers that send a SOAP fault response message.

Parameters:
includeStackTrace - true to include the stack trace in the SOAP fault, false otherwise.
Returns:
factory


Project Web Site