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


javax.xml.ws.wsaddressing
Класс W3CEndpointReferenceBuilder

java.lang.Object
  расширенный javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder

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

Этот class используется, чтобы создать W3CEndpointReference экземпляры. Намеченное использование этого clsss для компонента приложения, например компонент фабрики, чтобы создать W3CEndpointReference для конечной точки веб-сервиса, опубликованной тем же самым приложением EE Java. Это может также использоваться, чтобы создать W3CEndpointReferences для Java SE базируемая конечная точка, обеспечивая address свойство.

Создавая a W3CEndpointReference для конечной точки, которая не публикуется тем же самым приложением EE Java, address свойство MUST быть определенным.

Создавая a W3CEndpointReference для конечной точки, опубликованной тем же самым приложением EE Java, address свойство MAY быть null но тогда serviceName и endpointName ДОЛЖЕН определить конечную точку, опубликованную тем же самым приложением EE Java.

Когда wsdlDocumentLocation определяется это ДОЛЖНО сослаться на допустимый документ WSDL и serviceName и endpointName (если определено), ДОЛЖЕН соответствовать службу и порт в документе WSDL.

С тех пор:
JAX-WS 2.1

Сводка конструктора
W3CEndpointReferenceBuilder()
          Создает новое W3CEndpointReferenceBuilder экземпляр.
 
Сводка метода
 W3CEndpointReferenceBuilder address(java.lang.String address)
          Наборы address к W3CEndpointReference экземпляр wsa:Address.
 W3CEndpointReferenceBuilder attribute(javax.xml.namespace.QName name, java.lang.String value)
          Добавляет, что расширение приписывает W3CEndpointReference экземпляр wsa:EndpointReference элемент.
 W3CEndpointReference build()
          Создает a W3CEndpointReference от накопленного набора свойств на этом W3CEndpointReferenceBuilder экземпляр.
 W3CEndpointReferenceBuilder element(org.w3c.dom.Element element)
          Добавляет элемент расширения к W3CEndpointReference экземпляр wsa:EndpointReference элемент.
 W3CEndpointReferenceBuilder endpointName(javax.xml.namespace.QName endpointName)
          Наборы endpointName как wsam:ServiceName/@EndpointName в wsa:Metadata элемент.
 W3CEndpointReferenceBuilder interfaceName(javax.xml.namespace.QName interfaceName)
          Наборы interfaceName как wsam:InterfaceName элемент в wsa:Metadata элемент.
 W3CEndpointReferenceBuilder metadata(org.w3c.dom.Element metadataElement)
          Добавляет metadataElement к W3CEndpointReference экземпляр wsa:Metadata элемент.
 W3CEndpointReferenceBuilder referenceParameter(org.w3c.dom.Element referenceParameter)
          Добавляет referenceParameter к W3CEndpointReference экземпляр wsa:ReferenceParameters элемент.
 W3CEndpointReferenceBuilder serviceName(javax.xml.namespace.QName serviceName)
          Наборы serviceName как wsam:ServiceName элемент в wsa:Metadata элемент.
 W3CEndpointReferenceBuilder wsdlDocumentLocation(java.lang.String wsdlDocumentLocation)
          Наборы wsdlDocumentLocation на это сошлются как wsa:Metadata/@wsdli:wsdlLocation.
 
Методы, наследованные от class java.lang. Объект
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

W3CEndpointReferenceBuilder

public W3CEndpointReferenceBuilder()
Создает новое W3CEndpointReferenceBuilder экземпляр.

Деталь метода

адрес

public W3CEndpointReferenceBuilder address(java.lang.String address)
Наборы address к W3CEndpointReference экземпляр wsa:Address.

address ДОЛЖЕН быть установлен в не -null оцените, создавая a W3CEndpointReference для конечной точки веб-сервиса, которая не публикуется тем же самым приложением EE Java или работая на Java SE.

Параметры:
address - Адрес конечной точки, которая будет предназначена возвращенным W3CEndpointReference.
Returns:
A W3CEndpointReferenceBuilder instance with the address set to the wsa:Address.

interfaceName

public W3CEndpointReferenceBuilder interfaceName(javax.xml.namespace.QName interfaceName)
Sets the interfaceName as the wsam:InterfaceName element in the wsa:Metadata element. See 2.1 Referencing WSDL Metadata from an EPR for more details.

Parameters:
interfaceName - The port type name of the endpoint to be targeted by the returned W3CEndpointReference.
Returns:
A W3CEndpointReferenceBuilder instance with the interfaceName as wsam:InterfaceName element added to the wsa:Metadata element

serviceName

public W3CEndpointReferenceBuilder serviceName(javax.xml.namespace.QName serviceName)
Sets the serviceName as the wsam:ServiceName element in the wsa:Metadata element. See 2.1 Referencing WSDL Metadata from an EPR for more details.

