Client Considerations When Redeploying a Reliable Web Service Using Reliable Messaging With a Proxy Server

3-28 Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server public byte[] echoBinarybyte[] bytes { return bytes; } } As illustrated in the previous example in bold text, follow these guidelines when programming the JWS file that invokes a reliable Web service with MTOM: ■ Use the weblogic.jws.Policy annotation to specify that the pre-packaged Mtom.xml file should be applied to your Web service. Use the weblogic.jws.Policies annotation to group multiple WS-Policy files, including the reliable messaging policy file and the MTOM policy file. Policies{Policyuri=ReliableHelloWorldPolicy.xml, direction=Policy.Direction.both, attachToWsdl=true, Policyuri = policy:Mtom.xml} ■ Use the Java byte[] data type in your Web service operations as either a return value or input parameter whenever you want the resulting SOAP message to use MTOMXOP to send or receive the binary data. public byte[] echoBinarybyte[] bytes { return bytes; }

3.11 Client Considerations When Redeploying a Reliable Web Service

WebLogic Server supports production redeployment, which means that you can deploy a new version of an updated reliable WebLogic Web service alongside an older version of the same Web service. WebLogic Server automatically manages client connections so that only new client requests are directed to the new version. Clients already connected to the Web service during the redeployment continue to use the older version of the service until they complete their work, at which point WebLogic Server automatically retires the older Web service. If the client is connected to a reliable Web service, its work is considered complete when the existing reliable message sequence is explicitly ended by the client or as a result of a timeout. For additional information about production redeployment and Web service clients, see Client Considerations When Redeploying a Web service in Getting Started With JAX-RPC Web Services for Oracle WebLogic Server.

3.12 Using Reliable Messaging With a Proxy Server

Client applications that invoke reliable Web services might not invoke the operation directly, but rather, use a proxy server. Reasons for using a proxy include the presence of a firewall or the deployment of the invoked Web service to a cluster. In this case, the WebLogic Server instance that hosts the invoked Web service must be configured with the address and port of the proxy server. If your Web service is deployed to a cluster, you must configure every server in the cluster. Note: In this release of WebLogic Server, the only supported Java data type when using MTOMXOP is byte[]; other binary data types, such as image, are not supported. Using Web Services Reliable Messaging 3-29 This procedure describes how to create a network channel, the primary configurable WebLogic Server resource for managing network connection. Network channels enable you to provide a consistent way to access the front-end address of a cluster. For more information about network channels, see Understanding Network Channels in Configuring Server Environments for Oracle WebLogic Server. For each server instance: 1. Create a network channel for the protocol you use to invoke the Web service. You must name the network channel weblogic-wsee-proxy-channel-XXX, where XXX refers to the protocol. For example, to create a network channel for HTTPS, call it weblogic-wsee-proxy-channel-https. See Configure custom network channels in Oracle WebLogic Server Administration Console Help for general information about creating a network channel.

2. Configure the network channel, updating the External Listen Address and

External Listen Port fields with the address and port of the proxy server, respectively. 3. Disable the asynchronous response service on the WebLogic Server proxy server by starting the WebLogic Server instance using the -Dweblogic.wsee.skip.async.response=true Java system property. By default, every WebLogic Server instance deploys an internal asynchronous Web service that handles the asynchronous request-response feature. If you do not specify this system property, asynchronous messages will never get to the cluster, as required, because the asynchronous service on the proxy server will consume them instead. 3-30 Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server 4 Creating Conversational Web Services 4-1 4 Creating Conversational Web Services The following sections describe how to create a conversational Web service: ■ Section 4.1, Overview of Conversational Web Services