|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jibx.ws.server.ServiceDefinition
public final class ServiceDefinition
Defines a service to be invoked by JiBX/WS.
After setting the required properties on this class, the init()
method must be called to initialize this
class.
When using JiBX to configure the service, this class is populated from the XML service definition document by JiBX
unmarshalling and the init()
method is automatically called after the properties have been set.
Constructor Summary | |
---|---|
ServiceDefinition()
|
Method Summary | |
---|---|
List |
getHandlerDefinitions()
Get handler definitions. |
IBindingFactory |
getInBodyBindingFactory()
Returns the optional JiBX binding factory used for the request message bodies received by operations. |
boolean |
getIncludeStackTraceOnFault()
Returns whether a stack trace should be included when a SOAP fault is created as the result of an unhandled error. |
List |
getOperationDefinitions()
Get operation definitions. |
IBindingFactory |
getOutBodyBindingFactory()
Returns the optional JiBX binding factory used for the response message bodies sent by operations. |
Class |
getOutputCompletionListenerClass()
Get outputCompletionListenerClass. |
org.jibx.ws.transport.OutputCompletionListener |
getOutputCompletionListenerObject()
Get outputCompletionListenerObject. |
String |
getProtocolName()
Get the name of protocol to use for this service. |
Class |
getServiceClass()
Get service class information. |
Class |
getServiceExceptionHandlerClass()
Get fault handler class information. |
org.jibx.ws.server.ServiceExceptionHandler |
getServiceExceptionHandlerObject()
Get fault handler object. |
String |
getServiceName()
Get service name. |
Object |
getServiceObject()
Get service object. |
XmlOptions |
getXmlOptions()
Returns the formatting options for outbound XML. |
void |
init()
This method must be called after all properties have been set. |
void |
setBindingFactory(IBindingFactory factory)
Sets the optional JiBX binding factory used for the body of the request and response messages exchanged by operations. |
void |
setHandlerDefinitions(List hdefs)
Sets the definitions of the handlers for the service. |
void |
setInBodyBindingFactory(IBindingFactory factory)
Sets the optional JiBX binding factory used for the request message bodies received by operations. |
void |
setIncludeStackTraceOnFault(boolean includeStackTraceOnFault)
Sets whether a stack trace should be included when a SOAP fault is created as the result of an unhandled error. |
void |
setIndentCount(int indentCount)
Sets the number of spaces to indent output XML. |
void |
setOperationDefinitions(List opdefs)
Sets the operations to be made available for the service. |
void |
setOutBodyBindingFactory(IBindingFactory factory)
Sets the optional JiBX binding factory used for the response message bodies sent by operations. |
void |
setOutputCompletionListener(org.jibx.ws.transport.OutputCompletionListener listener)
Sets the object to be notified of the completion of output. |
void |
setOutputCompletionListenerClassName(String outputCompletionListenerClassName)
Sets the fully qualified name of class to be notified of the completion of output. |
void |
setProtocolName(String name)
Set name of protocol to use for service. |
void |
setServiceClassName(String serviceClassName)
Sets the fully qualified name of class used to process requests for this service. |
void |
setServiceExceptionHandlerClassName(String serviceExceptionHandlerClassName)
Sets the fully qualified name of class used for handling faults. |
void |
setServiceExceptionHandlerObject(org.jibx.ws.server.ServiceExceptionHandler serviceExceptionHandler)
Sets the object to be used for handling exceptions in processing the message or executing the service method. |
void |
setServiceName(String serviceName)
Sets the optional name to be used for this service. |
void |
setServiceObject(Object serviceObject)
Sets the object to be used for processing requests for this service. |
void |
setTransportOptionsDefinitions(List definitions)
Sets the definition of options that are specific to a particular transport. |
void |
setWsdlFilepath(String wsdlFilepath)
Sets the path to an existing WSDL file. |
void |
setWsdlLocationTransform(boolean transform)
Sets whether WSDL locations should be transformed using the location of the WSDL request. |
void |
setXmlOptions(XmlOptions options)
Sets the options for formatting of the outbound XML message for the service. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceDefinition()
Method Detail |
---|
public void init() throws WsConfigurationException
WsConfigurationException
- on configuration errorpublic void setProtocolName(String name)
name
- protocol namepublic String getProtocolName()
public void setIndentCount(int indentCount)
setXmlOptions(XmlOptions)
.
indentCount
- number of spaces to usepublic void setXmlOptions(XmlOptions options)
options
- message optionspublic XmlOptions getXmlOptions()
public void setServiceName(String serviceName)
serviceName
- the service namepublic String getServiceName()
public Object getServiceObject()
public void setServiceObject(Object serviceObject)
Either this method or setServiceClassName(String)
must be called.
serviceObject
- the service service objectpublic void setServiceClassName(String serviceClassName)
Either this method or setServiceObject(Object)
must be called.
serviceClassName
- the full name of the service classpublic Class getServiceClass() throws WsConfigurationException
WsConfigurationException
- if service class unavailablepublic org.jibx.ws.server.ServiceExceptionHandler getServiceExceptionHandlerObject()
public void setServiceExceptionHandlerObject(org.jibx.ws.server.ServiceExceptionHandler serviceExceptionHandler)
Either this method or setServiceExceptionHandlerClassName(String)
must be called.
serviceExceptionHandler
- the service exception handler objectpublic void setServiceExceptionHandlerClassName(String serviceExceptionHandlerClassName) throws WsConfigurationException
Either this method or setServiceExceptionHandlerObject(ServiceExceptionHandler)
must be called.
serviceExceptionHandlerClassName
- the full name of the fault handler class
WsConfigurationException
- if fault handler class unavailablepublic Class getServiceExceptionHandlerClass()
public void setBindingFactory(IBindingFactory factory)
setInBodyBindingFactory(IBindingFactory)
and
setOutBodyBindingFactory(IBindingFactory)
.
If no binding factory is specified, JiBX/WS assumes that there is a single binding factory that includes bindings for all of the possible request and response message bodies, and will look up this factory based on the class of one of the request or response message bodies.
factory
- the binding factory to use for all request and response message bodiespublic void setInBodyBindingFactory(IBindingFactory factory)
factory
- the binding factory to use for all request message bodiespublic IBindingFactory getInBodyBindingFactory()
public void setOutBodyBindingFactory(IBindingFactory factory)
factory
- the binding factory to use for all response message bodiespublic IBindingFactory getOutBodyBindingFactory()
public void setHandlerDefinitions(List hdefs)
hdefs
- a list of HandlerDefinition
public List getHandlerDefinitions()
HandlerDefinition
spublic void setOperationDefinitions(List opdefs)
setServiceClassName(String)
or setServiceObject(Object)
methods.
With the doc/lit style of web services supported by JiBX/WS the input message element name always determines the particular operation to be performed. JiBX/WS actually finds the input message element name corresponding to each operation by doing a reverse lookup of the methods in the service class. Since only one type of object can be associated with an element, there's a fixed linkage between the element name and the object type. This means that the type of the input parameter used for each operation method within a service must be unique.
opdefs
- a list of OperationDefinition
public List getOperationDefinitions()
OperationDefinition
spublic void setIncludeStackTraceOnFault(boolean includeStackTraceOnFault)
includeStackTraceOnFault
- set to true
if a stack trace should be created, false
otherwise.public boolean getIncludeStackTraceOnFault()
true
if a stack trace should be created, false
otherwise.public void setOutputCompletionListenerClassName(String outputCompletionListenerClassName) throws WsConfigurationException
outputCompletionListenerClassName
- the full name of the listener class
WsConfigurationException
- if listener class unavailablesetOutputCompletionListener(OutputCompletionListener)
public void setOutputCompletionListener(org.jibx.ws.transport.OutputCompletionListener listener)
listener
- the listener object to be notifiedsetOutputCompletionListenerClassName(String)
public org.jibx.ws.transport.OutputCompletionListener getOutputCompletionListenerObject()
public Class getOutputCompletionListenerClass()
public void setTransportOptionsDefinitions(List definitions)
definitions
- list of TransportOptionsDefinition
. The list must contain no more than one
TransportOptionsDefinition
object for each TransportOptionsDefinition
class.
IllegalArgumentException
- if a duplicate transport options definition is foundpublic void setWsdlFilepath(String wsdlFilepath)
wsdlFilepath
- path to WSDL filepublic void setWsdlLocationTransform(boolean transform)
transform
- set to true
if a location should be transformed, false
otherwise.
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |