< prev index next >
src/java.xml.ws/share/classes/javax/xml/ws/Service.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2015, 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
--- 1,7 ----
/*
! * 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,86 ****
/**
* 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 }
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName) {
delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
serviceName,
this.getClass());
}
protected Service(java.net.URL wsdlDocumentLocation, QName serviceName, WebServiceFeature ... features) {
delegate = Provider.provider().createServiceDelegate(wsdlDocumentLocation,
serviceName,
this.getClass(), features);
}
--- 69,120 ----
/**
* 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 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,100 ****
--- 125,135 ----
* 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,133 ****
--- 159,169 ----
* 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,177 ****
--- 204,214 ----
* 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,205 ****
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.
*
* @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
--- 225,242 ----
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.
*
+ * @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,274 ****
--- 302,312 ----
* 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,335 ****
--- 364,374 ----
/**
* 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,364 ****
--- 394,404 ----
/**
* 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,426 ****
--- 457,467 ----
* {@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,705 ****
--- 737,747 ----
* 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,727 ****
--- 760,770 ----
* 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,741 ****
--- 775,785 ----
/**
* 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,756 ****
--- 791,801 ----
*
* @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 >