Invoking Web Services 6-17
The following excerpt from an Ant build script shows an example of setting WebLogic system properties when invoking a client application called
clients.InvokeMyService :
target name=run-client java fork=true
classname=clients.InvokeMyService failonerror=true
classpath refid=client.class.path arg line={http-endpoint}
jvmarg line= -DproxySet=true
-DproxyHost={proxy-host} -DproxyPort={proxy-port}
-Dweblogic.webservice.client.proxyusername={proxy-username} -Dweblogic.webservice.client.proxypassword={proxy-passwd}
java target
6.6 Client Considerations When Redeploying a Web Service
WebLogic Server supports production redeployment, which means that you can deploy a new version of an updated 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 conversational or reliable Web service, its work is considered complete when the existing conversation or reliable messaging
sequence is explicitly ended by the client or because of a timeout.
You can continue using the old client application with the new version of the Web service, as long as the following Web service artifacts have not changed in the new
version:
■
WSDL that describes the Web service
■
WS-Policy files attached to the Web service If any of these artifacts have changed, you must regenerate the JAX-RPC stubs used by
the client application by re-running the clientgen Ant task. For example, if you change the signature of an operation in the new version of the
Web service, then the WSDL file that describes the new version of the Web service will also change. In this case, you must regenerate the JAX-RPC stubs. If, however, you
simply change the implementation of an operation, but do not change its public contract, then you can continue using the existing client application.
6.7 WebLogic Web Services Stub Properties
WebLogic Server provides a set of stub properties that you can set in the JAX-RPC Stub used to invoke a WebLogic Web service. Use the Stub._setProperty
method to set the properties, as shown in the following example:
Stubport._setPropertyWLStub.MARSHAL_FORCE_INCLUDE_XSI_TYPE,true;
6-18 Getting Started With JAX-RPC Web Services for Oracle WebLogic Server
Most of the stub properties are defined in the WLStub class. See weblogic.wsee.jaxrpc.WLStub
in the Oracle Fusion Middleware Oracle WebLogic Server API Referencefor details.
The following table describes additional stub properties not defined in the WLStub class.
Table 6–5 Additional Stub Properties
Stub Property Description
weblogic.wsee.transport.connection.timeout Specifies, in seconds, how long a client application that is
attempting to invoke a Web service waits to make a connection. After the specified time elapses, if a connection
hasnt been made, the attempt times out.
weblogic.wsee.transport.read.timeout Specifies, in seconds, how long a client application waits for a
response from a Web service it is invoking. After the specified time elapses, if a response hasnt arrived, the client
times out.
weblogic.wsee.security.bst.serverVerifyCert Specifies the certificate that the client application uses to
validate the signed response from WebLogic Server. By default, WebLogic Server includes the certification used to
validate in the response SOAP message itself; if this is not possible, then use this stub property to specify a different
one.
This stub property applies only to client applications that run inside of a WebLogic Server container, and not to stand-alone
client applications. The value of the property is an object of data type
java.security.cert.X509Certificate .
Invoking Web Services 6-19
6.8 Setting the Character Encoding For the Response SOAP Message