src/share/jaxws_classes/javax/xml/ws/spi/ServiceDelegate.java

Print this page
rev 507 : 8047724: @since tag cleanup in jaxws
Reviewed-by:


  30 import javax.xml.ws.Dispatch;
  31 import javax.xml.ws.Service;
  32 import javax.xml.ws.handler.HandlerResolver;
  33 import javax.xml.ws.WebServiceFeature;
  34 import javax.xml.bind.JAXBContext;
  35 import javax.xml.ws.EndpointReference;
  36 import javax.xml.ws.WebServiceException;
  37 
  38 
  39 /**
  40  * Service delegates are used internally by <code>Service</code> objects
  41  * to allow pluggability of JAX-WS implementations.
  42  * <p>
  43  * Every <code>Service</code> object has its own delegate, created using
  44  * the {@link javax.xml.ws.spi.Provider#createServiceDelegate} method. A <code>Service</code>
  45  * object delegates all of its instance methods to its delegate.
  46  *
  47  * @see javax.xml.ws.Service
  48  * @see javax.xml.ws.spi.Provider
  49  *
  50  * @since JAX-WS 2.0
  51  */
  52 public abstract class ServiceDelegate {
  53 
  54     protected ServiceDelegate() {
  55     }
  56 
  57     /**
  58      * The <code>getPort</code> method returns a proxy. A service client
  59      * uses this proxy to invoke operations on the target
  60      * service endpoint. The <code>serviceEndpointInterface</code>
  61      * specifies the service endpoint interface that is supported by
  62      * the created dynamic proxy instance.
  63      *
  64      * @param portName  Qualified name of the service endpoint in
  65      *                  the WSDL service description
  66      * @param serviceEndpointInterface Service endpoint interface
  67      *                  supported by the dynamic proxy
  68      * @return Object Proxy instance that
  69      *                supports the specified service endpoint
  70      *                interface


 102      * @return Object Proxy instance that
 103      *                supports the specified service endpoint
 104      *                interface
 105      * @throws WebServiceException This exception is thrown in the
 106      *                  following cases:
 107      *                  <UL>
 108      *                  <LI>If there is an error in creation of
 109      *                      the proxy
 110      *                  <LI>If there is any missing WSDL metadata
 111      *                      as required by this method
 112      *                  <LI>If an illegal
 113      *                      <code>serviceEndpointInterface</code>
 114      *                      or <code>portName</code> is specified
 115      *                  <LI>If a feature is enabled that is not compatible
 116      *                      with this port or is unsupported.
 117      *                  </UL>
 118      * @see java.lang.reflect.Proxy
 119      * @see java.lang.reflect.InvocationHandler
 120      * @see WebServiceFeature
 121      *
 122      * @since JAX-WS 2.1
 123      **/
 124     public abstract <T> T getPort(QName portName,
 125             Class<T> serviceEndpointInterface, WebServiceFeature... features);
 126 
 127     /**
 128      * The <code>getPort</code> method returns a proxy.
 129      * The parameter <code>endpointReference</code> specifies the
 130      * endpoint that will be invoked by the returned proxy.  If there
 131      * are any reference parameters in the
 132      * <code>endpointReference</code>, then those reference
 133      * parameters MUST appear as SOAP headers, indicating them to be
 134      * reference parameters, on all messages sent to the endpoint.
 135      * The <code>endpointReference's</code> address MUST be used
 136      * for invocations on the endpoint.
 137      * The parameter <code>serviceEndpointInterface</code> specifies
 138      * the service endpoint interface that is supported by the
 139      * returned proxy.
 140      * In the implementation of this method, the JAX-WS
 141      * runtime system takes the responsibility of selecting a protocol
 142      * binding (and a port) and configuring the proxy accordingly from


 177      *                  <UL>
 178      *                  <LI>If there is an error during creation
 179      *                      of the proxy.
 180      *                  <LI>If there is any missing WSDL metadata
 181      *                      as required by this method.
 182      *                  <LI>If the <code>endpointReference</code> metadata does
 183      *                      not match the <code>serviceName</code> of this
 184      *                      <code>Service</code> instance.
 185      *                  <LI>If a <code>portName</code> cannot be extracted
 186      *                      from the WSDL or <code>endpointReference</code> metadata.
 187      *                  <LI>If an invalid
 188      *                      <code>endpointReference</code>
 189      *                      is specified.
 190      *                  <LI>If an invalid
 191      *                      <code>serviceEndpointInterface</code>
 192      *                      is specified.
 193      *                  <LI>If a feature is enabled that is not compatible
 194      *                      with this port or is unsupported.
 195      *                  </UL>
 196      *
 197      * @since JAX-WS 2.1
 198      **/
 199     public abstract <T> T getPort(EndpointReference endpointReference,
 200            Class<T> serviceEndpointInterface, WebServiceFeature... features);
 201 
 202 
 203     /**
 204      * The <code>getPort</code> method returns a proxy. The parameter
 205      * <code>serviceEndpointInterface</code> specifies the service
 206      * endpoint interface that is supported by the returned proxy.
 207      * In the implementation of this method, the JAX-WS
 208      * runtime system takes the responsibility of selecting a protocol
 209      * binding (and a port) and configuring the proxy accordingly.
 210      * The returned proxy should not be reconfigured by the client.
 211      *
 212      * @param serviceEndpointInterface Service endpoint interface
 213      * @return Object instance that supports the
 214      *                  specified service endpoint interface
 215      * @throws WebServiceException
 216      *                  <UL>
 217      *                  <LI>If there is an error during creation


 239      * @param features  An array of <code>WebServiceFeatures</code> to configure on the
 240      *                proxy.  Supported features not in the <code>features
 241      *                </code> parameter will have their default values.
 242      * @return Object instance that supports the
 243      *                  specified service endpoint interface
 244      * @throws WebServiceException
 245      *                  <UL>
 246      *                  <LI>If there is an error during creation
 247      *                      of the proxy
 248      *                  <LI>If there is any missing WSDL metadata
 249      *                      as required by this method
 250      *                  <LI>If an illegal
 251      *                      <code>serviceEndpointInterface</code>
 252      *                      is specified
 253      *                  <LI>If a feature is enabled that is not compatible
 254      *                      with this port or is unsupported.
 255      *                  </UL>
 256      *
 257      * @see WebServiceFeature
 258      *
 259      * @since JAX-WS 2.1
 260      **/
 261     public abstract <T> T getPort(Class<T> serviceEndpointInterface,
 262             WebServiceFeature... features);
 263 
 264 
 265     /**
 266      * Creates a new port for the service. Ports created in this way contain
 267      * no WSDL port type information and can only be used for creating
 268      * <code>Dispatch</code>instances.
 269      *
 270      * @param portName  Qualified name for the target service endpoint
 271      * @param bindingId A URI identifier of a binding.
 272      * @param endpointAddress Address of the target service endpoint as a URI
 273      * @throws WebServiceException If any error in the creation of
 274      * the port
 275      *
 276      * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
 277      * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
 278      * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
 279      **/


 317      * @param mode Controls whether the created dispatch instance is message
 318      * or payload oriented, i.e. whether the user will work with complete
 319      * protocol messages or message payloads. E.g. when using the SOAP
 320      * protocol, this parameter controls whether the user will work with
 321      * SOAP messages or the contents of a SOAP body. Mode MUST be <code>MESSAGE</code>
 322      * when type is <code>SOAPMessage</code>.
 323      * @param features  A list of <code>WebServiceFeatures</code> to configure on the
 324      *                proxy.  Supported features not in the <code>features
 325      *                </code> parameter will have their default values.
 326      *
 327      * @return Dispatch instance
 328      * @throws WebServiceException If any error in the creation of
 329      *                  the <code>Dispatch</code> object or if a
 330      *                  feature is enabled that is not compatible with
 331      *                  this port or is unsupported.
 332      *
 333      * @see javax.xml.transform.Source
 334      * @see javax.xml.soap.SOAPMessage
 335      * @see WebServiceFeature
 336      *
 337      * @since JAX-WS 2.1
 338      **/
 339     public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
 340             Service.Mode mode, WebServiceFeature... features);
 341 
 342     /**
 343      * Creates a <code>Dispatch</code> instance for use with objects of
 344      * the user's choosing. If there
 345      * are any reference parameters in the
 346      * <code>endpointReference</code>, then those reference
 347      * parameters MUST appear as SOAP headers, indicating them to be
 348      * reference parameters, on all messages sent to the endpoint.
 349      * The <code>endpointReference's</code> address MUST be used
 350      * for invocations on the endpoint.
 351      * In the implementation of this method, the JAX-WS
 352      * runtime system takes the responsibility of selecting a protocol
 353      * binding (and a port) and configuring the dispatch accordingly from
 354      * the WSDL associated with this <code>Service</code> instance or
 355      * from the metadata from the <code>endpointReference</code>.
 356      * If this <code>Service</code> instance has a WSDL and
 357      * the <code>endpointReference</code>


 389      * @throws WebServiceException
 390      *                  <UL>
 391      *                    <LI>If there is any missing WSDL metadata
 392      *                      as required by this method.
 393      *                    <li>If the <code>endpointReference</code> metadata does
 394      *                      not match the <code>serviceName</code> or <code>portName</code>
 395      *                      of a WSDL associated
 396      *                      with this <code>Service</code> instance.
 397      *                    <li>If the <code>portName</code> cannot be determined
 398      *                    from the <code>EndpointReference</code> metadata.
 399      *                    <li>If any error in the creation of
 400      *                     the <code>Dispatch</code> object.
 401      *                    <li>If a feature is enabled that is not
 402      *                    compatible with this port or is unsupported.
 403      *                  </UL>
 404      *
 405      * @see javax.xml.transform.Source
 406      * @see javax.xml.soap.SOAPMessage
 407      * @see WebServiceFeature
 408      *
 409      * @since JAX-WS 2.1
 410      **/
 411     public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
 412             Class<T> type, Service.Mode mode,
 413             WebServiceFeature... features);
 414 
 415 
 416 
 417     /**
 418      * Creates a <code>Dispatch</code> instance for use with JAXB
 419      * generated objects.
 420      *
 421      * @param portName  Qualified name for the target service endpoint
 422      * @param context The JAXB context used to marshall and unmarshall
 423      * messages or message payloads.
 424      * @param mode Controls whether the created dispatch instance is message
 425      * or payload oriented, i.e. whether the user will work with complete
 426      * protocol messages or message payloads. E.g. when using the SOAP
 427      * protocol, this parameter controls whether the user will work with
 428      * SOAP messages or the contents of a SOAP body.
 429      *


 445      * @param context The JAXB context used to marshall and unmarshall
 446      * messages or message payloads.
 447      * @param mode Controls whether the created dispatch instance is message
 448      * or payload oriented, i.e. whether the user will work with complete
 449      * protocol messages or message payloads. E.g. when using the SOAP
 450      * protocol, this parameter controls whether the user will work with
 451      * SOAP messages or the contents of a SOAP body.
 452      * @param features  A list of <code>WebServiceFeatures</code> to configure on the
 453      *                proxy.  Supported features not in the <code>features
 454      *                </code> parameter will have their default values.
 455      *
 456      * @return Dispatch instance
 457      * @throws WebServiceException If any error in the creation of
 458      *                  the <code>Dispatch</code> object or if a
 459      *                  feature is enabled that is not compatible with
 460      *                  this port or is unsupported.
 461      *
 462      * @see javax.xml.bind.JAXBContext
 463      * @see WebServiceFeature
 464      *
 465      * @since JAX-WS 2.1
 466      **/
 467     public abstract Dispatch<Object> createDispatch(QName portName,
 468             JAXBContext context, Service.Mode mode, WebServiceFeature... features);
 469 
 470     /**
 471      * Creates a <code>Dispatch</code> instance for use with JAXB
 472      * generated objects. If there
 473      * are any reference parameters in the
 474      * <code>endpointReference</code>, then those reference
 475      * parameters MUST appear as SOAP headers, indicating them to be
 476      * reference parameters, on all messages sent to the endpoint.
 477      * The <code>endpointReference's</code> address MUST be used
 478      * for invocations on the endpoint.
 479      * In the implementation of this method, the JAX-WS
 480      * runtime system takes the responsibility of selecting a protocol
 481      * binding (and a port) and configuring the dispatch accordingly from
 482      * the WSDL associated with this <code>Service</code> instance or
 483      * from the metadata from the <code>endpointReference</code>.
 484      * If this <code>Service</code> instance has a WSDL and
 485      * the <code>endpointReference</code>


 515      * @return Dispatch instance
 516      * @throws WebServiceException
 517      *                  <UL>
 518      *                    <li>If there is any missing WSDL metadata
 519      *                      as required by this method.
 520      *                    <li>If the <code>endpointReference</code> metadata does
 521      *                    not match the <code>serviceName</code> or <code>portName</code>
 522      *                    of a WSDL associated
 523      *                    with this <code>Service</code> instance.
 524      *                    <li>If the <code>portName</code> cannot be determined
 525      *                    from the <code>EndpointReference</code> metadata.
 526      *                    <li>If any error in the creation of
 527      *                    the <code>Dispatch</code> object.
 528      *                    <li>if a feature is enabled that is not
 529      *                    compatible with this port or is unsupported.
 530      *                  </UL>
 531      *
 532      * @see javax.xml.bind.JAXBContext
 533      * @see WebServiceFeature
 534      *
 535      * @since JAX-WS 2.1
 536     **/
 537     public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
 538             JAXBContext context, Service.Mode mode,
 539             WebServiceFeature... features);
 540 
 541 
 542     /**
 543      * Gets the name of this service.
 544      * @return Qualified name of this service
 545      **/
 546     public abstract QName getServiceName();
 547 
 548     /**
 549      * Returns an <code>Iterator</code> for the list of
 550      * <code>QName</code>s of service endpoints grouped by this
 551      * service
 552      *
 553      * @return Returns <code>java.util.Iterator</code> with elements
 554      *         of type <code>javax.xml.namespace.QName</code>
 555      * @throws WebServiceException If this Service class does not




  30 import javax.xml.ws.Dispatch;
  31 import javax.xml.ws.Service;
  32 import javax.xml.ws.handler.HandlerResolver;
  33 import javax.xml.ws.WebServiceFeature;
  34 import javax.xml.bind.JAXBContext;
  35 import javax.xml.ws.EndpointReference;
  36 import javax.xml.ws.WebServiceException;
  37 
  38 
  39 /**
  40  * Service delegates are used internally by <code>Service</code> objects
  41  * to allow pluggability of JAX-WS implementations.
  42  * <p>
  43  * Every <code>Service</code> object has its own delegate, created using
  44  * the {@link javax.xml.ws.spi.Provider#createServiceDelegate} method. A <code>Service</code>
  45  * object delegates all of its instance methods to its delegate.
  46  *
  47  * @see javax.xml.ws.Service
  48  * @see javax.xml.ws.spi.Provider
  49  *
  50  * @since 1.6, JAX-WS 2.0
  51  */
  52 public abstract class ServiceDelegate {
  53 
  54     protected ServiceDelegate() {
  55     }
  56 
  57     /**
  58      * The <code>getPort</code> method returns a proxy. A service client
  59      * uses this proxy to invoke operations on the target
  60      * service endpoint. The <code>serviceEndpointInterface</code>
  61      * specifies the service endpoint interface that is supported by
  62      * the created dynamic proxy instance.
  63      *
  64      * @param portName  Qualified name of the service endpoint in
  65      *                  the WSDL service description
  66      * @param serviceEndpointInterface Service endpoint interface
  67      *                  supported by the dynamic proxy
  68      * @return Object Proxy instance that
  69      *                supports the specified service endpoint
  70      *                interface


 102      * @return Object Proxy instance that
 103      *                supports the specified service endpoint
 104      *                interface
 105      * @throws WebServiceException This exception is thrown in the
 106      *                  following cases:
 107      *                  <UL>
 108      *                  <LI>If there is an error in creation of
 109      *                      the proxy
 110      *                  <LI>If there is any missing WSDL metadata
 111      *                      as required by this method
 112      *                  <LI>If an illegal
 113      *                      <code>serviceEndpointInterface</code>
 114      *                      or <code>portName</code> is specified
 115      *                  <LI>If a feature is enabled that is not compatible
 116      *                      with this port or is unsupported.
 117      *                  </UL>
 118      * @see java.lang.reflect.Proxy
 119      * @see java.lang.reflect.InvocationHandler
 120      * @see WebServiceFeature
 121      *
 122      * @since 1.6, JAX-WS 2.1
 123      **/
 124     public abstract <T> T getPort(QName portName,
 125             Class<T> serviceEndpointInterface, WebServiceFeature... features);
 126 
 127     /**
 128      * The <code>getPort</code> method returns a proxy.
 129      * The parameter <code>endpointReference</code> specifies the
 130      * endpoint that will be invoked by the returned proxy.  If there
 131      * are any reference parameters in the
 132      * <code>endpointReference</code>, then those reference
 133      * parameters MUST appear as SOAP headers, indicating them to be
 134      * reference parameters, on all messages sent to the endpoint.
 135      * The <code>endpointReference's</code> address MUST be used
 136      * for invocations on the endpoint.
 137      * The parameter <code>serviceEndpointInterface</code> specifies
 138      * the service endpoint interface that is supported by the
 139      * returned proxy.
 140      * In the implementation of this method, the JAX-WS
 141      * runtime system takes the responsibility of selecting a protocol
 142      * binding (and a port) and configuring the proxy accordingly from


 177      *                  <UL>
 178      *                  <LI>If there is an error during creation
 179      *                      of the proxy.
 180      *                  <LI>If there is any missing WSDL metadata
 181      *                      as required by this method.
 182      *                  <LI>If the <code>endpointReference</code> metadata does
 183      *                      not match the <code>serviceName</code> of this
 184      *                      <code>Service</code> instance.
 185      *                  <LI>If a <code>portName</code> cannot be extracted
 186      *                      from the WSDL or <code>endpointReference</code> metadata.
 187      *                  <LI>If an invalid
 188      *                      <code>endpointReference</code>
 189      *                      is specified.
 190      *                  <LI>If an invalid
 191      *                      <code>serviceEndpointInterface</code>
 192      *                      is specified.
 193      *                  <LI>If a feature is enabled that is not compatible
 194      *                      with this port or is unsupported.
 195      *                  </UL>
 196      *
 197      * @since 1.6, JAX-WS 2.1
 198      **/
 199     public abstract <T> T getPort(EndpointReference endpointReference,
 200            Class<T> serviceEndpointInterface, WebServiceFeature... features);
 201 
 202 
 203     /**
 204      * The <code>getPort</code> method returns a proxy. The parameter
 205      * <code>serviceEndpointInterface</code> specifies the service
 206      * endpoint interface that is supported by the returned proxy.
 207      * In the implementation of this method, the JAX-WS
 208      * runtime system takes the responsibility of selecting a protocol
 209      * binding (and a port) and configuring the proxy accordingly.
 210      * The returned proxy should not be reconfigured by the client.
 211      *
 212      * @param serviceEndpointInterface Service endpoint interface
 213      * @return Object instance that supports the
 214      *                  specified service endpoint interface
 215      * @throws WebServiceException
 216      *                  <UL>
 217      *                  <LI>If there is an error during creation


 239      * @param features  An array of <code>WebServiceFeatures</code> to configure on the
 240      *                proxy.  Supported features not in the <code>features
 241      *                </code> parameter will have their default values.
 242      * @return Object instance that supports the
 243      *                  specified service endpoint interface
 244      * @throws WebServiceException
 245      *                  <UL>
 246      *                  <LI>If there is an error during creation
 247      *                      of the proxy
 248      *                  <LI>If there is any missing WSDL metadata
 249      *                      as required by this method
 250      *                  <LI>If an illegal
 251      *                      <code>serviceEndpointInterface</code>
 252      *                      is specified
 253      *                  <LI>If a feature is enabled that is not compatible
 254      *                      with this port or is unsupported.
 255      *                  </UL>
 256      *
 257      * @see WebServiceFeature
 258      *
 259      * @since 1.6, JAX-WS 2.1
 260      **/
 261     public abstract <T> T getPort(Class<T> serviceEndpointInterface,
 262             WebServiceFeature... features);
 263 
 264 
 265     /**
 266      * Creates a new port for the service. Ports created in this way contain
 267      * no WSDL port type information and can only be used for creating
 268      * <code>Dispatch</code>instances.
 269      *
 270      * @param portName  Qualified name for the target service endpoint
 271      * @param bindingId A URI identifier of a binding.
 272      * @param endpointAddress Address of the target service endpoint as a URI
 273      * @throws WebServiceException If any error in the creation of
 274      * the port
 275      *
 276      * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
 277      * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
 278      * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
 279      **/


 317      * @param mode Controls whether the created dispatch instance is message
 318      * or payload oriented, i.e. whether the user will work with complete
 319      * protocol messages or message payloads. E.g. when using the SOAP
 320      * protocol, this parameter controls whether the user will work with
 321      * SOAP messages or the contents of a SOAP body. Mode MUST be <code>MESSAGE</code>
 322      * when type is <code>SOAPMessage</code>.
 323      * @param features  A list of <code>WebServiceFeatures</code> to configure on the
 324      *                proxy.  Supported features not in the <code>features
 325      *                </code> parameter will have their default values.
 326      *
 327      * @return Dispatch instance
 328      * @throws WebServiceException If any error in the creation of
 329      *                  the <code>Dispatch</code> object or if a
 330      *                  feature is enabled that is not compatible with
 331      *                  this port or is unsupported.
 332      *
 333      * @see javax.xml.transform.Source
 334      * @see javax.xml.soap.SOAPMessage
 335      * @see WebServiceFeature
 336      *
 337      * @since 1.6, JAX-WS 2.1
 338      **/
 339     public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
 340             Service.Mode mode, WebServiceFeature... features);
 341 
 342     /**
 343      * Creates a <code>Dispatch</code> instance for use with objects of
 344      * the user's choosing. If there
 345      * are any reference parameters in the
 346      * <code>endpointReference</code>, then those reference
 347      * parameters MUST appear as SOAP headers, indicating them to be
 348      * reference parameters, on all messages sent to the endpoint.
 349      * The <code>endpointReference's</code> address MUST be used
 350      * for invocations on the endpoint.
 351      * In the implementation of this method, the JAX-WS
 352      * runtime system takes the responsibility of selecting a protocol
 353      * binding (and a port) and configuring the dispatch accordingly from
 354      * the WSDL associated with this <code>Service</code> instance or
 355      * from the metadata from the <code>endpointReference</code>.
 356      * If this <code>Service</code> instance has a WSDL and
 357      * the <code>endpointReference</code>


 389      * @throws WebServiceException
 390      *                  <UL>
 391      *                    <LI>If there is any missing WSDL metadata
 392      *                      as required by this method.
 393      *                    <li>If the <code>endpointReference</code> metadata does
 394      *                      not match the <code>serviceName</code> or <code>portName</code>
 395      *                      of a WSDL associated
 396      *                      with this <code>Service</code> instance.
 397      *                    <li>If the <code>portName</code> cannot be determined
 398      *                    from the <code>EndpointReference</code> metadata.
 399      *                    <li>If any error in the creation of
 400      *                     the <code>Dispatch</code> object.
 401      *                    <li>If a feature is enabled that is not
 402      *                    compatible with this port or is unsupported.
 403      *                  </UL>
 404      *
 405      * @see javax.xml.transform.Source
 406      * @see javax.xml.soap.SOAPMessage
 407      * @see WebServiceFeature
 408      *
 409      * @since 1.6, JAX-WS 2.1
 410      **/
 411     public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
 412             Class<T> type, Service.Mode mode,
 413             WebServiceFeature... features);
 414 
 415 
 416 
 417     /**
 418      * Creates a <code>Dispatch</code> instance for use with JAXB
 419      * generated objects.
 420      *
 421      * @param portName  Qualified name for the target service endpoint
 422      * @param context The JAXB context used to marshall and unmarshall
 423      * messages or message payloads.
 424      * @param mode Controls whether the created dispatch instance is message
 425      * or payload oriented, i.e. whether the user will work with complete
 426      * protocol messages or message payloads. E.g. when using the SOAP
 427      * protocol, this parameter controls whether the user will work with
 428      * SOAP messages or the contents of a SOAP body.
 429      *


 445      * @param context The JAXB context used to marshall and unmarshall
 446      * messages or message payloads.
 447      * @param mode Controls whether the created dispatch instance is message
 448      * or payload oriented, i.e. whether the user will work with complete
 449      * protocol messages or message payloads. E.g. when using the SOAP
 450      * protocol, this parameter controls whether the user will work with
 451      * SOAP messages or the contents of a SOAP body.
 452      * @param features  A list of <code>WebServiceFeatures</code> to configure on the
 453      *                proxy.  Supported features not in the <code>features
 454      *                </code> parameter will have their default values.
 455      *
 456      * @return Dispatch instance
 457      * @throws WebServiceException If any error in the creation of
 458      *                  the <code>Dispatch</code> object or if a
 459      *                  feature is enabled that is not compatible with
 460      *                  this port or is unsupported.
 461      *
 462      * @see javax.xml.bind.JAXBContext
 463      * @see WebServiceFeature
 464      *
 465      * @since 1.6, JAX-WS 2.1
 466      **/
 467     public abstract Dispatch<Object> createDispatch(QName portName,
 468             JAXBContext context, Service.Mode mode, WebServiceFeature... features);
 469 
 470     /**
 471      * Creates a <code>Dispatch</code> instance for use with JAXB
 472      * generated objects. If there
 473      * are any reference parameters in the
 474      * <code>endpointReference</code>, then those reference
 475      * parameters MUST appear as SOAP headers, indicating them to be
 476      * reference parameters, on all messages sent to the endpoint.
 477      * The <code>endpointReference's</code> address MUST be used
 478      * for invocations on the endpoint.
 479      * In the implementation of this method, the JAX-WS
 480      * runtime system takes the responsibility of selecting a protocol
 481      * binding (and a port) and configuring the dispatch accordingly from
 482      * the WSDL associated with this <code>Service</code> instance or
 483      * from the metadata from the <code>endpointReference</code>.
 484      * If this <code>Service</code> instance has a WSDL and
 485      * the <code>endpointReference</code>


 515      * @return Dispatch instance
 516      * @throws WebServiceException
 517      *                  <UL>
 518      *                    <li>If there is any missing WSDL metadata
 519      *                      as required by this method.
 520      *                    <li>If the <code>endpointReference</code> metadata does
 521      *                    not match the <code>serviceName</code> or <code>portName</code>
 522      *                    of a WSDL associated
 523      *                    with this <code>Service</code> instance.
 524      *                    <li>If the <code>portName</code> cannot be determined
 525      *                    from the <code>EndpointReference</code> metadata.
 526      *                    <li>If any error in the creation of
 527      *                    the <code>Dispatch</code> object.
 528      *                    <li>if a feature is enabled that is not
 529      *                    compatible with this port or is unsupported.
 530      *                  </UL>
 531      *
 532      * @see javax.xml.bind.JAXBContext
 533      * @see WebServiceFeature
 534      *
 535      * @since 1.6, JAX-WS 2.1
 536     **/
 537     public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
 538             JAXBContext context, Service.Mode mode,
 539             WebServiceFeature... features);
 540 
 541 
 542     /**
 543      * Gets the name of this service.
 544      * @return Qualified name of this service
 545      **/
 546     public abstract QName getServiceName();
 547 
 548     /**
 549      * Returns an <code>Iterator</code> for the list of
 550      * <code>QName</code>s of service endpoints grouped by this
 551      * service
 552      *
 553      * @return Returns <code>java.util.Iterator</code> with elements
 554      *         of type <code>javax.xml.namespace.QName</code>
 555      * @throws WebServiceException If this Service class does not