I tried a related experiment. I modified a wsdl to have some of these
attributes on a parameter, and then ran wsdl2java. As far as I can see,
no @XmlElement specs results. Is wsdl2java supposed to produce java that
has exactly the same contract?

> -----Original Message-----
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 10, 2007 10:50 PM
> To: [email protected]
> Cc: Benson Margulies
> Subject: Re: minOccurs/nillable on a parameter
> 
> On Wednesday 10 October 2007, Benson Margulies wrote:
> > Is it my imagination, or does JAXB lack an @-nnotation to specify
> > nullable or minOccurs for a parameter?
> 
> Well, yes and no...
> 
> JAXB has the ability to specify that stuff with attributes on the
> XmlElement annotation.   JAX-WS allows you to define a "wrapper" type
> that the runtime uses to for IO.   Thus, you can create the wrapper
type
> with the annotations that you want and then use the @RequestWrapper
and
> @ResponseWrapper annotations to point the JAX-WS runtime at it.
> 
> Yes, it does kind of suck.
> 
> 
> > Aegis has a mechanism, but I can't seem to get it to work, so I went
> > shopping for snails and I can't find a candidate.
> >
> >
> >
> > @WebParam doesn't handle it, and none of the Xml... annotations are
> > allowed on parameters.
> 
> With JAX-WS 2.1, SOME of the Xml.. annotations are allowed.
XmlElement
> is not one of them though.
> 
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog

Reply via email to