By independent I mean "Isolating the libraries and committing them to
your repo/maven proxy so that rest of team does not require an install
of RAD." Tho obviously someone will have to have an install to get the
lib's and license file initially.
RAD does supply with a batch
file(%RAD_HOME%/runtimes/base_v6/bin/WSDL2Java.bat) to generate
webservices code from your WSDL however, the implication is that you
must have an install of RAD on your machine. Not a desirable option for
some of us.
The batch file essentially make a call to a java command but its a
little convoluted. They use WSLauncher as the actual class they execute
and pass in the classname to the com.ibm.ws.webservices.tools.WSDL2Java
which will generate the java code.
If you are using ant you can use something like this:
<path id="cp.was.ws">
<path location="${lib.was.ws.dir}"/>
<fileset dir="${lib.was.ws.dir}">
<include name="bootstrap.jar" />
<include name="classloader.jar" />
<include name="commons-discovery.jar" />
<include name="deployutils.jar" />
<include name="emf.jar" />
<include name="j2ee.jar"/>
<include name="lmproxy.jar"/>
<include name="ras.jar" />
<include name="urlprotocols.jar"/>
<include name="wccm_base.jar" />
<include name="webservices.jar" />
<include name="wsdl4j.jar" />
<include name="wsexception.jar" />
<include name="xml.jar" />
</fileset>
<fileset dir="${lib.dir}">
<include name="commons-logging-1.1.jar" />
</fileset>
</path>
<java fork="true"
classname="com.ibm.ws.bootstrap.WSLauncher">
<classpath refid="cp.was.ws" />
<jvmarg
value="-Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager"
/>
<jvmarg value="-Djava.util.logging.configureByServer=true" />
<arg value="com.ibm.ws.webservices.tools.WSDL2Java" />
<arg value="-container" />
<arg value="ejb" />
<arg value="-deployScope" />
<arg value="Application" />
<arg value="-f" />
<arg value="C:/ns.properties" />
<arg value="-output" />
<arg value="C:/gen/was" />
<arg value="-role" />
<arg value="client" />
<arg value="-verbose" />
<arg value="file:///C:/backend.wsdl" />
</java>
Run the existing batch file for the available parameters.
So now the real question...where are all the libs to make it
independent!?
well here:
%RAD_HOME%\runtimes\base_v6\lib\bootstrap.jar
%RAD_HOME%\runtimes\base_v6\lib\classloader.jar
%RAD_HOME%\runtimes\base_v6\lib\commons-discovery.jar
%RAD_HOME%\runtimes\base_v6\lib\deployutils.jar
%RAD_HOME%\runtimes\base_v6\lib\emf.jar
%RAD_HOME%\runtimes\base_v6\lib\j2ee.jar
%RAD_HOME%\runtimes\base_v6\lib\lmproxy.jar
%RAD_HOME%\runtimes\base_v6\lib\ras.jar
%RAD_HOME%\runtimes\base_v6\lib\urlprotocols.jar
%RAD_HOME%\runtimes\base_v6\lib\wccm_base.jar
%RAD_HOME%\runtimes\base_v6\lib\webservices.jar
%RAD_HOME%\runtimes\base_v6\lib\wsdl4j.jar
%RAD_HOME%\runtimes\base_v6\lib\wsexception.jar
%RAD_HOME%\runtimes\base_v6\java\jre\lib\xml.jar
%RAD_HOME%\runtimes\base_v6\properties\was.license(Note the path
cp.was.ws it includes the directory that has this file in it)
This path list was formed after I had it running, so if there is a
ClassDefNotFound it is possible that I have located the wrong jar(but
the file sizes match what I have in my lib directory.)
Note, currently there is a slight problem with running the code from
outside of WAS. I am currently recieving the following exception:
"NoClassDefFoundError: Invalid Implementation Key" occurs when running
an unmanaged client.
Basicly the java.ext.dirs system property is pointing to the default
jdk ext directories instead of the WAS ones. The recommendation is to
override the system property and point it to WAS java ext dir. All well
and good if you have an install on your machine, otherwise runtime may
be possible. If I find some other work around I'll post it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG
Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---