public abstract class Stubs extends Object
This class provides various methods to create "stub"s,
which are the component that turns a method invocation
into a Message
and back into a return value.
This class is meant to serve as the API from JAX-WS to Tango, so that they don't have hard-code dependency on our implementation classes.
Stubs turn a method invocation into a Gives information about the port for which the "stub" being created. Such information includes Port QName,
target endpoint address, and bindingId etc.
Stubs implement
This object represents a
If you want the created Pipe.process(com.sun.xml.ws.api.message.Packet)
invocation,
and this pipe passed in as the next parameter will receive a Message
from newly created stub. All the methods taking Tube <ClientTubeAssemblerContext
.
WSPortInfo portInfo
BindingImpl binding
BindingProvider
, and its BindingProvider.getBinding()
will return this binding object. Stubs often also use this information
to decide which SOAP version a Message
should be created in.
WSService
serviceService
that owns the newly created stub.
For example, asynchronous method invocation will use Service.getExecutor()
.
WSEndpointReference
eprDispatch
to talk to the given EPR, specify the parameter.
Otherwise leave it null. Note that the addressing needs to be enabled separately
for this to take effect.
@Deprecated public static Dispatch<javax.xml.soap.SOAPMessage> createSAAJDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Dispatch
stub for SOAPMessage
.
This is short-cut of calling
createDispatch(port,owner,binding,SOAPMessage.class,mode,next);
public static Dispatch<javax.xml.soap.SOAPMessage> createSAAJDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode, @Nullable WSEndpointReference epr)
Dispatch
stub for SOAPMessage
.
This is short-cut of calling
createDispatch(port,owner,binding,SOAPMessage.class,mode,next);
@Deprecated public static Dispatch<javax.activation.DataSource> createDataSourceDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Dispatch
stub for DataSource
.
This is short-cut of calling
createDispatch(port,owner,binding,DataSource.class,mode,next);
public static Dispatch<javax.activation.DataSource> createDataSourceDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode, @Nullable WSEndpointReference epr)
Dispatch
stub for DataSource
.
This is short-cut of calling
createDispatch(port,owner,binding,DataSource.class,mode,next);
@Deprecated public static Dispatch<Source> createSourceDispatch(QName portName, WSService owner, WSBinding binding, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
public static Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, WSBinding binding, Service.Mode mode, @Nullable WSEndpointReference epr)
public static <T> Dispatch<T> createDispatch(QName portName, WSService owner, WSBinding binding, Class<T> clazz, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Dispatch
stub that connects to the given pipe.portName
- see Service.createDispatch(QName, Class, Service.Mode)
.owner
- see common parametersbinding
- see common parametersclazz
- Type of the Dispatch
to be created.
See Service.createDispatch(QName, Class, Service.Mode)
.mode
- The mode of the dispatch.
See Service.createDispatch(QName, Class, Service.Mode)
.next
- see common parametersepr
- see common parameters
TODO: are these parameters making sense?public static <T> Dispatch<T> createDispatch(WSPortInfo portInfo, WSService owner, WSBinding binding, Class<T> clazz, Service.Mode mode, @Nullable WSEndpointReference epr)
Dispatch
stub that connects to the given pipe.portInfo
- see common parametersowner
- see common parametersbinding
- see common parametersclazz
- Type of the Dispatch
to be created.
See Service.createDispatch(QName, Class, Service.Mode)
.mode
- The mode of the dispatch.
See Service.createDispatch(QName, Class, Service.Mode)
.epr
- see common parameters
TODO: are these parameters making sense?@Deprecated public static Dispatch<Object> createJAXBDispatch(QName portName, WSService owner, WSBinding binding, JAXBContext jaxbContext, Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Dispatch
stub that connects to the given pipe.portName
- see Service.createDispatch(QName, Class, Service.Mode)
.owner
- see common parametersbinding
- see common parametersjaxbContext
- JAXBContext
used to convert between objects and XML.mode
- The mode of the dispatch.
See Service.createDispatch(QName, Class, Service.Mode)
.next
- see common parametersepr
- see common parameterspublic static Dispatch<Object> createJAXBDispatch(WSPortInfo portInfo, WSBinding binding, JAXBContext jaxbContext, Service.Mode mode, @Nullable WSEndpointReference epr)
Dispatch
stub that connects to the given pipe.portInfo
- see common parametersbinding
- see common parametersjaxbContext
- JAXBContext
used to convert between objects and XML.mode
- The mode of the dispatch.
See Service.createDispatch(QName, Class, Service.Mode)
.epr
- see common parameters@Deprecated public static Dispatch<Message> createMessageDispatch(QName portName, WSService owner, WSBinding binding, Tube next, @Nullable WSEndpointReference epr)
Message
-based Dispatch
stub that connects to the given pipe.
The returned dispatch is always Service.Mode#MESSAGE
.portName
- see Service.createDispatch(QName, Class, Service.Mode)
.owner
- see common parametersbinding
- see common parametersnext
- see common parametersepr
- see common parameterspublic static Dispatch<Message> createMessageDispatch(WSPortInfo portInfo, WSBinding binding, @Nullable WSEndpointReference epr)
Message
-based Dispatch
stub that connects to the given pipe.
The returned dispatch is always Service.Mode#MESSAGE
.portInfo
- see common parametersbinding
- see common parametersepr
- see common parameterspublic static Dispatch<Packet> createPacketDispatch(QName portName, WSService owner, WSBinding binding, Tube next, @Nullable WSEndpointReference epr)
portName
- see Service.createDispatch(QName, Class, Service.Mode)
.owner
- see common parametersbinding
- see common parametersnext
- see common parametersepr
- see common parameterspublic static Dispatch<Packet> createPacketDispatch(WSPortInfo portInfo, WSBinding binding, @Nullable WSEndpointReference epr)
Message
-based Dispatch
stub that connects to the given pipe.
The returned dispatch is always Service.Mode#MESSAGE
.portInfo
- see common parametersbinding
- see common parametersepr
- see common parameterspublic <T> T createPortProxy(WSService service, WSBinding binding, SEIModel model, Class<T> portInterface, Tube next, @Nullable WSEndpointReference epr)
service
- see common parametersbinding
- see common parametersmodel
- This model shall represent a port interface.
TODO: can model be constructed from portInterface and binding?
Find out and update.portInterface
- The port interface that has operations as Java methods.next
- see common parametersepr
- see common parameterspublic <T> T createPortProxy(WSPortInfo portInfo, WSBinding binding, SEIModel model, Class<T> portInterface, @Nullable WSEndpointReference epr)
portInfo
- see common parametersbinding
- see common parametersmodel
- This model shall represent a port interface.
TODO: can model be constructed from portInterface and binding?
Find out and update.portInterface
- The port interface that has operations as Java methods.epr
- see common parametersCopyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.