Class BaseDispatch<T>
- java.lang.Object
-
- org.apache.axis2.jaxws.BindingProvider
-
- org.apache.axis2.jaxws.client.dispatch.BaseDispatch<T>
-
- All Implemented Interfaces:
BindingProvider
,Dispatch
,BindingProvider
- Direct Known Subclasses:
JAXBDispatch
,XMLDispatch
public abstract class BaseDispatch<T> extends BindingProvider implements Dispatch
-
-
Field Summary
Fields Modifier and Type Field Description protected InvocationController
ic
protected Service.Mode
mode
protected ServiceClient
serviceClient
-
Fields inherited from class org.apache.axis2.jaxws.BindingProvider
BINDING_PROVIDER, endpointDesc, requestContext, responseContext, serviceDelegate
-
Fields inherited from interface javax.xml.ws.BindingProvider
ENDPOINT_ADDRESS_PROPERTY, PASSWORD_PROPERTY, SESSION_MAINTAIN_PROPERTY, SOAPACTION_URI_PROPERTY, SOAPACTION_USE_PROPERTY, USERNAME_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseDispatch(ServiceDelegate svcDelgate, EndpointDescription epDesc, EndpointReference epr, String addressingNamespace, WebServiceFeature... features)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AsyncResponse
createAsyncResponseListener()
Creates an instance of the AsyncListener that is to be used for waiting for async responses.protected abstract Message
createMessageFromValue(Object value)
Take the input object and turn it into an OMElement so that it can be sent.static WebServiceException
getFaultResponse(MessageContext msgCtx)
Returns the fault that is contained within the MessageContext for an invocation.Service.Mode
getMode()
protected abstract Object
getValueFromMessage(Message message)
Given a message, return the business object based on the requestor's required format (PAYLOAD vs.boolean
hasFaultResponse(MessageContext msgCtx)
Returns a boolean indicating whether or not the MessageContext contained a fault.protected void
initMessageContext(Object obj, MessageContext requestMsgCtx)
Object
invoke(Object obj)
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS.Response
invokeAsync(Object obj)
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS.Future<?>
invokeAsync(Object obj, AsyncHandler asynchandler)
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS.void
invokeOneWay(Object obj)
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS.void
setMode(Service.Mode m)
void
setServiceClient(ServiceClient sc)
-
Methods inherited from class org.apache.axis2.jaxws.BindingProvider
checkMaintainSessionState, getBinding, getEndpointDescription, getEndpointReference, getEndpointReference, getRequestContext, getResponseContext, getServiceDelegate, setupSessionContext, useSoapAction
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.xml.ws.BindingProvider
getBinding, getEndpointReference, getEndpointReference, getRequestContext, getResponseContext
-
-
-
-
Field Detail
-
ic
protected InvocationController ic
-
serviceClient
protected ServiceClient serviceClient
-
mode
protected Service.Mode mode
-
-
Constructor Detail
-
BaseDispatch
protected BaseDispatch(ServiceDelegate svcDelgate, EndpointDescription epDesc, EndpointReference epr, String addressingNamespace, WebServiceFeature... features)
-
-
Method Detail
-
createMessageFromValue
protected abstract Message createMessageFromValue(Object value)
Take the input object and turn it into an OMElement so that it can be sent.- Parameters:
value
-- Returns:
-
getValueFromMessage
protected abstract Object getValueFromMessage(Message message)
Given a message, return the business object based on the requestor's required format (PAYLOAD vs. MESSAGE) and datatype.- Parameters:
message
-- Returns:
-
createAsyncResponseListener
protected abstract AsyncResponse createAsyncResponseListener()
Creates an instance of the AsyncListener that is to be used for waiting for async responses.- Returns:
- a configured AsyncListener instance
-
invoke
public Object invoke(Object obj) throws WebServiceException
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS. For Dispatch, these are: 1) Synchronous invoke() 2) invokeOneWay() 3) invokeAsynch (Future) 4) invokeAsynch (Callback) For Proxy: 5) invokeSEIMethod()- Specified by:
invoke
in interfaceDispatch<T>
- Throws:
WebServiceException
-
initMessageContext
protected void initMessageContext(Object obj, MessageContext requestMsgCtx)
-
invokeOneWay
public void invokeOneWay(Object obj) throws WebServiceException
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS. For Dispatch, these are: 1) Synchronous invoke() 2) invokeOneWay() 3) invokeAsynch (Future) 4) invokeAsynch (Callback) For Proxy: 5) invokeSEIMethod()- Specified by:
invokeOneWay
in interfaceDispatch<T>
- Throws:
WebServiceException
-
invokeAsync
public Future<?> invokeAsync(Object obj, AsyncHandler asynchandler) throws WebServiceException
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS. For Dispatch, these are: 1) Synchronous invoke() 2) invokeOneWay() 3) invokeAsynch (Future) 4) invokeAsynch (Callback) For Proxy: 5) invokeSEIMethod()- Specified by:
invokeAsync
in interfaceDispatch<T>
- Throws:
WebServiceException
-
invokeAsync
public Response invokeAsync(Object obj) throws WebServiceException
Note to developer: When making a change or fix to this method, please consider all 5 Proxy/Dispatch "invoke" methods now available in JAX-WS. For Dispatch, these are: 1) Synchronous invoke() 2) invokeOneWay() 3) invokeAsynch (Future) 4) invokeAsynch (Callback) For Proxy: 5) invokeSEIMethod()- Specified by:
invokeAsync
in interfaceDispatch<T>
- Throws:
WebServiceException
-
setServiceClient
public void setServiceClient(ServiceClient sc)
-
getMode
public Service.Mode getMode()
-
setMode
public void setMode(Service.Mode m)
-
getFaultResponse
public static WebServiceException getFaultResponse(MessageContext msgCtx)
Returns the fault that is contained within the MessageContext for an invocation. If no fault exists, null will be returned.- Parameters:
msgCtx
-- Returns:
-
hasFaultResponse
public boolean hasFaultResponse(MessageContext msgCtx)
Returns a boolean indicating whether or not the MessageContext contained a fault.- Parameters:
msgCtx
-- Returns:
-
-