Programming WebLogic Web Services
|
|
The following sections describe how to upgrade WebLogic Web Services to 8.1:
Because of changes in the Web Service runtime system between Versions 6.1, 7.0, and 8.1 of WebLogic Server, you must upgrade Web Services created in version 6.1 and 7.0 to run on Version 8.1.
To upgrade a 7.0 WebLogic Web Service to Version 8.1:
On Windows NT, execute the setEnv.cmd command, located in your domain directory. The default location of WebLogic Server domains is BEA_HOME\user_projects\domains\domainName, where BEA_HOME is the top-level installation directory of the BEA products and domainName is the name of your domain.
On UNIX, execute the setEnv.sh command, located in your domain directory. The default location of WebLogic Server domains is BEA_HOME/user_projects/domains/domainName, where BEA_HOME is the top-level installation directory of the BEA products and domainName is the name of your domain.
build.xml file that contains the call to the servicegen Ant task.servicegen Ant task specified in the build.xml file by typing ant in the staging directory:prompt>ant
You upgrade a 6.1 Web Service manually, by rewriting the build.xml file you used to create the 6.1 Web Service to now call the servicegen Ant task rather than the wsgen Ant task. You cannot deploy a 6.1 Web Service on a 8.1 WebLogic Server instance.
Warning: The wsgen Ant task was deprecated in Version 7.0 of WebLogic Server, and is not supported in Version 8.1.
The WebLogic Web Services client API included in version 6.1 of WebLogic Server has been removed and you cannot use it to invoke 8.1 Web Services. Version 8.1 includes a new client API, based on the Java API for XML based RPC (JAX-RPC). You must rewrite client applications that used the 6.1 Web Services client API to now use the JAX-RPC APIs. For details, see Invoking Web Services from Client Applications and WebLogic Server.
To upgrade a 6.1 WebLogic Web Service to 8.1:
build.xml Ant build file used to assemble 6.1 Web Services with the wsgen Ant task to the 8.1 version that calls the servicegen Ant task. For details see Converting a 6.1 build.xml file to 8.1.
servicegen Ant task. If your 6.1 Web Service was message-style, see Assembling JMS-Implemented WebLogic Web Services Using servicegen.The main difference between the 6.1 and 8.1 build.xml files used to assemble a Web Service is the Ant task: in 6.1 the task was called wsgen and in 8.1 it is called servicegen. The servicegen Ant task uses many of the same elements and attributes of wsgen, although some do not apply anymore. The servicegen Ant task also includes additional configuration options. The table at the end of this section describes the mapping between the elements and attributes of the two Ant tasks.
The following build.xml excerpt is from the 6.1 RPC-style Web Services example:
<project name="myProject" default="wsgen">
<target name="wsgen">
<wsgen destpath="weather.ear"
context="/weather">
<rpcservices path="weather.jar">
<rpcservice bean="statelessSession"
uri="/weatheruri"/>
</rpcservices>
</wsgen>
</target>
</project>
The following example shows an equivalent 8.1 build.xml file:
<project name="myProject" default="servicegen">
<target name="servicegen">
<servicegen
destEar="weather.ear"
contextURI="weather" >
<service
ejbJar="weather.jar"
serviceURI="/weatheruri"
includeEJBs="statelessSession" >
</service>
</servicegen>
</target>
</project>
For detailed information on the WebLogic Web Service Ant tasks, see Web Service Ant Tasks and Command-Line Utilities.
The following table maps the 6.1 wsgen elements and attributes to their equivalent 8.1 servicegen elements and attributes.
The default URL used by client applications to access a WebLogic Web Service and its WSDL has changed between versions 6.1 and 8.1 of WebLogic Server.
In Version 6.1, the default URL was:
[protocol]://[host]:[port]/[context]/[WSname]/[WSname].wsdl
as described in URLs to Invoke WebLogic Web Services and Get the WSDL.
For example, the URL to invoke a 6.1 Web Service built with the build.xml file shown in Converting a 6.1 build.xml file to 8.1, is:
http://host:port/weather/statelessSession.WeatherHome/statelessSession.WeatherHome.wsdl
[protocol]://[host]:[port]/[contextURI]/[serviceURI]?WSDL
as described in WebLogic Web Services Home Page and WSDL URLs.
For example, the URL to invoke the equivalent 8.1 Web Service after converting the 6.1 build.xml file shown in Converting a 6.1 build.xml file to 8.1 and running wsgen is:
http://host:port/weather/weatheruri?WSDL
|
|
|