Spec-Zone .ru
спецификации, руководства, описания, API


javax.xml.ws
Класс EndpointReference

java.lang.Object
  расширенный javax.xml.ws.EndpointReference
Прямые Известные Подклассы:
W3CEndpointReference

public abstract class EndpointReference
расширяет java.lang. Объект

Этот class представляет Адресацию WS EndpointReference, который является удаленной ссылкой на конечную точку веб-сервиса. См., что Веб-сервисы Адресуются 1.0 - Ядро для получения дополнительной информации об Адресации WS EndpointReferences.

Этот class является неизменным, поскольку типичный разработчик веб-сервиса не должен быть обеспокоен его содержанием. Разработчик веб-сервиса должен использовать этот class строго в качестве механизма, чтобы сослаться на удаленную конечную точку веб-сервиса. См. Service API, которые клиенты могут использовать для этого, используют EndpointReference. См. Endpoint, и BindingProvider API, на как EndpointReferences может быть создан для опубликованных конечных точек.

Конкретные реализации этого class представят EndpointReference для определенной версии Адресации. Например W3CEndpointReference для использования с Веб-сервисами W3C, Адресуясь 1.0 - Базовая Рекомендация. Если конструкторы JAX-WS должны поддерживать различные версии адресации, они должны записать свое собственное EndpointReference подкласс для той версии. Это позволит реализации JAX-WS создавать определенного поставщика EndpointReferences то, что поставщик может использовать, чтобы отметить различную версию адресации.

Разработчики веб-сервиса, которые хотят передать или возвратиться EndpointReference в методах Java в SEI должен использовать конкретные экземпляры EndpointReference такой как W3CEndpointReference. Этим путем схема, отображенная от SEI, будет более дескриптивной из типа ссылки конечной точки, которую передают.

Конструкторы JAX-WS, как ожидают, извлекут инфонабор XML из EndpointReferece использование EndpointReference#writeTo метод.

JAXB свяжет этот class с xs:anyType. Если лучшая привязка требуется, разработчики веб-сервисов должны использовать конкретный подкласс такой как W3CEndpointReference.

С тех пор:
JAX-WS 2.1
См. Также:
W3CEndpointReference, Service

Сводка конструктора
protected EndpointReference()
           
 
Сводка метода
<T> T
getPort(java.lang.Class<T> serviceEndpointInterface, WebServiceFeature... features)
          getPort метод возвращает прокси.
static EndpointReference readFrom(javax.xml.transform.Source eprInfoset)
          Метод фабрики, чтобы считать EndpointReference из инфонабора, содержавшегося в eprInfoset.
 java.lang.String toString()
          Дисплеи инфонабор EPR для того, чтобы отладить удобство.
abstract  void writeTo(javax.xml.transform.Result result)
          запишите это EndpointReference к указанному формату инфонабора
 
Методы, наследованные от class java.lang. Объект
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Деталь конструктора

EndpointReference

protected EndpointReference()
Деталь метода

readFrom

public static EndpointReference readFrom(javax.xml.transform.Source eprInfoset)
Метод фабрики, чтобы считать EndpointReference из инфонабора, содержавшегося в eprInfoset. Этот метод делегирует поставщику определенную реализацию Provider.readEndpointReference(javax.xml.transform.Source) метод.

Параметры:
eprInfoset - EndpointReference infoset to be unmarshalled
Returns:
the EndpointReference unmarshalled from eprInfoset never null
Throws:
WebServiceException - if an error occurs while creating the EndpointReference from the eprInfoset
java.lang.IllegalArgumentException - if the null eprInfoset value is given.

writeTo

public abstract void writeTo(javax.xml.transform.Result result)
write this EndpointReference to the specified infoset format

Parameters:
result - for writing infoset
Throws:
WebServiceException - if there is an error writing the EndpointReference to the specified result.
java.lang.IllegalArgumentException - If the null result value is given.

getPort

public <T> T getPort(java.lang.Class<T> 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 the EndpointReference instance MUST contain an implementation understood serviceName 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 -
  • 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

toString

public java.lang.String toString()
Displays EPR infoset for debugging convenience.

Overrides:
toString in class java.lang.Object


Представьте ошибку или функцию

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41

free hit counter