You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mj1932 <mj...@hotmail.com> on 2008/10/06 15:08:57 UTC
jax-ws @WebParam "Required" annotation?
Im kinda a newb to using jax-ws annotations. I have created a WebService
using jax-ws annotations that I'm exposing using CXF. I have explicitly
marked it as DOC, LITERAL and all my java clients & SOAP-UI can use it fine.
Unfortunately a FLEX client is having issues and I think it maybe because
the @WebParam shows up as "optional". Is there an annotation to make a
@WebParam required? I've looked around at Sun, IBM, and CXF sites regarding
annotations and haven't found anything defined for that via any of the
JAX-WS related JSRs. Any advice to configure these as required would be
appreciated. Also if anyone can recommend any other resources to solicit
about this, it would be appreciated. Thanks.
--
View this message in context: http://www.nabble.com/jax-ws-%40WebParam-%22Required%22-annotation--tp19837631p19837631.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: jax-ws @WebParam "Required" annotation?
Posted by Daniel Kulp <dk...@apache.org>.
By "optional", I assume you mean the minOccurs="0" we put in the wsdl.
Correct?
If so, this is technically a spec compliant thing. Any non-primitives
are optional. Only primitives are required.
With 2.1.2 and earlier, the ONLY way to control this would be to run a
java2ws -wsdl or similar to get the wsdl/schema and then modify the wsdl
and convert your config to have it use the modified wsdl.
With 2.1.3, you will be able to write a ServiceConfiguration object that
can override the getWrapperPartMinOccurs method to return 1 instead of
0. You can try the 2.1.3 snapshots if you want to play with that.
Dan
On Monday 06 October 2008, mj1932 wrote:
> Im kinda a newb to using jax-ws annotations. I have created a
> WebService using jax-ws annotations that I'm exposing using CXF. I
> have explicitly marked it as DOC, LITERAL and all my java clients &
> SOAP-UI can use it fine. Unfortunately a FLEX client is having issues
> and I think it maybe because the @WebParam shows up as "optional". Is
> there an annotation to make a @WebParam required? I've looked around
> at Sun, IBM, and CXF sites regarding annotations and haven't found
> anything defined for that via any of the JAX-WS related JSRs. Any
> advice to configure these as required would be appreciated. Also if
> anyone can recommend any other resources to solicit about this, it
> would be appreciated. Thanks.
--
J. Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog