1 /*
   2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.xml.ws.spi;
  27 
  28 import java.util.Iterator;
  29 import javax.xml.namespace.QName;
  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} objects
  41  * to allow pluggability of JAX-WS implementations.
  42  * <p>
  43  * Every {@code Service} object has its own delegate, created using
  44  * the {@link javax.xml.ws.spi.Provider#createServiceDelegate} method. A {@code Service}
  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     /**
  55      * Default constructor.
  56      */
  57     protected ServiceDelegate() {
  58     }
  59 
  60     /**
  61      * The {@code getPort} method returns a proxy. A service client
  62      * uses this proxy to invoke operations on the target
  63      * service endpoint. The {@code serviceEndpointInterface}
  64      * specifies the service endpoint interface that is supported by
  65      * the created dynamic proxy instance.
  66      *
  67      * @param <T> Service endpoint interface
  68      * @param portName  Qualified name of the service endpoint in
  69      *                  the WSDL service description
  70      * @param serviceEndpointInterface Service endpoint interface
  71      *                  supported by the dynamic proxy
  72      * @return Object Proxy instance that
  73      *                supports the specified service endpoint
  74      *                interface
  75      * @throws WebServiceException This exception is thrown in the
  76      *                  following cases:
  77      *                  <UL>
  78      *                  <LI>If there is an error in creation of
  79      *                      the proxy
  80      *                  <LI>If there is any missing WSDL metadata
  81      *                      as required by this method
  82      *                  <LI>If an illegal
  83      *                      {@code serviceEndpointInterface}
  84      *                      or {@code portName} is specified
  85      *                  </UL>
  86      * @see java.lang.reflect.Proxy
  87      * @see java.lang.reflect.InvocationHandler
  88      **/
  89     public abstract <T> T getPort(QName portName,
  90             Class<T> serviceEndpointInterface);
  91 
  92     /**
  93      * The {@code getPort} method returns a proxy. A service client
  94      * uses this proxy to invoke operations on the target
  95      * service endpoint. The {@code serviceEndpointInterface}
  96      * specifies the service endpoint interface that is supported by
  97      * the created dynamic proxy instance.
  98      *
  99      * @param <T> Service endpoint interface
 100      * @param portName  Qualified name of the service endpoint in
 101      *                  the WSDL service description
 102      * @param serviceEndpointInterface Service endpoint interface
 103      *                  supported by the dynamic proxy or instance
 104      * @param features  A list of WebServiceFeatures to configure on the
 105      *                proxy.  Supported features not in the {@code features
 106      *                } parameter will have their default values.
 107      * @return Object Proxy instance that
 108      *                supports the specified service endpoint
 109      *                interface
 110      * @throws WebServiceException This exception is thrown in the
 111      *                  following cases:
 112      *                  <UL>
 113      *                  <LI>If there is an error in creation of
 114      *                      the proxy
 115      *                  <LI>If there is any missing WSDL metadata
 116      *                      as required by this method
 117      *                  <LI>If an illegal
 118      *                      {@code serviceEndpointInterface}
 119      *                      or {@code portName} is specified
 120      *                  <LI>If a feature is enabled that is not compatible
 121      *                      with this port or is unsupported.
 122      *                  </UL>
 123      * @see java.lang.reflect.Proxy
 124      * @see java.lang.reflect.InvocationHandler
 125      * @see WebServiceFeature
 126      *
 127      * @since 1.6, JAX-WS 2.1
 128      **/
 129     public abstract <T> T getPort(QName portName,
 130             Class<T> serviceEndpointInterface, WebServiceFeature... features);
 131 
 132     /**
 133      * The {@code getPort} method returns a proxy.
 134      * The parameter {@code endpointReference} specifies the
 135      * endpoint that will be invoked by the returned proxy.  If there
 136      * are any reference parameters in the
 137      * {@code endpointReference}, then those reference
 138      * parameters MUST appear as SOAP headers, indicating them to be
 139      * reference parameters, on all messages sent to the endpoint.
 140      * The {@code endpointReference's} address MUST be used
 141      * for invocations on the endpoint.
 142      * The parameter {@code serviceEndpointInterface} specifies
 143      * the service endpoint interface that is supported by the
 144      * returned proxy.
 145      * In the implementation of this method, the JAX-WS
 146      * runtime system takes the responsibility of selecting a protocol
 147      * binding (and a port) and configuring the proxy accordingly from
 148      * the WSDL associated with this {@code Service} instance or
 149      * from the metadata from the {@code endpointReference}.
 150      * If this {@code Service} instance has a WSDL and
 151      * the {@code endpointReference} metadata
 152      * also has a WSDL, then the WSDL from this instance MUST be used.
 153      * If this {@code Service} instance does not have a WSDL and
 154      * the {@code endpointReference} does have a WSDL, then the
 155      * WSDL from the {@code endpointReference} MAY be used.
 156      * The returned proxy should not be reconfigured by the client.
 157      * If this {@code Service} instance has a known proxy
 158      * port that matches the information contained in
 159      * the WSDL,
 160      * then that proxy is returned, otherwise a WebServiceException
 161      * is thrown.
 162      * <p>
 163      * Calling this method has the same behavior as the following
 164      * <pre>
 165      * {@code port = service.getPort(portName, serviceEndpointInterface);}
 166      * </pre>
 167      * where the {@code portName} is retrieved from the
 168      * metadata of the {@code endpointReference} or from the
 169      * {@code serviceEndpointInterface} and the WSDL
 170      * associated with this {@code Service} instance.
 171      *
 172      * @param <T> Service endpoint interface.
 173      * @param endpointReference  The {@code EndpointReference}
 174      * for the target service endpoint that will be invoked by the
 175      * returned proxy.
 176      * @param serviceEndpointInterface Service endpoint interface.
 177      * @param features  A list of {@code WebServiceFeatures} to configure on the
 178      *                proxy.  Supported features not in the {@code features
 179      *                } parameter will have their default values.
 180      * @return Object Proxy instance that supports the
 181      *                  specified service endpoint interface.
 182      * @throws WebServiceException
 183      *                  <UL>
 184      *                  <LI>If there is an error during creation
 185      *                      of the proxy.
 186      *                  <LI>If there is any missing WSDL metadata
 187      *                      as required by this method.
 188      *                  <LI>If the {@code endpointReference} metadata does
 189      *                      not match the {@code serviceName} of this
 190      *                      {@code Service} instance.
 191      *                  <LI>If a {@code portName} cannot be extracted
 192      *                      from the WSDL or {@code endpointReference} metadata.
 193      *                  <LI>If an invalid
 194      *                      {@code endpointReference}
 195      *                      is specified.
 196      *                  <LI>If an invalid
 197      *                      {@code serviceEndpointInterface}
 198      *                      is specified.
 199      *                  <LI>If a feature is enabled that is not compatible
 200      *                      with this port or is unsupported.
 201      *                  </UL>
 202      *
 203      * @since 1.6, JAX-WS 2.1
 204      **/
 205     public abstract <T> T getPort(EndpointReference endpointReference,
 206            Class<T> serviceEndpointInterface, WebServiceFeature... features);
 207 
 208 
 209     /**
 210      * The {@code getPort} method returns a proxy. The parameter
 211      * {@code serviceEndpointInterface} specifies the service
 212      * endpoint interface that is supported by the returned proxy.
 213      * In the implementation of this method, the JAX-WS
 214      * runtime system takes the responsibility of selecting a protocol
 215      * binding (and a port) and configuring the proxy accordingly.
 216      * The returned proxy should not be reconfigured by the client.
 217      *
 218      * @param <T> Service endpoint interface
 219      * @param serviceEndpointInterface Service endpoint interface
 220      * @return Object instance that supports the
 221      *                  specified service endpoint interface
 222      * @throws WebServiceException
 223      *                  <UL>
 224      *                  <LI>If there is an error during creation
 225      *                      of the proxy
 226      *                  <LI>If there is any missing WSDL metadata
 227      *                      as required by this method
 228      *                  <LI>If an illegal
 229      *                      {@code serviceEndpointInterface}
 230      *                      is specified
 231      *                  </UL>
 232      **/
 233     public abstract <T> T getPort(Class<T> serviceEndpointInterface);
 234 
 235 
 236     /**
 237      * The {@code getPort} method returns a proxy. The parameter
 238      * {@code serviceEndpointInterface} specifies the service
 239      * endpoint interface that is supported by the returned proxy.
 240      * In the implementation of this method, the JAX-WS
 241      * runtime system takes the responsibility of selecting a protocol
 242      * binding (and a port) and configuring the proxy accordingly.
 243      * The returned proxy should not be reconfigured by the client.
 244      *
 245      * @param <T> Service endpoint interface
 246      * @param serviceEndpointInterface Service endpoint interface
 247      * @param features  An array of {@code WebServiceFeatures} to configure on the
 248      *                proxy.  Supported features not in the {@code features
 249      *                } parameter will have their default values.
 250      * @return Object instance that supports the
 251      *                  specified service endpoint interface
 252      * @throws WebServiceException
 253      *                  <UL>
 254      *                  <LI>If there is an error during creation
 255      *                      of the proxy
 256      *                  <LI>If there is any missing WSDL metadata
 257      *                      as required by this method
 258      *                  <LI>If an illegal
 259      *                      {@code serviceEndpointInterface}
 260      *                      is specified
 261      *                  <LI>If a feature is enabled that is not compatible
 262      *                      with this port or is unsupported.
 263      *                  </UL>
 264      *
 265      * @see WebServiceFeature
 266      *
 267      * @since 1.6, JAX-WS 2.1
 268      **/
 269     public abstract <T> T getPort(Class<T> serviceEndpointInterface,
 270             WebServiceFeature... features);
 271 
 272 
 273     /**
 274      * Creates a new port for the service. Ports created in this way contain
 275      * no WSDL port type information and can only be used for creating
 276      * {@code Dispatch}instances.
 277      *
 278      * @param portName  Qualified name for the target service endpoint
 279      * @param bindingId A URI identifier of a binding.
 280      * @param endpointAddress Address of the target service endpoint as a URI
 281      * @throws WebServiceException If any error in the creation of
 282      * the port
 283      *
 284      * @see javax.xml.ws.soap.SOAPBinding#SOAP11HTTP_BINDING
 285      * @see javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING
 286      * @see javax.xml.ws.http.HTTPBinding#HTTP_BINDING
 287      **/
 288     public abstract void addPort(QName portName, String bindingId,
 289             String endpointAddress);
 290 
 291 
 292 
 293     /**
 294      * Creates a {@code Dispatch} instance for use with objects of
 295      * the user's choosing.
 296      *
 297      * @param <T> type used for messages or message payloads. Implementations are required to
 298      * support {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 299      * @param portName  Qualified name for the target service endpoint
 300      * @param type The class of object used for messages or message
 301      * payloads. Implementations are required to support
 302      * {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 303      * @param mode Controls whether the created dispatch instance is message
 304      * or payload oriented, i.e. whether the user will work with complete
 305      * protocol messages or message payloads. E.g. when using the SOAP
 306      * protocol, this parameter controls whether the user will work with
 307      * SOAP messages or the contents of a SOAP body. Mode MUST be {@code MESSAGE}
 308      * when type is {@code SOAPMessage}.
 309      *
 310      * @return Dispatch instance
 311      * @throws WebServiceException If any error in the creation of
 312      *                  the {@code Dispatch} object
 313      * @see javax.xml.transform.Source
 314      * @see javax.xml.soap.SOAPMessage
 315      **/
 316     public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
 317             Service.Mode mode);
 318 
 319     /**
 320      * Creates a {@code Dispatch} instance for use with objects of
 321      * the user's choosing.
 322      *
 323      * @param <T> type used for messages or message payloads. Implementations are required to
 324      * support {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 325      * @param portName  Qualified name for the target service endpoint
 326      * @param type The class of object used for messages or message
 327      * payloads. Implementations are required to support
 328      * {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 329      * @param mode Controls whether the created dispatch instance is message
 330      * or payload oriented, i.e. whether the user will work with complete
 331      * protocol messages or message payloads. E.g. when using the SOAP
 332      * protocol, this parameter controls whether the user will work with
 333      * SOAP messages or the contents of a SOAP body. Mode MUST be {@code MESSAGE}
 334      * when type is {@code SOAPMessage}.
 335      * @param features  A list of {@code WebServiceFeatures} to configure on the
 336      *                proxy.  Supported features not in the {@code features
 337      *                } parameter will have their default values.
 338      *
 339      * @return Dispatch instance
 340      * @throws WebServiceException If any error in the creation of
 341      *                  the {@code Dispatch} object or if a
 342      *                  feature is enabled that is not compatible with
 343      *                  this port or is unsupported.
 344      *
 345      * @see javax.xml.transform.Source
 346      * @see javax.xml.soap.SOAPMessage
 347      * @see WebServiceFeature
 348      *
 349      * @since 1.6, JAX-WS 2.1
 350      **/
 351     public abstract <T> Dispatch<T> createDispatch(QName portName, Class<T> type,
 352             Service.Mode mode, WebServiceFeature... features);
 353 
 354     /**
 355      * Creates a {@code Dispatch} instance for use with objects of
 356      * the user's choosing. If there
 357      * are any reference parameters in the
 358      * {@code endpointReference}, then those reference
 359      * parameters MUST appear as SOAP headers, indicating them to be
 360      * reference parameters, on all messages sent to the endpoint.
 361      * The {@code endpointReference's} address MUST be used
 362      * for invocations on the endpoint.
 363      * In the implementation of this method, the JAX-WS
 364      * runtime system takes the responsibility of selecting a protocol
 365      * binding (and a port) and configuring the dispatch accordingly from
 366      * the WSDL associated with this {@code Service} instance or
 367      * from the metadata from the {@code endpointReference}.
 368      * If this {@code Service} instance has a WSDL and
 369      * the {@code endpointReference}
 370      * also has a WSDL in its metadata, then the WSDL from this instance MUST be used.
 371      * If this {@code Service} instance does not have a WSDL and
 372      * the {@code endpointReference} does have a WSDL, then the
 373      * WSDL from the {@code endpointReference} MAY be used.
 374      * An implementation MUST be able to retrieve the {@code portName} from the
 375      * {@code endpointReference} metadata.
 376      * <p>
 377      * This method behaves the same as calling
 378      * <pre>
 379      * {@code dispatch = service.createDispatch(portName, type, mode, features);}
 380      * </pre>
 381      * where the {@code portName} is retrieved from the
 382      * WSDL or {@code EndpointReference} metadata.
 383      *
 384      * @param <T> type of object used to messages or message
 385      * payloads. Implementations are required to support
 386      * {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 387      * @param endpointReference  The {@code EndpointReference}
 388      * for the target service endpoint that will be invoked by the
 389      * returned {@code Dispatch} object.
 390      * @param type The class of object used to messages or message
 391      * payloads. Implementations are required to support
 392      * {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
 393      * @param mode Controls whether the created dispatch instance is message
 394      * or payload oriented, i.e. whether the user will work with complete
 395      * protocol messages or message payloads. E.g. when using the SOAP
 396      * protocol, this parameter controls whether the user will work with
 397      * SOAP messages or the contents of a SOAP body. Mode MUST be {@code MESSAGE}
 398      * when type is {@code SOAPMessage}.
 399      * @param features  An array of {@code WebServiceFeatures} to configure on the
 400      *                proxy.  Supported features not in the {@code features
 401      *                } parameter will have their default values.
 402      *
 403      * @return Dispatch instance
 404      * @throws WebServiceException
 405      *                  <UL>
 406      *                    <LI>If there is any missing WSDL metadata
 407      *                      as required by this method.
 408      *                    <li>If the {@code endpointReference} metadata does
 409      *                      not match the {@code serviceName} or {@code portName}
 410      *                      of a WSDL associated
 411      *                      with this {@code Service} instance.
 412      *                    <li>If the {@code portName} cannot be determined
 413      *                    from the {@code EndpointReference} metadata.
 414      *                    <li>If any error in the creation of
 415      *                     the {@code Dispatch} object.
 416      *                    <li>If a feature is enabled that is not
 417      *                    compatible with this port or is unsupported.
 418      *                  </UL>
 419      *
 420      * @see javax.xml.transform.Source
 421      * @see javax.xml.soap.SOAPMessage
 422      * @see WebServiceFeature
 423      *
 424      * @since 1.6, JAX-WS 2.1
 425      **/
 426     public abstract <T> Dispatch<T> createDispatch(EndpointReference endpointReference,
 427             Class<T> type, Service.Mode mode,
 428             WebServiceFeature... features);
 429 
 430 
 431 
 432     /**
 433      * Creates a {@code Dispatch} instance for use with JAXB
 434      * generated objects.
 435      *
 436      * @param portName  Qualified name for the target service endpoint
 437      * @param context The JAXB context used to marshall and unmarshall
 438      * messages or message payloads.
 439      * @param mode Controls whether the created dispatch instance is message
 440      * or payload oriented, i.e. whether the user will work with complete
 441      * protocol messages or message payloads. E.g. when using the SOAP
 442      * protocol, this parameter controls whether the user will work with
 443      * SOAP messages or the contents of a SOAP body.
 444      *
 445      * @return Dispatch instance
 446      * @throws WebServiceException If any error in the creation of
 447      *                  the {@code Dispatch} object
 448      *
 449      * @see javax.xml.bind.JAXBContext
 450      **/
 451     public abstract Dispatch<Object> createDispatch(QName portName,
 452             JAXBContext context, Service.Mode mode);
 453 
 454 
 455     /**
 456      * Creates a {@code Dispatch} instance for use with JAXB
 457      * generated objects.
 458      *
 459      * @param portName  Qualified name for the target service endpoint
 460      * @param context The JAXB context used to marshall and unmarshall
 461      * messages or message payloads.
 462      * @param mode Controls whether the created dispatch instance is message
 463      * or payload oriented, i.e. whether the user will work with complete
 464      * protocol messages or message payloads. E.g. when using the SOAP
 465      * protocol, this parameter controls whether the user will work with
 466      * SOAP messages or the contents of a SOAP body.
 467      * @param features  A list of {@code WebServiceFeatures} to configure on the
 468      *                proxy.  Supported features not in the {@code features
 469      *                } parameter will have their default values.
 470      *
 471      * @return Dispatch instance
 472      * @throws WebServiceException If any error in the creation of
 473      *                  the {@code Dispatch} object or if a
 474      *                  feature is enabled that is not compatible with
 475      *                  this port or is unsupported.
 476      *
 477      * @see javax.xml.bind.JAXBContext
 478      * @see WebServiceFeature
 479      *
 480      * @since 1.6, JAX-WS 2.1
 481      **/
 482     public abstract Dispatch<Object> createDispatch(QName portName,
 483             JAXBContext context, Service.Mode mode, WebServiceFeature... features);
 484 
 485     /**
 486      * Creates a {@code Dispatch} instance for use with JAXB
 487      * generated objects. If there
 488      * are any reference parameters in the
 489      * {@code endpointReference}, then those reference
 490      * parameters MUST appear as SOAP headers, indicating them to be
 491      * reference parameters, on all messages sent to the endpoint.
 492      * The {@code endpointReference's} address MUST be used
 493      * for invocations on the endpoint.
 494      * In the implementation of this method, the JAX-WS
 495      * runtime system takes the responsibility of selecting a protocol
 496      * binding (and a port) and configuring the dispatch accordingly from
 497      * the WSDL associated with this {@code Service} instance or
 498      * from the metadata from the {@code endpointReference}.
 499      * If this {@code Service} instance has a WSDL and
 500      * the {@code endpointReference}
 501      * also has a WSDL in its metadata, then the WSDL from this instance
 502      * MUST be used.
 503      * If this {@code Service} instance does not have a WSDL and
 504      * the {@code endpointReference} does have a WSDL, then the
 505      * WSDL from the {@code endpointReference} MAY be used.
 506      * An implementation MUST be able to retrieve the {@code portName} from the
 507      * {@code endpointReference} metadata.
 508      * <p>
 509      * This method behavies the same as calling
 510      * <pre>
 511      * {@code dispatch = service.createDispatch(portName, context, mode, features);}
 512      * </pre>
 513      * where the {@code portName} is retrieved from the
 514      * WSDL or {@code endpointReference} metadata.
 515      *
 516      * @param endpointReference  The {@code EndpointReference}
 517      * for the target service endpoint that will be invoked by the
 518      * returned {@code Dispatch} object.
 519      * @param context The JAXB context used to marshall and unmarshall
 520      * messages or message payloads.
 521      * @param mode Controls whether the created dispatch instance is message
 522      * or payload oriented, i.e. whether the user will work with complete
 523      * protocol messages or message payloads. E.g. when using the SOAP
 524      * protocol, this parameter controls whether the user will work with
 525      * SOAP messages or the contents of a SOAP body.
 526      * @param features  An array of {@code WebServiceFeatures} to configure on the
 527      *                proxy.  Supported features not in the {@code features
 528      *                } parameter will have their default values.
 529      *
 530      * @return Dispatch instance
 531      * @throws WebServiceException
 532      *                  <UL>
 533      *                    <li>If there is any missing WSDL metadata
 534      *                      as required by this method.
 535      *                    <li>If the {@code endpointReference} metadata does
 536      *                    not match the {@code serviceName} or {@code portName}
 537      *                    of a WSDL associated
 538      *                    with this {@code Service} instance.
 539      *                    <li>If the {@code portName} cannot be determined
 540      *                    from the {@code EndpointReference} metadata.
 541      *                    <li>If any error in the creation of
 542      *                    the {@code Dispatch} object.
 543      *                    <li>if a feature is enabled that is not
 544      *                    compatible with this port or is unsupported.
 545      *                  </UL>
 546      *
 547      * @see javax.xml.bind.JAXBContext
 548      * @see WebServiceFeature
 549      *
 550      * @since 1.6, JAX-WS 2.1
 551     **/
 552     public abstract Dispatch<Object> createDispatch(EndpointReference endpointReference,
 553             JAXBContext context, Service.Mode mode,
 554             WebServiceFeature... features);
 555 
 556 
 557     /**
 558      * Gets the name of this service.
 559      * @return Qualified name of this service
 560      **/
 561     public abstract QName getServiceName();
 562 
 563     /**
 564      * Returns an {@code Iterator} for the list of
 565      * {@code QName}s of service endpoints grouped by this
 566      * service
 567      *
 568      * @return Returns {@code java.util.Iterator} with elements
 569      *         of type {@code javax.xml.namespace.QName}
 570      * @throws WebServiceException If this Service class does not
 571      *         have access to the required WSDL metadata
 572      **/
 573     public abstract Iterator<javax.xml.namespace.QName> getPorts();
 574 
 575     /**
 576      * Gets the location of the WSDL document for this Service.
 577      *
 578      * @return URL for the location of the WSDL document for
 579      *         this service
 580      **/
 581     public abstract java.net.URL getWSDLDocumentLocation();
 582 
 583     /**
 584      * Returns the configured handler resolver.
 585      *
 586      * @return HandlerResolver The {@code HandlerResolver} being
 587      *         used by this {@code Service} instance, or {@code null}
 588      *         if there isn't one.
 589      **/
 590     public abstract HandlerResolver getHandlerResolver();
 591 
 592     /**
 593      * Sets the {@code HandlerResolver} for this {@code Service}
 594      * instance.
 595      * <p>
 596      * The handler resolver, if present, will be called once for each
 597      * proxy or dispatch instance that is created, and the handler chain
 598      * returned by the resolver will be set on the instance.
 599      *
 600      * @param handlerResolver The {@code HandlerResolver} to use
 601      *        for all subsequently created proxy/dispatch objects.
 602      *
 603      * @see javax.xml.ws.handler.HandlerResolver
 604      **/
 605     public abstract void setHandlerResolver(HandlerResolver handlerResolver);
 606 
 607     /**
 608      * Returns the executor for this {@code Service}instance.
 609      *
 610      * The executor is used for all asynchronous invocations that
 611      * require callbacks.
 612      *
 613      * @return The {@code java.util.concurrent.Executor} to be
 614      *         used to invoke a callback.
 615      *
 616      * @see java.util.concurrent.Executor
 617      **/
 618     public abstract java.util.concurrent.Executor getExecutor();
 619 
 620     /**
 621      * Sets the executor for this {@code Service} instance.
 622      *
 623      * The executor is used for all asynchronous invocations that
 624      * require callbacks.
 625      *
 626      * @param executor The {@code java.util.concurrent.Executor}
 627      *        to be used to invoke a callback.
 628      *
 629      * @throws SecurityException If the instance does not support
 630      *         setting an executor for security reasons (e.g. the
 631      *         necessary permissions are missing).
 632      *
 633      * @see java.util.concurrent.Executor
 634      **/
 635     public abstract void setExecutor(java.util.concurrent.Executor executor);
 636 
 637 }