users@jax-rpc.java.net

missing .jars?

From: Isabelle Gheysens <i.gheysens_at_ENERGYICT.COM>
Date: Thu, 02 May 2002 17:04:46 +0200

Hello,

I suppose the .jars needed to compile client code are the following:

jwsdp-jars=${clib}/jaxrpc-ri.jar:${clib}/jaxrpc-api.jar:${clib}/activation.j
ar:${clib}/dom4j.jar:${clib}/jaxm-api.jar:${clib}/jaxm-client.jar:${clib}/lo
g4j.jar:${clib}/mail.jar:${clib}/xalan.jar:${clib}/xerces.jar:${clib}/jaxp-a
pi.jar

But when I look in "jwsdp/common/lib" not all of these files can be found
there... such as "log4j.jar, xalan.jar and xerxes.jar

I cannot compile my client code... can it be that those missing files are
the problem?

Everything seems to work except for "compile-client"
I get the following Exception:

compile-client:
     [javac] Compiling 1 source file to C:\development soap\classes\client
     [javac] C:\development
soap\src\com\energyict\eiserver\gui\HelloClient.java:
7: cannot access com.sun.xml.rpc.client.ServiceImpl
     [javac] file com\sun\xml\rpc\client\ServiceImpl.class not found
     [javac] (new HelloWorld_Impl().getHelloIF());
     [javac] ^
     [javac] C:\development
soap\src\com\energyict\eiserver\gui\HelloClient.java:
9: cannot resolve symbol
     [javac] symbol : class Stub
     [javac] location: package rpc
     [javac] javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,

     [javac] ^
     [javac] C:\development
soap\src\com\energyict\eiserver\gui\HelloClient.java:
8: cannot access com.sun.xml.rpc.client.StubBase
     [javac] file com\sun\xml\rpc\client\StubBase.class not found
     [javac] stub._setProperty(
     [javac] ^
     [javac] 3 errors

BUILD FAILED


This is my build file:

<project name="eiweb" default="compile-server" basedir="c:\development soap">

<target name="init">
   <property name="Build" value="build" />
   <property name="Src" value="src" />
   <property name="Dest" value="classes" />
   <property name="Deploy" value="deploy" />
</target>

<target name="prepare" depends="init">
      <mkdir dir="${Dest}/client" />
      <mkdir dir="${Dest}/server" />
      <mkdir dir="${Dest}/shared" />
      <mkdir dir="dist" />
</target>


<target name="cbo" depends="prepare">
   <javac srcdir="${Src}" destdir="${Dest}/shared"
includes="com/energyict/cbo/**">
     <classpath>
       <pathelement location="c:\j2sdk1.4.0\jre\lib\rt.jar"/>
       <pathelement location="${Dest}"/>
     </classpath>
   </javac>
</target>

<target name="compile-server" depends="cbo">
   <javac srcdir="${Src}" destdir="${Dest}/shared"
includes="com/energyict/eiserver/**"
excludes="com/energyict/eiserver/gui/*Client.java">
     <classpath>
       <pathelement location="c:\j2sdk1.4.0\jre\lib\rt.jar"/>
       <pathelement location="${Dest}/shared"/>
     </classpath>
   </javac>
</target>

<target name="xrpcc-server" depends="compile-server">
       <exec executable="c:\jwsdp\bin\xrpcc.bat">
          <arg line="-classpath ${Dest}/shared" />
          <arg line="-server" />
          <arg line="-d ${Dest}/server" />
          <arg line="${Build}/config.xml" />
       </exec>
   </target>

<target name="xrpcc-client" depends="compile-server">
       <exec executable="c:\jwsdp\bin\xrpcc.bat">
          <arg line="-classpath ${Dest}/shared" />
          <arg line="-client" />
          <arg line="-d ${Dest}/client" />
          <arg line="${Build}/config.xml" />
       </exec>
</target>

<target name="compile-client" depends="xrpcc-client">
       <javac srcdir="${Src}" destdir="${Dest}/client"
includes="com/energyict/eiserver/gui/*Client.java"/>
         <classpath>
         <pathelement location="c:\j2sdk1.4.0\jre\lib\rt.jar"/>
         <pathelement location="c:\jwsdp\bin\common\lib\jaxrpc-ri.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\jaxrpc-api.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\activation.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\dom4j.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\jaxm-api.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\jaxm-client.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\log4j.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\mail.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\xalan.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\xerces.jar"/>
           <pathelement location="c:\jwsdp\bin\common\lib\jaxp-api.jar"/>
         <pathelement location="c:\jwsdp\bin\common\endorsed\xalan.jar"/>
         <pathelement location="c:\jwsdp\bin\common\endorsed\dom.jar"/>
         <pathelement location="${Dest}/shared"/>
         <pathelement location="${Dest}/client"/>
       </classpath>
</target>

<target name="jar-client" depends="compile-client">
       <delete file="dist/soapclient.jar" />
       <jar jarfile="dist/soapclient.jar" >
         <fileset dir="${Dest}/client" />
         <fileset dir="${Dest}/shared" />
       </jar>
   </target>

<target name="package" depends="setup-web-inf">
       <delete file="dist/soap.war" />
       <jar jarfile="dist/soap.war" >
         <fileset dir="build" includes="WEB-INF/**" />
       </jar>
   </target>

   <target name="setup-web-inf">
      <delete dir="build/WEB-INF" />
      <mkdir dir="build/WEB-INF/classes" />
      <copy todir="build/WEB-INF/classes">
          <fileset dir="classes/shared" />
          <fileset dir="classes/server" />
      </copy>
      <copy file="build/web.xml" todir="build/WEB-INF"/>
      <copy file="classes/server/HelloWorld_Config.properties"
todir="build/WEB-INF" />
      <delete file="build/WEB-INF/classes/HelloWorld_Config.properties" />
      <delete file="build/WEB-INF/classes/HelloWorldService.wsdl" />
   </target>


</project>