users@jax-rpc.java.net

Re: ant task wscompile frustration

From: trebor iksrazal <iksrazal_at_yahoo.com>
Date: Wed, 1 Jun 2005 10:29:09 -0700 (PDT)

Thanks for you continuing help. Now I get:

[wscompile] [CustomClassGenerator: generating
JavaClass for: web_Login]
[wscompile] [CustomClassGenerator: generating
JavaClass for: web_LoginResponse]
[wscompile] error : com.sun.tools.javac.Main is not
available in the classpath..
[wscompile] error: compilation failed, errors should
have been reported

Very strange, it seems to be compiling but then says
the compiler can't be found? I'd paste the entire
command but there are about 200 jars in my classpath.

Please note that without the wscompile ant task, my
project compiles fine - I simply invoke the command
via wscompile.sh .

My entire wscompileant task is:

 <taskdef name="wscompile"
classname="com.sun.xml.rpc.tools.ant.Wscompile">
       <classpath refid="classpath-jboss"/>
  </taskdef>

 <target name="ws" description="Generate compiled
complex interfaces and classes from wsdl">
       <wscompile
             fork="true"
             import="true"
            
mapping="resources/CallCentreWeb_Mapping.xml"
             verbose="true"
             debug="true"
             config="resources/config-wsdl.xml">
             <classpath refid="classpath-jboss"/>
       </wscompile>
  </target>


Thanks a bunch,
iksrazal

--- Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
wrote:

> Do you have classpath defined in your wscompile ant
> target ?
>
> For e.g:
>
> <wscompile
> fork="true"
> import="true"
> verbose="true"
> mapping="mapping.xml"
> config=>
> <classpath refid="compile.classpath"/>
> </wscompile>
>
> It will also print the entire java command. So you
> can figure out
> whether jaxrpc jars are there in the classpath.
>
> JItu
>
> trebor iksrazal wrote:
>
> >Thanks for your prompt reply. I tried that
> originally,
> >and got:
> >
> >ws:
> >[wscompile] command line: wscompile
> >/usr/lib/jvm/java-1.4.2-sun-1.4.2.06/jre/bin/java
> >com.sun.xml.rpc.tools.wscompile.Main -g -import
> >-mapping
>
>/home/iksrazal/watchdog/resources/CallCentreWeb_Mapping.xml
> >-verbose
> >/home/iksrazal/watchdog/resources/config-wsdl.xml
> >[wscompile] Exception in thread "main"
> >java.lang.NoClassDefFoundError:
> >com/sun/xml/rpc/tools/wscompile/Main
> >
> >BUILD FAILED
> >/home/iksrazal/watchdog/build.xml:79: wscompile
> failed
> >
> >My classpath is:
> >
> > <path id="classpath-jboss">
> > <fileset dir="${jboss.home}/lib">
> > <include name="*.jar"/>
> > </fileset>
> > <fileset dir="lib">
> > <include name="*.jar"/>
> > </fileset>
> > <fileset
> dir="${jwsdp.home}/xws-security/lib">
> > <include name="**/*.jar"/>
> > </fileset>
> > <fileset dir="${jwsdp.home}/jaxrpc/lib">
> > <include name="**/*.jar"/>
> > </fileset>
> > <fileset
> dir="${jwsdp.home}/jaxp/lib/endorsed">
> > <include name="**/*.jar"/>
> > </fileset>
> > </path>
> >
> >I even did a "find . -name "*.jar" -exec cp" from
> the
> >jwsdp dir and put all the jars in my lib. Still no
> >worky.
> >
> >Please help,
> >iksrazal
> >
> >--- Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
> >wrote:
> >
> >
> >
> >>Please add fork="true" while using mapping option.
> >>This will avoid some classloader issues in jaxrpc
> >>1.1 ant tasks . This has been fixed in jaxws 2.0
> ant
> >>tasks.
> >>
> >> <wscompile
> >> fork="true"
> >> import="true"
> >>
> >>If you have further questions, let us know.
> >>
> >>Thanks,
> >>JItu
> >>
> >>
> >>
> >>trebor iksrazal wrote:
> >>
> >>
> >>
> >>>My intro got trimmed, should have been:
> >>>
> >>>Hi all,
> >>>
> >>>I know ant and web services well, and I have been
> >>>using a bash alias to call wscompile.sh . I
> decided
> >>>
> >>>
> >>to
> >>
> >>
> >>>try to call wscompile via ant, and I get:
> >>>
> >>>home/iksrazal/watchdog> ant ws
> >>>Buildfile: build.xml
> >>>
> >>>ws:
> >>>wscompile] command line: wscompile -g -import
> >>>
> >>>
> >>-mapping
> >>
>
>>/home/iksrazal/watchdog/resources/CallCentreWeb_Mapping.xml
> >>
> >>
> >>>-verbose
> >>>/home/iksrazal/watchdog/resources/config-wsdl.xml
> >>>[wscompile] error: -mapping is an invalid option
> or
> >>>argument
> >>>
> >>>[wscompile] Usage: wscompile [options]
> >>>configuration_file
> >>>
> >>>[wscompile] Use "wscompile -help" for a detailed
> >>>description of options.
> >>>
> >>>
> >>>BUILD FAILED
> >>>
> >>>In the shell my alias that works fine is:
> >>>
> >>>wscompile.sh -import -mapping
> >>>resources/CallCentreWeb_Mapping.xml
> >>>resources/config-wsdl.xml
> >>>
> >>>My ant tasks are:
> >>>
> >>><taskdef name="wscompile"
> >>>classname="com.sun.xml.rpc.tools.ant.Wscompile">
> >>> <classpath refid="classpath-jboss"/>
> >>></taskdef>
> >>><target name="ws" description="Generate compiled
> >>>complex interfaces and classes from wsdl">
> >>> <wscompile
> >>> import="true"
> >>>
> >>>mapping="resources/CallCentreWeb_Mapping.xml"
> >>> verbose="true"
> >>> debug="true"
> >>> config="resources/config-wsdl.xml">
> >>> </wscompile>
> >>> </target>
> >>>
> >>>The documentation I have been using:
> >>>
> >>>
> >>>
>
>>https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html#2.1
> >>
> >>
> >>>Any ideas?
> >>>iksrazal
> >>>
> >>>
> >>>
> >>>
> >>>--- trebor iksrazal <iksrazal_at_yahoo.com> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>>/home/iksrazal/watchdog> ant ws
> >>>>Buildfile: build.xml
> >>>>
> >>>>ws:
> >>>>wscompile] command line: wscompile -g -import
> >>>>-mapping
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
>
>>/home/iksrazal/watchdog/resources/CallCentreWeb_Mapping.xml
> >>
> >>
> >>>
> >>>
> >>>
> >>>
> >>>>-verbose
>
>>>>/home/iksrazal/watchdog/resources/config-wsdl.xml
>
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com