325N/A * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. Oracle designates this 325N/A * particular file as subject to the "Classpath" exception as provided 325N/A * by Oracle in the LICENSE file that accompanied this code. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A * or visit www.oracle.com if you need additional information or have any 325N/A * Service provider for <code>ServiceDelegate</code> and 325N/A * <code>Endpoint</code> objects. 325N/A * A constant representing the property used to lookup the 325N/A * name of a <code>Provider</code> implementation 325N/A * A constant representing the name of the default 325N/A * <code>Provider</code> implementation class. 325N/A // Using two strings so that package renaming doesn't change it 325N/A =
"com.sun"+
".xml.internal.ws.spi.ProviderImpl";
325N/A * Take advantage of Java SE 6's java.util.ServiceLoader API. 325N/A * Using reflection so that there is no compile-time dependency on SE 6. 325N/A // Running on Java SE 5 325N/A * Creates a new instance of Provider 325N/A * Creates a new provider object. 325N/A * The algorithm used to locate the provider subclass to use consists 325N/A * of the following steps: 325N/A * If a resource with the name of 325N/A * exists, then its first line, if present, is used as the UTF-8 encoded 325N/A * name of the implementation class. 325N/A * an entry whose key is <code>javax.xml.ws.spi.Provider</code>, then the value of 325N/A * that entry is used as the name of the implementation class. 325N/A * If a system property with the name <code>javax.xml.ws.spi.Provider</code> 325N/A * is defined, then its value is used as the name of the implementation class. 325N/A * Finally, a default implementation class name is used. 325N/A * Creates a service delegate object. 325N/A * @param wsdlDocumentLocation A URL pointing to the WSDL document 325N/A * for the service, or <code>null</code> if there isn't one. 325N/A * @param serviceName The qualified name of the service. 325N/A * @param serviceClass The service class, which MUST be either 325N/A * @return The newly created service delegate. 325N/A * Creates a service delegate object. 325N/A * @param wsdlDocumentLocation A URL pointing to the WSDL document 325N/A * for the service, or <code>null</code> if there isn't one. 325N/A * @param serviceName The qualified name of the service. 325N/A * @param serviceClass The service class, which MUST be either 325N/A * @param features Web Service features that must be configured on 325N/A * the service. If the provider doesn't understand a feature, 325N/A * it must throw a WebServiceException. 325N/A * @return The newly created service delegate. 325N/A * Creates an endpoint object with the provided binding and implementation 325N/A * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP) 325N/A * @param implementor A service implementation object to which 325N/A * incoming requests will be dispatched. The corresponding 325N/A * class MUST be annotated with all the necessary Web service 325N/A * @return The newly created endpoint. 325N/A * Creates and publishes an endpoint object with the specified 325N/A * address and implementation object. 325N/A * to use. A http: URI MUST result in the SOAP 1.1/HTTP 325N/A * binding being used. Implementations may support other 325N/A * @param implementor A service implementation object to which 325N/A * incoming requests will be dispatched. The corresponding 325N/A * class MUST be annotated with all the necessary Web service 325N/A * @return The newly created endpoint. 325N/A * read an EndpointReference from the infoset contained in 325N/A * <code>eprInfoset</code>. 325N/A * @param eprInfoset infoset for EndpointReference 325N/A * @return the <code>EndpointReference</code> unmarshalled from 325N/A * <code>eprInfoset</code>. This method never returns <code>null</code>. 325N/A * @throws WebServiceException If there is an error creating the 325N/A * <code>EndpointReference</code> from the specified <code>eprInfoset</code>. 325N/A * @throws NullPointerException If the <code>null</code> 325N/A * <code>eprInfoset</code> value is given. 325N/A * The getPort method returns a proxy. If there 325N/A * are any reference parameters in the 325N/A * <code>endpointReference</code>, then those reference 325N/A * parameters MUST appear as SOAP headers, indicating them to be 325N/A * reference parameters, on all messages sent to the endpoint. 325N/A * The parameter <code>serviceEndpointInterface</code> specifies 325N/A * the service endpoint interface that is supported by the 325N/A * The parameter <code>endpointReference</code> specifies the 325N/A * endpoint that will be invoked by the returned proxy. 325N/A * In the implementation of this method, the JAX-WS 325N/A * runtime system takes the responsibility of selecting a protocol 325N/A * binding (and a port) and configuring the proxy accordingly from 325N/A * the WSDL metadata of the 325N/A * <code>serviceEndpointInterface</code> and the <code>EndpointReference</code>. 325N/A * to successfully return a proxy, WSDL metadata MUST be available and the 325N/A * <code>endpointReference</code> MUST contain an implementation understood 325N/A * <code>serviceName</code> metadata. 325N/A * @param endpointReference the EndpointReference that will 325N/A * be invoked by the returned proxy. 325N/A * @param serviceEndpointInterface Service endpoint interface 325N/A * @param features A list of WebServiceFeatures to configure on the 325N/A * proxy. Supported features not in the <code>features 325N/A * </code> parameter will have their default values. 325N/A * @return Object Proxy instance that supports the 325N/A * specified service endpoint interface 325N/A * @throws WebServiceException 325N/A * <LI>If there is an error during creation 325N/A * <LI>If there is any missing WSDL metadata 325N/A * as required by this method} 325N/A * <code>endpointReference</code> 325N/A * <code>serviceEndpointInterface</code> 325N/A * <LI>If a feature is enabled that is not compatible with 325N/A * this port or is unsupported. 325N/A * @see WebServiceFeature 325N/A * Factory method to create a <code>W3CEndpointReference</code>. 325N/A * This method can be used to create a <code>W3CEndpointReference</code> 325N/A * for any endpoint by specifying the <code>address</code> property along 325N/A * with any other desired properties. This method 325N/A * can also be used to create a <code>W3CEndpointReference</code> for 325N/A * an endpoint that is published by the same Java EE application. 325N/A * To do so the <code>address</code> property can be provided or this 325N/A * method can automatically determine the <code>address</code> of 325N/A * an endpoint that is published by the same Java EE application and is 325N/A * identified by the <code>serviceName</code> and 325N/A * <code>portName</code> propeties. If the <code>address</code> is 325N/A * <code>null</code> and the <code>serviceName</code> and 325N/A * <code>portName</code> do not identify an endpoint published by the 325N/A * same Java EE application, a 325N/A * <code>javax.lang.IllegalStateException</code> MUST be thrown. 325N/A * @param address Specifies the address of the target endpoint 325N/A * @param serviceName Qualified name of the service in the WSDL. 325N/A * @param portName Qualified name of the endpoint in the WSDL. 325N/A * @param metadata A list of elements that should be added to the 325N/A * <code>W3CEndpointReference</code> instances <code>wsa:metadata</code> 325N/A * @param wsdlDocumentLocation URL for the WSDL document location for 325N/A * @param referenceParameters Reference parameters to be associated 325N/A * with the returned <code>EndpointReference</code> instance. 325N/A * @return the <code>W3CEndpointReference</code> created from 325N/A * <code>serviceName</code>, <code>portName</code>, 325N/A * <code>metadata</code>, <code>wsdlDocumentLocation</code> 325N/A * and <code>referenceParameters</code>. This method 325N/A * never returns <code>null</code>. 325N/A * @throws java.lang.IllegalStateException 325N/A * <li>If the <code>address</code>, <code>serviceName</code> and 325N/A * <code>portName</code> are all <code>null</code>. 325N/A * <li>If the <code>serviceName</code> service is <code>null</code> and the 325N/A * <code>portName</code> is NOT <code>null</code>. 325N/A * <li>If the <code>address</code> property is <code>null</code> and 325N/A * the <code>serviceName</code> and <code>portName</code> do not 325N/A * specify a valid endpoint published by the same Java EE 325N/A * <li>If the <code>serviceName</code>is NOT <code>null</code> 325N/A * and is not present in the specified WSDL. 325N/A * <li>If the <code>portName</code> port is not <code>null</code> and it 325N/A * is not present in <code>serviceName</code> service in the WSDL. 325N/A * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> 325N/A * and does not represent a valid WSDL. 325N/A * @throws WebServiceException If an error occurs while creating the 325N/A * <code>W3CEndpointReference</code>. 325N/A * Factory method to create a <code>W3CEndpointReference</code>. 325N/A * Using this method, a <code>W3CEndpointReference</code> instance 325N/A * can be created with extension elements, and attributes. 325N/A * <code>Provider</code> implementations must override the default 325N/A * This method can be used to create a <code>W3CEndpointReference</code> 325N/A * for any endpoint by specifying the <code>address</code> property along 325N/A * with any other desired properties. This method 325N/A * can also be used to create a <code>W3CEndpointReference</code> for 325N/A * an endpoint that is published by the same Java EE application. 325N/A * To do so the <code>address</code> property can be provided or this 325N/A * method can automatically determine the <code>address</code> of 325N/A * an endpoint that is published by the same Java EE application and is 325N/A * identified by the <code>serviceName</code> and 325N/A * <code>portName</code> propeties. If the <code>address</code> is 325N/A * <code>null</code> and the <code>serviceName</code> and 325N/A * <code>portName</code> do not identify an endpoint published by the 325N/A * same Java EE application, a 325N/A * <code>javax.lang.IllegalStateException</code> MUST be thrown. 325N/A * @param address Specifies the address of the target endpoint 325N/A * @param interfaceName the <code>wsam:InterfaceName</code> element in the 325N/A * <code>wsa:Metadata</code> element. 325N/A * @param serviceName Qualified name of the service in the WSDL. 325N/A * @param portName Qualified name of the endpoint in the WSDL. 325N/A * @param metadata A list of elements that should be added to the 325N/A * <code>W3CEndpointReference</code> instances <code>wsa:metadata</code> 325N/A * @param wsdlDocumentLocation URL for the WSDL document location for 325N/A * @param referenceParameters Reference parameters to be associated 325N/A * with the returned <code>EndpointReference</code> instance. 325N/A * @param elements extension elements to be associated 325N/A * with the returned <code>EndpointReference</code> instance. 325N/A * @param attributes extension attributes to be associated 325N/A * with the returned <code>EndpointReference</code> instance. 325N/A * @return the <code>W3CEndpointReference</code> created from 325N/A * <code>serviceName</code>, <code>portName</code>, 325N/A * <code>metadata</code>, <code>wsdlDocumentLocation</code> 325N/A * and <code>referenceParameters</code>. This method 325N/A * never returns <code>null</code>. 325N/A * @throws java.lang.IllegalStateException 325N/A * <li>If the <code>address</code>, <code>serviceName</code> and 325N/A * <code>portName</code> are all <code>null</code>. 325N/A * <li>If the <code>serviceName</code> service is <code>null</code> and the 325N/A * <code>portName</code> is NOT <code>null</code>. 325N/A * <li>If the <code>address</code> property is <code>null</code> and 325N/A * the <code>serviceName</code> and <code>portName</code> do not 325N/A * specify a valid endpoint published by the same Java EE 325N/A * <li>If the <code>serviceName</code>is NOT <code>null</code> 325N/A * and is not present in the specified WSDL. 325N/A * <li>If the <code>portName</code> port is not <code>null</code> and it 325N/A * is not present in <code>serviceName</code> service in the WSDL. 325N/A * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> 325N/A * and does not represent a valid WSDL. 325N/A * <li>If the <code>wsdlDocumentLocation</code> is NOT <code>null</code> but 325N/A * wsdli:wsdlLocation's namespace name cannot be got from the available 325N/A * @throws WebServiceException If an error occurs while creating the 325N/A * <code>W3CEndpointReference</code>. 325N/A * Creates and publishes an endpoint object with the specified 325N/A * address, implementation object and web service features. 325N/A * <code>Provider</code> implementations must override the 325N/A * default implementation. 325N/A * to use. A http: URI MUST result in the SOAP 1.1/HTTP 325N/A * binding being used. Implementations may support other 325N/A * @param implementor A service implementation object to which 325N/A * incoming requests will be dispatched. The corresponding 325N/A * class MUST be annotated with all the necessary Web service 325N/A * @param features A list of WebServiceFeatures to configure on the 325N/A * endpoint. Supported features not in the <code>features 325N/A * </code> parameter will have their default values. 325N/A * @return The newly created endpoint. 325N/A * Creates an endpoint object with the provided binding, implementation 325N/A * object and web service features. <code>Provider</code> implementations 325N/A * must override the default implementation. 325N/A * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP) 325N/A * @param implementor A service implementation object to which 325N/A * incoming requests will be dispatched. The corresponding 325N/A * class MUST be annotated with all the necessary Web service 325N/A * @param features A list of WebServiceFeatures to configure on the 325N/A * endpoint. Supported features not in the <code>features 325N/A * </code> parameter will have their default values. 325N/A * @return The newly created endpoint. 325N/A * Creates an endpoint object with the provided binding, implementation 325N/A * class, invoker and web service features. Containers typically use 325N/A * this to create Endpoint objects. <code>Provider</code> 325N/A * implementations must override the default implementation. 325N/A * @param bindingId A URI specifying the desired binding (e.g. SOAP/HTTP). 325N/A * @param implementorClass A service implementation class that 325N/A * MUST be annotated with all the necessary Web service 325N/A * @param invoker that does the actual invocation on the service instance. 325N/A * @param features A list of WebServiceFeatures to configure on the 325N/A * endpoint. Supported features not in the <code>features 325N/A * </code> parameter will have their default values. 325N/A * @return The newly created endpoint.