users@jaxb.java.net

Re: jaxb and size

From: Henri Gomez <henri.gomez_at_gmail.com>
Date: Tue, 20 Feb 2007 07:28:45 +0100

For example :

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MyRequest", namespace = "http://mycorp.com/soa/v1/")
public class MyRequest {

        @XmlElement(name = "accessType", required = true)
        private String accessType;

With @XmlElement I could set a name and mark accessType as mandatory,
but not the min/max size for the accessType string.

Did there is other annotation I could use for such purpose ?


2007/2/20, Henri Gomez <henri.gomez_at_gmail.com>:
> Yes but in the Java to WSDL way, how could I set the min/max size via
> annontations in the .java ?
>
> Regards
>
> 2007/2/20, Kenny MacLeod <kennym_at_kizoom.com>:
> > This is best done using Schema validation, I'd have thought?
> >
> > Henri Gomez wrote:
> > > Hi to all,
> > >
> > > How could we specify via JAXB limit in strings ?
> > >
> > > For instance, I need to indicate in my wsdl (I'm using JAX WS 2.1)
> > > that some strings shouldn't me more than X chars long.
> > >
> > > I didn't see how I could set this property using annotations and
> > > advice is very welcome.
> > >
> > > Regards and thanks for your help
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >
> >
>