EndpointReference (Java Platform SE 6) (original) (raw)
javax.xml.ws
Class EndpointReference
java.lang.Object
javax.xml.ws.EndpointReference
Direct Known Subclasses:
public abstract class EndpointReference
extends Object
This class represents an WS-Addressing EndpointReference which is a remote reference to a web service endpoint. See Web Services Addressing 1.0 - Core for more information on WS-Addressing EndpointReferences.
This class is immutable as the typical web service developer need not be concerned with its contents. The web service developer should use this class strictly as a mechanism to reference a remote web service endpoint. See the Service APIs that clients can use to that utilize an EndpointReference
. See the Endpoint, and BindingProvider APIs on how EndpointReferences
can be created for published endpoints.
Concrete implementations of this class will represent an EndpointReference
for a particular version of Addressing. For example the W3CEndpointReference is for use with W3C Web Services Addressing 1.0 - Core Recommendation. If JAX-WS implementors need to support different versions of addressing, they should write their own EndpointReference
subclass for that version. This will allow a JAX-WS implementation to create vendor specific EndpointReferences
that that vendor can use to flag a different version of addressing.
Web service developers that wish to pass or return EndpointReferences
in Java methods in an SEI should use concrete instances of an EndpointReference
such as the W3CEndpointReference
. This way the schema mapped from the SEI will be more descriptive of the type of endpoint reference being passed.
JAX-WS implementors are expected to extract the XML infoset from an EndpointReferece
using the [writeTo(javax.xml.transform.Result)](../../../javax/xml/ws/EndpointReference.html#writeTo%28javax.xml.transform.Result%29)
method.
JAXB will bind this class to xs:anyType. If a better binding is desired, web services developers should use a concrete subclass such as W3CEndpointReference.
Since:
JAX-WS 2.1
See Also:
Constructor Summary | |
---|---|
protected | EndpointReference() |
Method Summary | |
---|---|
T | [getPort](../../../javax/xml/ws/EndpointReference.html#getPort%28java.lang.Class, javax.xml.ws.WebServiceFeature...%29)(Class serviceEndpointInterface,WebServiceFeature... features) The getPort method returns a proxy. |
static EndpointReference | readFrom(Source eprInfoset) Factory method to read an EndpointReference from the infoset contained ineprInfoset. |
String | toString() Displays EPR infoset for debugging convenience. |
abstract void | writeTo(Result result) write this EndpointReference to the specified infoset format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, [wait](../../../java/lang/Object.html#wait%28long, int%29) |
Constructor Detail |
---|
EndpointReference
protected EndpointReference()
Method Detail |
---|
readFrom
public static EndpointReference readFrom(Source eprInfoset)
Factory method to read an EndpointReference from the infoset contained ineprInfoset
. This method delegates to the vendor specific implementation of the Provider.readEndpointReference(javax.xml.transform.Source) method.
Parameters:
eprInfoset
- The EndpointReference` infoset to be unmarshalled`
`**Returns:**`
`` the EndpointReference unmarshalled from `eprInfoset` never `null` ``
`**Throws:** `
`` `[WebServiceException](../../../javax/xml/ws/WebServiceException.html "class in javax.xml.ws")` - if an error occurs while creating the`EndpointReference` from the `eprInfoset` ``
`` `[IllegalArgumentException](../../../java/lang/IllegalArgumentException.html "class in java.lang")` - if the `null` `eprInfoset value is given.` ``
``` `` ```
``` `` ```
````` ```` ``` ---
writeTo
public abstract void writeTo(Result result)
write this EndpointReference
to the specified infoset format
Throws:
[WebServiceException](../../../javax/xml/ws/WebServiceException.html "class in javax.xml.ws")
- if there is an error writing theEndpointReference
to the specified result
.
[IllegalArgumentException](../../../java/lang/IllegalArgumentException.html "class in java.lang")
- If the null
result value is given.
``
``
`` ---
getPort
public T getPort(Class serviceEndpointInterface, WebServiceFeature... features)
The getPort
method returns a proxy. If there are any reference parameters in the EndpointReference
instance, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The parameter serviceEndpointInterface
specifies the service endpoint interface that is supported by the returned proxy. The EndpointReference
instance specifies the endpoint that will be invoked 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 from the WSDL Metadata from this EndpointReference
or from annotations on the serviceEndpointInterface
. For this method to successfully return a proxy, WSDL metadata MUST be available and theEndpointReference
instance MUST contain an implementation understoodserviceName
metadata.
Because this port is not created from a Service
object, handlers will not automatically be configured, and the HandlerResolver
and Executor
cannot be get or set for this port. The BindingProvider().getBinding().setHandlerChain()
method can be used to manually configure handlers for this port.
Parameters:
serviceEndpointInterface
- Service endpoint interface
features
- An array of WebServiceFeatures
to configure on the proxy. Supported features not in the features
parameter will have their default values.
Returns:
Object Proxy instance that supports the specified service endpoint interface
Throws:
[WebServiceException](../../../javax/xml/ws/WebServiceException.html "class in javax.xml.ws")
-
- If there is an error during creation of the proxy
- If there is any missing WSDL metadata as required by this method
- If this
endpointReference
is invalid - If an illegal
serviceEndpointInterface
is specified - If a feature is enabled that is not compatible with this port or is unsupported.
See Also:
toString
public String toString()
Displays EPR infoset for debugging convenience.
Overrides:
[toString](../../../java/lang/Object.html#toString%28%29)
in class [Object](../../../java/lang/Object.html "class in java.lang")
Returns:
a string representation of the object.
Overview Package Class Use Tree Deprecated Index Help | Java™ PlatformStandard Ed. 6 | |||
---|---|---|---|---|
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
Scripting on this page tracks web page traffic, but does not change the content in any way.
`` ``` ```` `````