Class JAXWSProxyHandler
java.lang.Object
org.apache.axis2.jaxws.BindingProvider
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler
- All Implemented Interfaces:
jakarta.xml.ws.BindingProvider,InvocationHandler,BindingProvider
ProxyHandler is the java.lang.reflect.InvocationHandler implementation. When a JAX-WS client
calls the method on a proxy object, created by calling the ServiceDelegate.getPort(...) method,
the inovke method on the ProxyHandler is called.
ProxyHandler uses EndpointInterfaceDescriptor and finds out if 1) The client call is Document
Literal or Rpc Literal 2) The WSDL is wrapped or unWrapped.
ProxyHandler then reads OperationDescription using Method name called by Client From
OperationDescription it does the following 1) if the wsdl isWrapped() reads RequestWrapper Class
and responseWrapperClass 2) then reads the webParams for the Operation.
isWrapped() = true and DocLiteral then ProxyHandler then uses WrapperTool to create Request that
is a Wrapped JAXBObject. Creates JAXBBlock using JAXBBlockFactory Creates MessageContext->Message
and sets JAXBBlock to xmlPart as RequestMsgCtx in InvocationContext. Makes call to
InvocationController. Reads ResponseMsgCtx ->MessageCtx->Message->XMLPart. Converts that to
JAXBlock using JAXBBlockFactory and returns the BO from this JAXBBlock.
isWrapped() != true and DocLiteral then ProxyHandler creates the JAXBBlock for the input request
creates a MessageContext that is then used by IbvocationController to invoke. Response is read
and return object is derived using @Webresult annotation. A JAXBBlock is created from the
Response and the BO from JAXBBlock is returned.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected InvocationControllerprotected org.apache.axis2.jaxws.description.ServiceDescriptionFields inherited from class org.apache.axis2.jaxws.BindingProvider
BINDING_PROVIDER, endpointDesc, requestContext, responseContext, serviceDelegateFields inherited from interface jakarta.xml.ws.BindingProvider
ENDPOINT_ADDRESS_PROPERTY, PASSWORD_PROPERTY, SESSION_MAINTAIN_PROPERTY, SOAPACTION_URI_PROPERTY, SOAPACTION_USE_PROPERTY, USERNAME_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionJAXWSProxyHandler(ServiceDelegate delegate, Class seiClazz, org.apache.axis2.jaxws.description.EndpointDescription epDesc, jakarta.xml.ws.WebServiceFeature... features) JAXWSProxyHandler(ServiceDelegate delegate, Class seiClazz, org.apache.axis2.jaxws.description.EndpointDescription epDesc, org.apache.axis2.addressing.EndpointReference epr, String addressingNamespace, jakarta.xml.ws.WebServiceFeature... features) -
Method Summary
Modifier and TypeMethodDescriptionprotected MessageContextcreateRequest(Method method, Object[] args) Creates a request MessageContext for the method call.protected ObjectcreateResponse(Method method, Object[] args, MessageContext responseContext, org.apache.axis2.jaxws.description.OperationDescription operationDesc) Creates a response MessageContext for the method call.protected static ThrowablegetFaultResponse(MessageContext msgCtx, org.apache.axis2.jaxws.description.OperationDescription opDesc) protected static booleanprotected booleanisAsync()voidsetSeiClazz(Class seiClazz) Methods inherited from class org.apache.axis2.jaxws.BindingProvider
checkMaintainSessionState, getBinding, getEndpointDescription, getEndpointReference, getEndpointReference, getRequestContext, getResponseContext, getServiceDelegate, setupSessionContext, useSoapAction
-
Field Details
-
serviceDesc
protected org.apache.axis2.jaxws.description.ServiceDescription serviceDesc -
controller
-
-
Constructor Details
-
JAXWSProxyHandler
public JAXWSProxyHandler(ServiceDelegate delegate, Class seiClazz, org.apache.axis2.jaxws.description.EndpointDescription epDesc, jakarta.xml.ws.WebServiceFeature... features) -
JAXWSProxyHandler
public JAXWSProxyHandler(ServiceDelegate delegate, Class seiClazz, org.apache.axis2.jaxws.description.EndpointDescription epDesc, org.apache.axis2.addressing.EndpointReference epr, String addressingNamespace, jakarta.xml.ws.WebServiceFeature... features)
-
-
Method Details
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
isAsync
protected boolean isAsync() -
createRequest
Creates a request MessageContext for the method call. This request context will be used by InvocationController to route the method call to axis engine.- Parameters:
method- - The method invoked on the proxy object.args- - The parameter list- Returns:
- A MessageContext that can be used for the invocation
- Throws:
Throwable
-
createResponse
protected Object createResponse(Method method, Object[] args, MessageContext responseContext, org.apache.axis2.jaxws.description.OperationDescription operationDesc) throws Throwable Creates a response MessageContext for the method call. This response context will be used to create response result to the client call.- Parameters:
method- - The method invoked on the proxy object.args- - The parameter list.responseContext- - The MessageContext to be used for the response.operationDesc- - The OperationDescription that for the invoked method.- Returns:
- Throws:
Throwable
-
getFaultResponse
protected static Throwable getFaultResponse(MessageContext msgCtx, org.apache.axis2.jaxws.description.OperationDescription opDesc) -
hasFaultResponse
-
getSeiClazz
-
setSeiClazz
-