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 the next parameter will receive a Message from newly created stub. All the methods taking Tube <<next>> parameter are deprecated. JAX-WS Runtime takes care of creating the tubeline when the next parameter is not passed. This gives flexibility for the JAX-WS Runtime to pass extra information during the tube line creation via ClientTubeAssemblerContext.

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 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 service

This object represents a Service that owns the newly created stub. For example, asynchronous method invocation will use Service.getExecutor().

WSEndpointReference epr

If you want the created Dispatch 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.

Author:
Kohsuke Kawaguchi, Kathy Walsh