* mobile e-mail format *

----- Reply message -----
Von: "Daniel Kulp" <[email protected]>
An: <[email protected]>
Cc: "Mika Tapanainen" <[email protected]>
Betreff: Is it possible to generate the Java files without the annotations with 
the wsdl2java program?
Datum: Mi., Mär. 14, 2012 16:44


On Tuesday, March 13, 2012 11:44:55 PM Mika Tapanainen wrote:
> Hello,
> 
> Is it possible to generate the Java files without the annotations with the
> wsdl2java program? 

Not at this point, no.  wsdl2java currently generates JAX-WS compliant code 
and it would no longer be compliant without the annotations.   It does 
support plugable frontends so you can write a new frontend that does custom 
stuff, just not sure how much value there is in it.

> So I don't want that wsdl2java for example generates
> the annotation:
> 
> @javax.jws.WebService(
>                       serviceName = "x",
>                       portName = "x",
>                       targetNamespace = "x",
>                       wsdlLocation = "x",
>                       endpointInterface = "x")
> 
> Actually I tried to remove this annotation from the service implementation
> class and everything worked. It seems that the endpoint configuration in
> the beans.xml contains all the necessary configuration.

As long as you do fill in everything in the beans.xml, yes.   But you have 
to make sure it exactly matches the information/names in the wsdl.  The nice 
thing about the generated annotation is that you know it matches.

Another note is that while CXF does not need the WebService annotation, 
other JAX-WS implementations do require it.  Depending on how portable you 
want the code, it may be advisable to keep it.

Dan 


> In my project the build script runs the wsdl2java command and after that
> the developers from other teams complete the service implementation
> class. I think the annotations could be a little bit confusing, because
> in our case they are not needed.
> 
> BR,
> 
> Mika
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Is-it-possible-to-generate-the-Java-files
> -without-the-annotations-with-the-wsdl2java-program-tp5563652p5563652.html
> Sent from the cxf-user mailing list archive at Nabble.com.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to