users@jax-rpc.java.net

Re: Issues with "wsimport" and classpath

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Wed, 15 Jun 2005 09:26:59 -0700

Looks like there is some bug there. Can you try running your wsimport
ant target with fork=true? I think it should fix your problem.


You really dont have to set AS_HOME unless you are deplying the endpoint
to Sun 1 App server or trying to import WSDL from the endpoint deployed
on Sun 1 App server.

-vivek.

Charlie Collins wrote:

>Thanks Vivek, help is greatly appreciated.
>
>I will double check that I am using the latest workspace, but I
>believe I am (I will get revs).
>
>As for the classpath element, yes I am aware its a child element and
>using it as such. I am also aware the error is expected because
>indeed it is not an attribute. The ant target seems to *treat it as an
>attribute*, the same way it does for wsgen (when set to verbose each
>of wsimport and wsgen shows the "command line" version of what they
>are doing and they both indeed try to set -classpath *as an attribute*
>when the classpath ant element is used, this of course works for wsgen
>because that is a valid attribute, but it does not work for wsimport).
> I am using and looking at the same samples/etc/common-targets.
>
>I do have JAXWS_HOME set for purposes of the examples (but not in my
>own build). I do not have AS_HOME set.
>
>
>
>It was my intention to try to build a standalone server and subsequent
>war, a deploy on another app server (for example Tomcat). The server
>portion seems to work fine in this manner. Do I need AS_HOME to
>generate the *client*? At present I do not have the Sun App Server
>installed. If need be I can fall back to that but it seems like
>things should, at least theoretically, work without any particular app
>server (once I have the jaxws-rt and jaxws-tools and other related
>libraries in place).
>
>Thanks again for the help!
>
>
>
>On 6/14/05, Vivek Pandey <Vivek.Pandey_at_sun.com> wrote:
>
>
>>Hi Charlie,
>>
>>My comments inlined below:
>>
>>Charlie Collins wrote:
>>
>>
>>
>>>I am trying to setup an example (and then possibly contribute more
>>>code and documentation if help is needed, once I get up to speed)
>>>using the latest docs per CVS HEAD.
>>>
>>>I am using information directly from jaxws-ri/docs/wsimport.html. I
>>>am using my own simplified (attempting to) ant build file and looking
>>>at "common-targets.xml" from the samples/fromjava example.
>>>
>>>In both cases I get "[wsimport] error: -classpath is an invalid option
>>>or argument". And if I try without classpath of course I get many
>>>classpath related issues.
>>>
>>>
>>>
>>>
>>>
>>Are you trying the latest workspace and looking at latest wsimport.html?
>>wsimport doesnt have -classpath option so the error you're getting is
>>expected. Here is the generate-client target from
>>$JAXWS_HOME/samples/etc/common-targets:
>>
>><target name="generate-client">
>> <wsimport
>> fork="true"
>> debug="${debug}"
>> verbose="${verbose}"
>> keep="${keep}"
>> base="${build.classes.home}"
>> httpProxy="webcache.sfbay.sun.com:8080"
>> wsdlFile="${client.wsdl}">
>> <classpath>
>> <path refid="jaxws.classpath"/>
>> <pathelement location="${build.classes.home}"/>
>> </classpath>
>> <binding dir="${basedir}/etc" includes="${client.binding}"/>
>> </wsimport>
>></target>
>>
>>As you can see there is no classpath attribute on wsimport target. But
>>you can pass your own classpath using the ant's <classpath> element as
>>described above.
>>
>>
>>
>>>Straight up from the samples/fromjava
>>>
>>>"ant server" - works fine
>>>"ant client" - "[wsimport] error: -classpath is an invalid option or argument"
>>>
>>>
>>>
>>>
>>>
>>I dont see the above error with 'ant client'. Perhaps I am using the
>>latest wsapce. Can you try refreshing your wspace and run it again? One
>>more thing, you need to have JAXWS_HOME and AS_HOME set correctly.
>>
>>-vivek.
>>
>>
>>
>>>I get the exact same results in my own build process which was written
>>>using the "tools" docs, similar to but not exactly the same as, the
>>>samples.
>>>
>>>I apologize for pestering anyone about stuff thats not even released
>>>yet, just wanted to inquire as to whether or not I might still be
>>>missing something?
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>>>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>>>
>>>
>>>
>>>
>>>
>>--
>>Vivek Pandey
>>Web Services Standards and Technologies
>>Sun Microsystems Inc.
>>
>>
>>
>>
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
>

-- 
Vivek Pandey
Web Services Standards and Technologies
Sun Microsystems Inc.