users@jax-ws.java.net

Re: FW: [jax-ws] wsimport wsgen

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Mon, 05 Feb 2007 11:51:10 -0800

See my replies in lined...

Baker, Brad (Contr) wrote:
>
> ------------------------------------------------------------------------
>
> *From:* Baker, Brad (Contr)
> *Sent:* Wednesday, January 31, 2007 1:18 PM
> *To:* users_at_jax-ws.dev.java.net
> *Subject:* [jax-ws] wsimport wsgen
>
> Hi all I am have issues with wsimport and wsgen working together.
>
> I have a WSDL and I use wsimport to create the client code.
>
This would generate an SEI with @WebSservice annotation.
>
> I then use this code (the request and respomce objects) to make the sei.
>
> When I run wsgen on my sei I get this:
>
So you are trying to make one of the generated java bean into web
service? If you could give the wsgen command and also the WSDL file and
the steps needed to reproduce it, it will help.
>
> wsgen:
>
> [wsgen] error: Two classes have the same XML type name
> "{com.ngms.hdws}sendReportResponse".
>
> Use @XmlType.name and @XmlType.namespace to assign different names to
> them.
>
> [wsgen] this problem is related to the following location:
>
> [wsgen] at com.ngms.chims.dcgs.ws.SendReportResponse (Unknown Source)
>
> [wsgen] error: compilation failed, errors should have been reported
>
> [wsgen] at
> com.ngms.chims.dcgs.ws.jaxws.SendReportResponse._return(SendReportResponse.java:16)
>
> [wsgen] at
> com.ngms.chims.dcgs.ws.jaxws.SendReportResponse(SendReportResponse.java:13)
>
> [wsgen] this problem is related to the following location:
>
> [wsgen] at
> com.ngms.chims.dcgs.ws.jaxws.SendReportResponse(SendReportResponse.java:13)
>
> [wsgen] 1 error
>
> IF I don’t run wsgen and just try to deploy under Sun 9 I get a very
> similar error in the sun log.
>
Its not clear if you are trying to deploy the wsimport generated SEI and
your implementation class into the AS 9.1 or you are taking some
generated bean and deploy that.
>
> What is the proper way to make a Web Service when you are starting
> from a WSDL?
>
Follow the directions here:
https://jax-ws.dev.java.net/nonav/2.1/docs/UsersGuide.html#3.1.2_Starting_from_a_WSDL_File.

-vivek.
>
> Cheers,
>
> Brad
>
> PS. I have used wsgen successfully when I needed a WSDL from a sei.
>