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