< prev index next >
src/java.xml.ws/share/classes/javax/xml/ws/Service.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -69,18 +69,52 @@
/**
* The orientation of a dynamic client or service. {@code MESSAGE} provides
* access to entire protocol message, {@code PAYLOAD} to protocol message
* payload only.
**/
- public enum Mode { MESSAGE, PAYLOAD }
+ public enum Mode {
+ /**
+ * Message mode.
+ */
+ MESSAGE,
+
+ /**
+ * Payload mode.
+ */
+ PAYLOAD }
+
+ /**
+ * Creates a {@code Service}.
+ *
+ * The specified WSDL document location and service qualified name MUST
+ * uniquely identify a {@code wsdl:service} element.
+ *
+ * @param wsdlDocumentLocation {@code URL} for the WSDL document location
+ * for the service
+ * @param serviceName {@code QName} for the service
+ */
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {
delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
serviceName,
this.getClass());
}
+ /**
+ * Creates a {@code Service}. The created instance is
+ * configured with the web service features.
+ *
+ * The specified WSDL document location and service qualified name MUST
+ * uniquely identify a {@code wsdl:service} element.
+ *
+ * @param wsdlDocumentLocation {@code URL} for the WSDL document location
+ * for the service
+ * @param serviceName {@code QName} for the service
+ * @param features Web Service features that must be configured on
+ * the service. If the provider doesn't understand a feature,
+ * it must throw a WebServiceException.
+ */
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) {
delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
serviceName,
this.getClass(), features);
}
@@ -91,10 +125,11 @@
* uses this proxy to invoke operations on the target
* service endpoint. The {@code serviceEndpointInterface}
* specifies the service endpoint interface that is supported by
* the created dynamic proxy instance.
*
+ * @param <T> Service endpoint interface.
* @param portName Qualified name of the service endpoint in
* the WSDL service description.
* @param serviceEndpointInterface Service endpoint interface
* supported by the dynamic proxy instance.
* @return Object Proxy instance that
@@ -124,10 +159,11 @@
* uses this proxy to invoke operations on the target
* service endpoint. The {@code serviceEndpointInterface}
* specifies the service endpoint interface that is supported by
* the created dynamic proxy instance.
*
+ * @param <T> Service endpoint interface.
* @param portName Qualified name of the service endpoint in
* the WSDL service description.
* @param serviceEndpointInterface Service endpoint interface
* supported by the dynamic proxy instance.
* @param features A list of WebServiceFeatures to configure on the
@@ -168,10 +204,11 @@
* In the implementation of this method, the JAX-WS
* runtime system takes the responsibility of selecting a protocol
* binding (and a port) and configuring the proxy accordingly.
* The returned proxy should not be reconfigured by the client.
*
+ * @param <T> Service endpoint interface.
* @param serviceEndpointInterface Service endpoint interface.
* @return Object instance that supports the
* specified service endpoint interface.
* @throws WebServiceException
* <UL>
@@ -188,18 +225,18 @@
return delegate.getPort(serviceEndpointInterface);
}
/**
- * The {@code getPort} method returns a proxy. The parameter
- * {@code serviceEndpointInterface} specifies the service
- * endpoint interface that is supported by the returned proxy.
- * In the implementation of this method, the JAX-WS
- * runtime system takes the responsibility of selecting a protocol
- * binding (and a port) and configuring the proxy accordingly.
- * The returned proxy should not be reconfigured by the client.
+ * The {@code getPort} method returns a proxy.The parameter
+ {@code serviceEndpointInterface} specifies the service
+ endpoint interface that is supported by the returned proxy. In the implementation of this method, the JAX-WS
+ runtime system takes the responsibility of selecting a protocol
+ binding (and a port) and configuring the proxy accordingly.
+ The returned proxy should not be reconfigured by the client.
*
+ * @param <T> Service endpoint interface.
* @param serviceEndpointInterface Service endpoint interface.
* @param features A list of WebServiceFeatures to configure on the
* proxy. Supported features not in the {@code features
* } parameter will have their default values.
* @return Object instance that supports the
@@ -265,10 +302,11 @@
* where the {@code portName} is retrieved from the
* metadata of the {@code endpointReference} or from the
* {@code serviceEndpointInterface} and the WSDL
* associated with this {@code Service} instance.
*
+ * @param <T> Service endpoint interface.
* @param endpointReference The {@code EndpointReference}
* for the target service endpoint that will be invoked by the
* returned proxy.
* @param serviceEndpointInterface Service endpoint interface.
* @param features A list of {@code WebServiceFeatures} to configure on the
@@ -326,10 +364,11 @@
/**
* Creates a {@code Dispatch} instance for use with objects of
* the client's choosing.
*
+ * @param <T> The type of the message or payload
* @param portName Qualified name for the target service endpoint
* @param type The class of object used for messages or message
* payloads. Implementations are required to support
* {@code javax.xml.transform.Source}, {@code javax.xml.soap.SOAPMessage}
* and {@code javax.activation.DataSource}, depending on
@@ -355,10 +394,11 @@
/**
* Creates a {@code Dispatch} instance for use with objects of
* the client's choosing.
*
+ * @param <T> The type of the message or payload
* @param portName Qualified name for the target service endpoint
* @param type The class of object used for messages or message
* payloads. Implementations are required to support
* {@code javax.xml.transform.Source} and {@code javax.xml.soap.SOAPMessage}.
* @param mode Controls whether the created dispatch instance is message
@@ -417,10 +457,11 @@
* {@code dispatch = service.createDispatch(portName, type, mode, features);}
* </pre>
* where the {@code portName} is retrieved from the
* WSDL or {@code EndpointReference} metadata.
*
+ * @param <T> The type of the message or payload
* @param endpointReference The {@code EndpointReference}
* for the target service endpoint that will be invoked by the
* returned {@code Dispatch} object.
* @param type The class of object used to messages or message
* payloads. Implementations are required to support
@@ -696,10 +737,11 @@
* uniquely identify a {@code wsdl:service} element.
*
* @param wsdlDocumentLocation {@code URL} for the WSDL document location
* for the service
* @param serviceName {@code QName} for the service
+ * @return Service instance
* @throws WebServiceException If any error in creation of the
* specified service.
**/
public static Service create(
java.net.URL wsdlDocumentLocation,
@@ -718,10 +760,11 @@
* for the service
* @param serviceName {@code QName} for the service
* @param features Web Service features that must be configured on
* the service. If the provider doesn't understand a feature,
* it must throw a WebServiceException.
+ * @return Service instance configured with requested web service features
* @throws WebServiceException If any error in creation of the
* specified service.
* @since 1.7, JAX-WS 2.2
**/
public static Service create(
@@ -732,10 +775,11 @@
/**
* Creates a {@code Service} instance.
*
* @param serviceName {@code QName} for the service
+ * @return Service instance
* @throws WebServiceException If any error in creation of the
* specified service
*/
public static Service create(QName serviceName) {
return new Service(null, serviceName);
@@ -747,10 +791,11 @@
*
* @param serviceName {@code QName} for the service
* @param features Web Service features that must be configured on
* the service. If the provider doesn't understand a feature,
* it must throw a WebServiceException.
+ * @return Service instance configured with requested web service features
* @throws WebServiceException If any error in creation of the
* specified service
*
* @since 1.7, JAX-WS 2.2
*/
< prev index next >