[jboss-user] [JBoss Web Services] - Problems with missing minOccurs=" 1" in generated wsdl

Mats Ekström do-not-reply at jboss.com
Wed Sep 15 06:05:16 EDT 2010

Mats Ekström [http://community.jboss.org/people/fghj5678] created the discussion

"Problems with missing minOccurs="1" in generated wsdl"

To view the discussion, visit: http://community.jboss.org/message/561764#561764


We are using jboss soa platform 4.3.0 CP02 and when I annotate like this:
@XmlElement(nillable=false, required=true)
    public void setProducer(String producer) {
public void setProducer(String producer) {
  this.producer = producer;
        this.producer = producer;

    }In the generated wsdl (from the deploy), the element producer will look like this:
<xs:element name="producer" type="xs:string"/>

Where is the minOccurs="1"???

If I instead annotate at declaration of producer I get an exception:

    @XmlElement(nillable=false, required=true)    
    private String producer;

java.lang.IllegalStateException: Cannot build JAXB context
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "producer"
this problem is related to the following location:
  at public java.lang.String se.tullverket.texi.archive.bl.Trans.getProducer()
  at se.tullverket.texi.archive.bl.Trans
  at public se.tullverket.texi.archive.bl.Trans se.tullverket.texi.archive.bl.ArchiveTO.getTrans()
  at se.tullverket.texi.archive.bl.ArchiveTO
  at private se.tullverket.texi.archive.bl.ArchiveTO se.tullverket.texi.archive.bl.jaxws.Archive.arg0
  at se.tullverket.texi.archive.bl.jaxws.Archive
this problem is related to the following location:
  at private java.lang.String se.tullverket.texi.archive.bl.Trans.producer

And if I skip the annotation it looks like this:
<xs:element minOccurs="0" name="producer" type="xs:string"/>

Any ideas?

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100915/3a776c3c/attachment.html 

More information about the jboss-user mailing list