- java.lang.Object
-
- javax.xml.ws.EndpointReference
-
- Direct Known Subclasses:
- W3CEndpointReference
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 anEndpointReference
. See theEndpoint
, andBindingProvider
APIs on howEndpointReferences
can be created for published endpoints.Concrete implementations of this class will represent an
EndpointReference
for a particular version of Addressing. For example theW3CEndpointReference
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 ownEndpointReference
subclass for that version. This will allow a JAX-WS implementation to create a vendor specificEndpointReferences
that the vendor can use to flag a different version of addressing.Web service developers that wish to pass or return
EndpointReference
in Java methods in an SEI should use concrete instances of anEndpointReference
such as theW3CEndpointReference
. 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
method.writeTo(javax.xml.transform.Result)
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:
W3CEndpointReference
,Service
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
EndpointReference()
-
Method Summary
Methods Modifier and Type Method and Description <T> T
getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
ThegetPort
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 thisEndpointReference
to the specified infoset format
-
-
-
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 theProvider.readEndpointReference(javax.xml.transform.Source)
method.- Parameters:
eprInfoset
- TheEndpointReference
infoset to be unmarshalled- Returns:
- the EndpointReference unmarshalled from
eprInfoset
nevernull
- Throws:
WebServiceException
- if an error occurs while creating theEndpointReference
from theeprInfoset
IllegalArgumentException
- if thenull
eprInfoset
value is given.
-
writeTo
public abstract void writeTo(Result result)
write thisEndpointReference
to the specified infoset format- Parameters:
result
- for writing infoset- Throws:
WebServiceException
- if there is an error writing theEndpointReference
to the specifiedresult
.IllegalArgumentException
- If thenull
result
value is given.
-
getPort
public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features)
ThegetPort
method returns a proxy. If there are any reference parameters in theEndpointReference
instance, then those reference parameters MUST appear as SOAP headers, indicating them to be reference parameters, on all messages sent to the endpoint. The parameterserviceEndpointInterface
specifies the service endpoint interface that is supported by the returned proxy. TheEndpointReference
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 thisEndpointReference
or from annotations on theserviceEndpointInterface
. 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 theHandlerResolver
andExecutor
cannot be get or set for this port. TheBindingProvider().getBinding().setHandlerChain()
method can be used to manually configure handlers for this port.- Parameters:
serviceEndpointInterface
- Service endpoint interfacefeatures
- An array ofWebServiceFeatures
to configure on the proxy. Supported features not in thefeatures
parameter will have their default values.- Returns:
- Object Proxy instance that supports the specified service endpoint interface
- Throws:
WebServiceException
-- 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:
Proxy
,WebServiceFeature
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/xml/ws/EndpointReference.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.