Parameters:
serviceName - The service name of the endpoint to be targeted by the returned W3CEndpointReference. This property may also be used with the endpointName (portName) property to lookup the address of a web service endpoint that is published by the same Java EE application.
Returns:
A W3CEndpointReferenceBuilder instance with the serviceName as wsam:ServiceName element added to the wsa:Metadata element

endpointName

public W3CEndpointReferenceBuilder endpointName(javax.xml.namespace.QName endpointName)
Sets the endpointName as wsam:ServiceName/@EndpointName in the wsa:Metadata element. This method can only be called after the serviceName method has been called.

See 2.1 Referencing WSDL Metadata from an EPR for more details.

Parameters:
endpointName - The name of the endpoint to be targeted by the returned W3CEndpointReference. The endpointName (portName) property may also be used with the serviceName property to lookup the address of a web service endpoint published by the same Java EE application.
Returns:
A W3CEndpointReferenceBuilder instance with the endpointName as wsam:ServiceName/@EndpointName in the wsa:Metadata element.
Throws:
IllegalStateException, - if the serviceName has not been set.
IllegalArgumentException, - if the endpointName's Namespace URI doesn't match serviceName's Namespace URI

wsdlDocumentLocation

public W3CEndpointReferenceBuilder wsdlDocumentLocation(java.lang.String wsdlDocumentLocation)
Sets the wsdlDocumentLocation that will be referenced as wsa:Metadata/@wsdli:wsdlLocation. The namespace name for the wsdli:wsdlLocation's value can be taken from the WSDL itself.

See 2.1 Referencing WSDL Metadata from an EPR for more details.

Parameters:
wsdlDocumentLocation - The location of the WSDL document to be referenced in the wsa:Metadata of the W3CEndpointReference.
Returns:
A W3CEndpointReferenceBuilder instance with the wsdlDocumentLocation that is to be referenced.

referenceParameter

public W3CEndpointReferenceBuilder referenceParameter(org.w3c.dom.Element referenceParameter)
Adds the referenceParameter to the W3CEndpointReference instance wsa:ReferenceParameters element.

Parameters:
referenceParameter - The element to be added to the wsa:ReferenceParameters element.
Returns:
A W3CEndpointReferenceBuilder instance with the referenceParameter added to the wsa:ReferenceParameters element.
Throws:
java.lang.IllegalArgumentException - if referenceParameter is null.

metadata

public W3CEndpointReferenceBuilder metadata(org.w3c.dom.Element metadataElement)
Adds the metadataElement to the W3CEndpointReference instance's wsa:Metadata element.

Parameters:
metadataElement - The element to be added to the wsa:Metadata element.
Returns:
A W3CEndpointReferenceBuilder instance with the metadataElement added to the wsa:Metadata element.
Throws:
java.lang.IllegalArgumentException - if metadataElement is null.

element

public W3CEndpointReferenceBuilder element(org.w3c.dom.Element element)
Adds an extension element to the W3CEndpointReference instance's wsa:EndpointReference element.

Parameters:
element - The extension element to be added to the W3CEndpointReference
Returns:
A W3CEndpointReferenceBuilder instance with the extension element added to the W3CEndpointReference instance.
Throws:
java.lang.IllegalArgumentException - if element is null.
Since:
JAX-WS 2.2

attribute

public W3CEndpointReferenceBuilder attribute(javax.xml.namespace.QName name,
                                             java.lang.String value)
Adds an extension attribute to the W3CEndpointReference instance's wsa:EndpointReference element.

Parameters:
name - The name of the extension attribute to be added to the W3CEndpointReference
value - extension attribute value
Returns:
A W3CEndpointReferenceBuilder instance with the extension attribute added to the W3CEndpointReference instance.
Throws:
java.lang.IllegalArgumentException - if name or value is null.
Since:
JAX-WS 2.2

build

public W3CEndpointReference build()
Builds a W3CEndpointReference from the accumulated properties set on this W3CEndpointReferenceBuilder instance.

This method can be used to create a W3CEndpointReference for any endpoint by specifying the address property along with any other desired properties. This method can also be used to create a W3CEndpointReference for an endpoint that is published by the same Java EE application. This method can automatically determine the address of an endpoint published by the same Java EE application that is identified by the serviceName and endpointName properties. If the address is null and the serviceName and endpointName do not identify an endpoint published by the same Java EE application, a java.lang.IllegalStateException MUST be thrown.

Returns:
W3CEndpointReference from the accumulated properties set on this W3CEndpointReferenceBuilder instance. This method never returns null.
Throws:
IllegalStateException -
  • If the address, serviceName and endpointName are all null.
  • If the serviceName service is null and the endpointName is NOT null.
  • If the address property is null and the serviceName and endpointName do not specify a valid endpoint published by the same Java EE application.
  • If the serviceName is NOT null and is not present in the specified WSDL.
  • If the endpointName port is not null and it is not present in serviceName service in the WSDL.
  • If the wsdlDocumentLocation is NOT null and does not represent a valid WSDL.
WebServiceException - If an error occurs while creating the W3CEndpointReference.


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

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