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

--------------------------------------------------------------
Hi!

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?
/Mats
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/561764#561764]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to