クラス W3CEndpointReferenceBuilder
- java.lang.ObjectSE
-
- jakarta.xml.ws.wsaddressing.W3CEndpointReferenceBuilder
public final class W3CEndpointReferenceBuilder extends ObjectSE
このクラスは、W3CEndpointReferenceインスタンスを構築するために使用されます。この clsss の使用目的は、同じ Jakarta EE アプリケーションによって公開された Web サービスエンドポイントのW3CEndpointReferenceを作成するための、ファクトリコンポーネントなどのアプリケーションコンポーネントです。また、addressプロパティを提供することにより、JavaSE ベースのエンドポイントのW3CEndpointReferencesを作成するために使用することもできます。同じ Jakarta EE アプリケーションによって公開されていないエンドポイントの
W3CEndpointReferenceを作成する場合は、addressプロパティを指定する必要があります。同じ Jakarta EE アプリケーションによって公開されたエンドポイントの
W3CEndpointReferenceを作成する場合、addressプロパティはnullである可能性がありますが、serviceNameとendpointNameは同じ Jakarta EE アプリケーションによって公開されたエンドポイントを指定する必要があります。wsdlDocumentLocationが指定されている場合、有効な WSDL ドキュメントを参照する必要があり、serviceNameとendpointName(指定されている場合)は WSDL ドキュメントのサービスとポートと一致する必要があります。- 導入:
- 1.6、JAX-WS 2.1
コンストラクターの概要
コンストラクター コンストラクター 説明 W3CEndpointReferenceBuilder()新しいW3CEndpointReferenceBuilderインスタンスを作成します。
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 W3CEndpointReferenceBuilderaddress(StringSE address)addressをW3CEndpointReferenceインスタンスのwsa:Addressに設定します。W3CEndpointReferenceBuilderattribute(QNameSE name, StringSE value)W3CEndpointReferenceインスタンスのwsa:EndpointReference要素に拡張属性を追加します。W3CEndpointReferencebuild()このW3CEndpointReferenceBuilderインスタンスに設定された累積プロパティからW3CEndpointReferenceを構築します。W3CEndpointReferenceBuilderelement(ElementSE element)W3CEndpointReferenceインスタンスのwsa:EndpointReference要素に拡張要素を追加します。W3CEndpointReferenceBuilderendpointName(QNameSE endpointName)wsa:Metadata要素でendpointNameをwsam:ServiceName/@EndpointNameとして設定します。W3CEndpointReferenceBuilderinterfaceName(QNameSE interfaceName)interfaceNameをwsa:Metadata要素のwsam:InterfaceName要素として設定します。W3CEndpointReferenceBuildermetadata(ElementSE metadataElement)metadataElementをW3CEndpointReferenceインスタンスのwsa:Metadata要素に追加します。W3CEndpointReferenceBuilderreferenceParameter(ElementSE referenceParameter)referenceParameterをW3CEndpointReferenceインスタンスwsa:ReferenceParameters要素に追加します。W3CEndpointReferenceBuilderserviceName(QNameSE serviceName)serviceNameをwsa:Metadata要素のwsam:ServiceName要素として設定します。W3CEndpointReferenceBuilderwsdlDocumentLocation(StringSE wsdlDocumentLocation)wsa:Metadata/@wsdli:wsdlLocationとして参照されるwsdlDocumentLocationを設定します。
メソッドの詳細
address
public W3CEndpointReferenceBuilder address(StringSE address)
addressをW3CEndpointReferenceインスタンスのwsa:Addressに設定します。同じ Jakarta EE アプリケーションによって公開されていない Web サービスエンドポイントの
W3CEndpointReferenceを構築する場合、または Java SE で実行する場合は、addressを非 null値に設定する必要があります。- パラメーター:
address- 返されたW3CEndpointReferenceのターゲットとなるエンドポイントのアドレス。- 戻り値:
addressがwsa:Addressに設定されたW3CEndpointReferenceBuilderインスタンス。
interfaceName
public W3CEndpointReferenceBuilder interfaceName(QNameSE interfaceName)
interfaceNameをwsa:Metadata要素のwsam:InterfaceName要素として設定します。詳細については、2.1 EPR からの WSDL メタデータの参照を参照してください。- パラメーター:
interfaceName- 返されたW3CEndpointReferenceの対象となるエンドポイントのポート型名。- 戻り値:
wsa:Metadata要素にwsam:InterfaceName要素としてinterfaceNameが追加されたW3CEndpointReferenceBuilderインスタンス- 導入:
- 1.7
serviceName
public W3CEndpointReferenceBuilder serviceName(QNameSE serviceName)
serviceNameをwsa:Metadata要素のwsam:ServiceName要素として設定します。詳細については、2.1 EPR からの WSDL メタデータの参照を参照してください。- パラメーター:
serviceName- 返されるW3CEndpointReferenceの対象となるエンドポイントのサービス名。このプロパティは、同じ Jakarta EE アプリケーションによって公開される Web サービスエンドポイントのaddressを検索するために、endpointName(portName) プロパティとともに使用することもできます。- 戻り値:
wsa:Metadata要素にwsam:ServiceName要素としてserviceNameが追加されたW3CEndpointReferenceBuilderインスタンス
endpointName
public W3CEndpointReferenceBuilder endpointName(QNameSE endpointName)
wsa:Metadata要素でendpointNameをwsam:ServiceName/@EndpointNameとして設定します。このメソッドは、serviceName(QName)メソッドが呼び出された後にのみ呼び出すことができます。詳細については、2.1 EPR からの WSDL メタデータの参照を参照してください。
- パラメーター:
endpointName- 返されるW3CEndpointReferenceの対象となるエンドポイントの名前。endpointName(portName) プロパティは、同じ Jakarta EE アプリケーションによって公開された Web サービスエンドポイントのaddressを検索するために、serviceNameプロパティとともに使用することもできます。- 戻り値:
wsa:Metadataエレメント内のwsam:ServiceName/@EndpointNameとしてendpointNameを持つW3CEndpointReferenceBuilderインスタンス。- 例外:
IllegalStateExceptionSE-serviceNameが設定されていない場合IllegalArgumentExceptionSE-endpointNameの名前空間 URI がserviceNameの名前空間 URI と一致しない場合
wsdlDocumentLocation
public W3CEndpointReferenceBuilder wsdlDocumentLocation(StringSE wsdlDocumentLocation)
wsa:Metadata/@wsdli:wsdlLocationとして参照されるwsdlDocumentLocationを設定します。wsdli:wsdlLocation の値の名前空間名は、WSDL 自体から取得できます。詳細については、2.1 EPR からの WSDL メタデータの参照を参照してください。
- パラメーター:
wsdlDocumentLocation-W3CEndpointReferenceのwsa:Metadataで参照される WSDL ドキュメントの場所。- 戻り値:
- 参照される
wsdlDocumentLocationを持つW3CEndpointReferenceBuilderインスタンス。
referenceParameter
public W3CEndpointReferenceBuilder referenceParameter(ElementSE referenceParameter)
referenceParameterをW3CEndpointReferenceインスタンスwsa:ReferenceParameters要素に追加します。- パラメーター:
referenceParameter-wsa:ReferenceParameters要素に追加される要素。- 戻り値:
referenceParameterがwsa:ReferenceParameters要素に追加されたW3CEndpointReferenceBuilderインスタンス。- 例外:
IllegalArgumentExceptionSE-referenceParameterがnullの場合。
metadata
public W3CEndpointReferenceBuilder metadata(ElementSE metadataElement)
metadataElementをW3CEndpointReferenceインスタンスのwsa:Metadata要素に追加します。- パラメーター:
metadataElement-wsa:Metadata要素に追加される要素。- 戻り値:
metadataElementがwsa:Metadata要素に追加されたW3CEndpointReferenceBuilderインスタンス。- 例外:
IllegalArgumentExceptionSE-metadataElementがnullの場合。
element
public W3CEndpointReferenceBuilder element(ElementSE element)
W3CEndpointReferenceインスタンスのwsa:EndpointReference要素に拡張要素を追加します。- パラメーター:
element-W3CEndpointReferenceに追加される拡張要素- 戻り値:
W3CEndpointReferenceインスタンスに拡張子elementが追加されたW3CEndpointReferenceBuilderインスタンス。- 例外:
IllegalArgumentExceptionSE-elementがnullの場合。- 導入:
- 1.7、JAX-WS 2.2
attribute
public W3CEndpointReferenceBuilder attribute(QNameSE name, StringSE value)
W3CEndpointReferenceインスタンスのwsa:EndpointReference要素に拡張属性を追加します。- パラメーター:
name-W3CEndpointReferenceに追加される拡張属性の名前value- 拡張属性値- 戻り値:
- 拡張属性が
W3CEndpointReferenceインスタンスに追加されたW3CEndpointReferenceBuilderインスタンス。 - 例外:
IllegalArgumentExceptionSE-nameまたはvalueがnullの場合。- 導入:
- 1.7、JAX-WS 2.2
build
public W3CEndpointReference build()
このW3CEndpointReferenceBuilderインスタンスに設定された累積プロパティからW3CEndpointReferenceを構築します。このメソッドを使用して、
addressプロパティを他の必要なプロパティとともに指定することにより、任意のエンドポイントのW3CEndpointReferenceを作成できます。このメソッドを使用して、同じ Jakarta EE アプリケーションによって公開されるエンドポイントのW3CEndpointReferenceを作成することもできます。このメソッドは、serviceNameおよびendpointNameプロパティによって識別される同じ Jakarta EE アプリケーションによって公開されたエンドポイントのaddressを自動的に判別できます。addressがnullであり、serviceNameとendpointNameが同じ Jakarta EE アプリケーションによって公開されたエンドポイントを識別しない場合、java.lang.IllegalStateExceptionをスローする必要があります。- 戻り値:
- この
W3CEndpointReferenceBuilderインスタンスに設定された累積プロパティからのW3CEndpointReference。このメソッドはnullを返すことはありません。 - 例外:
IllegalStateExceptionSE-address、serviceName、endpointNameがすべてnullの場合。serviceNameサービスがnullで、endpointNameがnullではない場合。addressプロパティがnullで、serviceNameとendpointNameが同じ Jakarta EE アプリケーションによって公開された有効なエンドポイントを指定していない場合。serviceNameがnullではなく、指定された WSDL に存在しない場合。endpointNameポートがnullではなく、WSDL のserviceNameサービスに存在しない場合。wsdlDocumentLocationがnullではなく、有効な WSDL を表していない場合。
WebServiceException-W3CEndpointReferenceの作成中にエラーが発生した場合。