users@jax-ws.java.net

Re: Contract First approach in JAX-WS 2.0

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Mon, 16 Oct 2006 10:53:33 -0700

> I used JAX-WS 2.1 RI for Contract-First approach and it worked
> beautifully. This being non portable makes it less attractive. BTW, can
> I use this in production environment? If so, how much/what changes
> should I have to do to make it portable later?
>

JAXWS2.1 will be available as part of GlassFish-V2 from build 24 onwards.

> I understand that portable JAX-WS can be developed/deployed in
> Glassfish. But it seems to be in favour of Code-First approach.
>

That is not true - GlassFish treats both the same way.

> Probably a foolish attempt:
> The same war created from JAX-WS RI is deployed in Glassfish after
> removing sun-jaxw.xml and web.xml (don't know this is a proper way, just
> an attempt). The server is not recognising the included wsdl, instead it
> is looking for one with the name MyClassImplService.wsdl (MyClassImpl
> being the endpoint implementation) !!!. I.e. as if the deployed war for code-first approach!!!
>

This is because your service does not conform to JSR109 standard. Of
course, a JAXWS2.1-RI based service (with the sun-jaxws.xml) will work
as is on GF -but as far as GF is concerned, this is just a web app and
this service is not portable across JavaEE platforms. So you should
either use the same WAR that worked in stand alone JAXWS2.1RI or develop
a proper 109-based service.

> What could've went wrong?
>
> Also I don't find any example/article about using contract-first
> approach in glassfish. I have a feeling that contract-first (top down)
> is not recommended in EE5 (or at least in Glassfish).
>

That is not true - GF does not differentiate between the two

Vijay