Java Reference
In-Depth Information
A jws subelement of the jwsc element specifies a JWS file. The only required
attribute of the jws element is file, which specifies the JWS file. By default jwsc
generates a JAX-RPC 1.1 Web Service. To generate a JAX-WS 2.0 Web Service, specify
the type attribute of the jws element as type="JAXWS" . Subsequent to generating
the web service artifacts, jwsc compiles the JWS and Java files and packages the
generated artifacts and classes into a web application WAR file. Jwsc also creates an
enterprise application directory structure. Jwsc generates a WAR file corresponding
to each jws elements. JWS files may be grouped by adding the jws elements to
a module element, which is a direct subelement of the jwsc element. If a module
element is specified, only one WAR file is generated.
WebLogic server provides the clientgen task for compiling a Web Service Client
class. We shall be compiling the EJB3WSClient class with the clientgen class. The
clientgen task uses the weblogic.wsee.tools.anttasks.ClientGenTask class for
which we need to add a taskdef to the build.xml :
<taskdef name="clientgen"
classname="weblogic.wsee.tools.anttasks.ClientGenTask">
<classpath>
<path refid="project.classpath"/>
</classpath>
</taskdef>
The clientgen task generates the following artifacts:
• The client-side copy of the WSDL ile.
• The Java source code for the Stub and Service interface implementations for
the web service.
• Java classes for any user-deined XML Schema data types deined in the
WSDL file.
JAX-RPC deployment descriptor that describes the mapping between the Java
data types and the corresponding XML Schema types in the WSDL file.
The only required attribute of the clientgen task ( http://download.oracle.com/
docs/cd/E12840_01/wls/docs103/webserv_ref/anttasks.html#wp1039270 ) is
one of destDir or destFile and wsdl . The build.xml file is listed as follows:
<?xml version="1.0" encoding="windows-1252" ?>
<project name="ejb3-webservices" basedir="." default="deploy">
<property name="src.dir" value="${basedir}" />
<property name="deploy.dir"
value="C:/Oracle/WLS11g/user_projects/domains/base_domain/
autodeploy" />
<property name="build.dir" value="${basedir}/build" />
 
Search WWH ::




Custom Search