Configuring the ReplyTo and FaultTo Headers of the Asynchronous Response Endpoint

3-12 Programming Advanced Features of JAX-WS Web Services for Oracle WebLogic Server

3.5.1.2 Configuring the ReplyTo and FaultTo Headers of the Asynchronous Response Endpoint

You can configure the address to use for all outgoing ReplyTo and FaultTo headers of type javax.xml.ws.wsaddressing.W3CEndpointReference for the asynchronous response endpoint by passing them as arguments to the AsyncClientTransportFeature. For example, to configure only the ReplyTo header address: W3CEndpointReference replyToAddress = http:myserver.com:7001myReliableServicemyClientCallback; AsyncClientTransportFeature asyncFeature = new AsyncClientTransportFeaturereplyToAddress; BackendService port = _service.getBackendServicePortasyncFeature; To configure both the ReplyTo and FaultTo header addresses: W3CEndpointReference replyToAddress = http:myserver.com:7001myReliableServicemyClientCallback; W3CEndpointReference faultToAddress = http:myserver.com:7001myReliableServiceFaultTo; AsyncClientTransportFeature asyncFeature = new AsyncClientTransportFeaturereplyToAddress, faultToAddress ; BackendService port = _service.getBackendServicePortasyncFeature; The following tables summarizes the constructors that can be used to configure the endpoint reference address for the outgoing ReplyTo and FaultTo headers. Table 3–6 Constructors for Configuring the ReplyTo and FaultTo Headers Constructor Description AsyncClientTransportFeaturejavax.xml.ws. wsaddressing.W3CEndpointReference replyTo Configures the endpoint reference address for the outgoing ReplyTo headers. AsyncClientTransportFeaturejavax.xml.ws. wsaddressing.W3CEndpointReference replyTo , boolean doPublish Configures the following: ■ Endpoint reference address for the outgoing ReplyTo headers. ■ Whether to publish the endpoint at the specified address. For more information, see Section 3.5.1.4, Publishing the Asynchronous Response Endpoint . AsyncClientTransportFeaturejavax.xml.ws. wsaddressing.W3CEndpointReference replyTo , boolean doPublish, boolean useAsyncWithSyncInvoke Configures the following: ■ Endpoint reference address for the outgoing ReplyTo headers. ■ Whether to publish the endpoint at the specified address. For more information, see Section 3.5.1.4, Publishing the Asynchronous Response Endpoint . ■ Whether to enable asynchronous client transport for synchronous operations. For more information, see Section 3.5.1.5, Configuring Asynchronous Client Transport for Synchronous Operations . AsyncClientTransportFeaturejavax.xml.ws. wsaddressing.W3CEndpointReference replyTo , javax.xml.ws.wsaddressing.W3CEndpointRefe rence faultTo Configures the endpoint reference address for the outgoing ReplyTo and FaultTo headers Invoking Web Services Asynchronously 3-13

3.5.1.3 Configuring the Context Path of the Asynchronous Response Endpoint