Class Stubs
- java.lang.Object
-
- com.sun.xml.ws.api.pipe.Stubs
-
public abstract class Stubs extends Object
Factory methods of various stubs.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.
Common Parameters and Their Meanings
Pipe next
Stubs turn a method invocation into a
Pipe.process(com.sun.xml.ws.api.message.Packet)
invocation, and this pipe passed in as thenext
parameter will receive aMessage
from newly created stub. All the methods taking Tube <<next>> parameter are deprecated. JAX-WS Runtime takes care of creating the tubeline when thenext
parameter is not passed. This gives flexibility for the JAX-WS Runtime to pass extra information during the tube line creation viaClientTubeAssemblerContext
.WSPortInfo portInfo
Gives information about the port for which the "stub" being created. Such information includes Port QName, target endpoint address, and bindingId etc.
BindingImpl binding
Stubs implement
BindingProvider
, and itsBindingProvider.getBinding()
will return thisbinding
object. Stubs often also use this information to decide which SOAP version aMessage
should be created in.WSService
serviceThis object represents a
Service
that owns the newly created stub. For example, asynchronous method invocation will useService.getExecutor()
.WSEndpointReference
eprIf you want the created
Dispatch
to talk to the given EPR, specify the parameter. Otherwise leave itnull
. Note that the addressing needs to be enabled separately for this to take effect.- Author:
- Kohsuke Kawaguchi, Kathy Walsh
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static jakarta.xml.ws.Dispatch<jakarta.activation.DataSource>
createDataSourceDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.ws.Service.Mode mode, WSEndpointReference epr)
Creates a newDispatch
stub forDataSource
.static jakarta.xml.ws.Dispatch<jakarta.activation.DataSource>
createDataSourceDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.ws.Service.Mode mode, Tube next, WSEndpointReference epr)
Deprecated.static <T> jakarta.xml.ws.Dispatch<T>
createDispatch(WSPortInfo portInfo, WSService owner, WSBinding binding, Class<T> clazz, jakarta.xml.ws.Service.Mode mode, WSEndpointReference epr)
Creates a newDispatch
stub that connects to the given pipe.static <T> jakarta.xml.ws.Dispatch<T>
createDispatch(QName portName, WSService owner, WSBinding binding, Class<T> clazz, jakarta.xml.ws.Service.Mode mode, Tube next, WSEndpointReference epr)
Creates a newDispatch
stub that connects to the given pipe.static jakarta.xml.ws.Dispatch<Object>
createJAXBDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.bind.JAXBContext jaxbContext, jakarta.xml.ws.Service.Mode mode, WSEndpointReference epr)
Creates a new JAXB-basedDispatch
stub that connects to the given pipe.static jakarta.xml.ws.Dispatch<Object>
createJAXBDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.bind.JAXBContext jaxbContext, jakarta.xml.ws.Service.Mode mode, Tube next, WSEndpointReference epr)
Deprecated.static jakarta.xml.ws.Dispatch<Message>
createMessageDispatch(WSPortInfo portInfo, WSBinding binding, WSEndpointReference epr)
Creates a newMessage
-basedDispatch
stub that connects to the given pipe.static jakarta.xml.ws.Dispatch<Message>
createMessageDispatch(QName portName, WSService owner, WSBinding binding, Tube next, WSEndpointReference epr)
Deprecated.static jakarta.xml.ws.Dispatch<Packet>
createPacketDispatch(WSPortInfo portInfo, WSBinding binding, WSEndpointReference epr)
Creates a newMessage
-basedDispatch
stub that connects to the given pipe.static jakarta.xml.ws.Dispatch<Packet>
createPacketDispatch(QName portName, WSService owner, WSBinding binding, Tube next, WSEndpointReference epr)
Creates a newPacket
-basedDispatch
stub that connects to the given pipe.<T> T
createPortProxy(WSPortInfo portInfo, WSBinding binding, SEIModel model, Class<T> portInterface, WSEndpointReference epr)
Creates a new strongly-typed proxy object that implements a given port interface.<T> T
createPortProxy(WSService service, WSBinding binding, SEIModel model, Class<T> portInterface, Tube next, WSEndpointReference epr)
Creates a new strongly-typed proxy object that implements a given port interface.static jakarta.xml.ws.Dispatch<jakarta.xml.soap.SOAPMessage>
createSAAJDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.ws.Service.Mode mode, WSEndpointReference epr)
Creates a newDispatch
stub forSOAPMessage
.static jakarta.xml.ws.Dispatch<jakarta.xml.soap.SOAPMessage>
createSAAJDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.ws.Service.Mode mode, Tube next, WSEndpointReference epr)
Deprecated.static jakarta.xml.ws.Dispatch<Source>
createSourceDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.ws.Service.Mode mode, WSEndpointReference epr)
Creates a newDispatch
stub forSource
.static jakarta.xml.ws.Dispatch<Source>
createSourceDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.ws.Service.Mode mode, Tube next, WSEndpointReference epr)
Deprecated.
-
-
-
Method Detail
-
createSAAJDispatch
@Deprecated public static jakarta.xml.ws.Dispatch<jakarta.xml.soap.SOAPMessage> createSAAJDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.ws.Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Deprecated.Creates a newDispatch
stub forSOAPMessage
. This is short-cut of callingcreateDispatch(port,owner,binding,SOAPMessage.class,mode,next);
-
createSAAJDispatch
public static jakarta.xml.ws.Dispatch<jakarta.xml.soap.SOAPMessage> createSAAJDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.ws.Service.Mode mode, @Nullable WSEndpointReference epr)
Creates a newDispatch
stub forSOAPMessage
. This is short-cut of callingcreateDispatch(port,owner,binding,SOAPMessage.class,mode,next);
-
createDataSourceDispatch
@Deprecated public static jakarta.xml.ws.Dispatch<jakarta.activation.DataSource> createDataSourceDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.ws.Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Deprecated.Creates a newDispatch
stub forDataSource
. This is short-cut of callingcreateDispatch(port,owner,binding,DataSource.class,mode,next);
-
createDataSourceDispatch
public static jakarta.xml.ws.Dispatch<jakarta.activation.DataSource> createDataSourceDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.ws.Service.Mode mode, @Nullable WSEndpointReference epr)
Creates a newDispatch
stub forDataSource
. This is short-cut of callingcreateDispatch(port,owner,binding,DataSource.class,mode,next);
-
createSourceDispatch
@Deprecated public static jakarta.xml.ws.Dispatch<Source> createSourceDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.ws.Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Deprecated.Creates a newDispatch
stub forSource
. This is short-cut of callingcreateDispatch(port,owner,binding,Source.class,mode,next);
-
createSourceDispatch
public static jakarta.xml.ws.Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.ws.Service.Mode mode, @Nullable WSEndpointReference epr)
Creates a newDispatch
stub forSource
. This is short-cut of callingcreateDispatch(port,owner,binding,Source.class,mode,next);
-
createDispatch
public static <T> jakarta.xml.ws.Dispatch<T> createDispatch(QName portName, WSService owner, WSBinding binding, Class<T> clazz, jakarta.xml.ws.Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Creates a newDispatch
stub that connects to the given pipe.- Parameters:
portName
- seeService.createDispatch(QName, Class, Service.Mode)
.owner
- see common parametersbinding
- see common parametersclazz
- Type of theDispatch
to be created. SeeService.createDispatch(QName, Class, Service.Mode)
.mode
- The mode of the dispatch. SeeService.createDispatch(QName, Class, Service.Mode)
.next
- see common parametersepr
- see common parameters TODO: are these parameters making sense?
-
createDispatch
public static <T> jakarta.xml.ws.Dispatch<T> createDispatch(WSPortInfo portInfo, WSService owner, WSBinding binding, Class<T> clazz, jakarta.xml.ws.Service.Mode mode, @Nullable WSEndpointReference epr)
Creates a newDispatch
stub that connects to the given pipe.- Parameters:
portInfo
- see common parametersowner
- see common parametersbinding
- see common parametersclazz
- Type of theDispatch
to be created. SeeService.createDispatch(QName, Class, Service.Mode)
.mode
- The mode of the dispatch. SeeService.createDispatch(QName, Class, Service.Mode)
.epr
- see common parameters TODO: are these parameters making sense?
-
createJAXBDispatch
@Deprecated public static jakarta.xml.ws.Dispatch<Object> createJAXBDispatch(QName portName, WSService owner, WSBinding binding, jakarta.xml.bind.JAXBContext jaxbContext, jakarta.xml.ws.Service.Mode mode, Tube next, @Nullable WSEndpointReference epr)
Deprecated.Creates a new JAXB-basedDispatch
stub that connects to the given pipe.- Parameters:
portName
- seeService.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. SeeService.createDispatch(QName, Class, Service.Mode)
.next
- see common parametersepr
- see common parameters
-
createJAXBDispatch
public static jakarta.xml.ws.Dispatch<Object> createJAXBDispatch(WSPortInfo portInfo, WSBinding binding, jakarta.xml.bind.JAXBContext jaxbContext, jakarta.xml.ws.Service.Mode mode, @Nullable WSEndpointReference epr)
Creates a new JAXB-basedDispatch
stub that connects to the given pipe.- Parameters:
portInfo
- see common parametersbinding
- see common parametersjaxbContext
-JAXBContext
used to convert between objects and XML.mode
- The mode of the dispatch. SeeService.createDispatch(QName, Class, Service.Mode)
.epr
- see common parameters
-
createMessageDispatch
@Deprecated public static jakarta.xml.ws.Dispatch<Message> createMessageDispatch(QName portName, WSService owner, WSBinding binding, Tube next, @Nullable WSEndpointReference epr)
Deprecated.Creates a newMessage
-basedDispatch
stub that connects to the given pipe. The returned dispatch is alwaysService.Mode.MESSAGE
.- Parameters:
portName
- seeService.createDispatch(QName, Class, Service.Mode)
.owner
- see common parametersbinding
- see common parametersnext
- see common parametersepr
- see common parameters
-
createMessageDispatch
public static jakarta.xml.ws.Dispatch<Message> createMessageDispatch(WSPortInfo portInfo, WSBinding binding, @Nullable WSEndpointReference epr)
Creates a newMessage
-basedDispatch
stub that connects to the given pipe. The returned dispatch is alwaysService.Mode.MESSAGE
.- Parameters:
portInfo
- see common parametersbinding
- see common parametersepr
- see common parameters
-
createPacketDispatch
public static jakarta.xml.ws.Dispatch<Packet> createPacketDispatch(QName portName, WSService owner, WSBinding binding, Tube next, @Nullable WSEndpointReference epr)
Creates a newPacket
-basedDispatch
stub that connects to the given pipe.- Parameters:
portName
- seeService.createDispatch(QName, Class, Service.Mode)
.owner
- see common parametersbinding
- see common parametersnext
- see common parametersepr
- see common parameters
-
createPacketDispatch
public static jakarta.xml.ws.Dispatch<Packet> createPacketDispatch(WSPortInfo portInfo, WSBinding binding, @Nullable WSEndpointReference epr)
Creates a newMessage
-basedDispatch
stub that connects to the given pipe. The returned dispatch is alwaysService.Mode.MESSAGE
.- Parameters:
portInfo
- see common parametersbinding
- see common parametersepr
- see common parameters
-
createPortProxy
public <T> T createPortProxy(WSService service, WSBinding binding, SEIModel model, Class<T> portInterface, Tube next, @Nullable WSEndpointReference epr)
Creates a new strongly-typed proxy object that implements a given port interface.- Parameters:
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 parameters
-
createPortProxy
public <T> T createPortProxy(WSPortInfo portInfo, WSBinding binding, SEIModel model, Class<T> portInterface, @Nullable WSEndpointReference epr)
Creates a new strongly-typed proxy object that implements a given port interface.- Parameters:
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 parameters
-
-