Hmm... definitely looks like a bug, but that would be a bug in JAXB, not really CXF. Thus, it should probably be logged with them:
https://jaxb.dev.java.net/ Dan On Tue May 5 2009 6:50:38 am Barath wrote: > Java bean class method, > > @XmlElement(name="MyReceiptId", nillable=true, > namespace="http://ReceiptNS.com") > public void setReceiptId(String receiptId) { > this.receiptId = receiptId; > } > > The namespace specified in the above method is different from the java > package of the class enclosing this method. > > CXF generated schema has, > > <xs:element nillable="true" ref="ns2:MyReceiptId" /> > > This violates the 2.2 point of http://www.w3.org/TR/xmlschema-1/#d0e4233 > xsd schema > > Is this a bug with CXF or with my code? > > Note : > 1. Works fine when I removed the namespace from the @XmlElement since no > more 'ref' is needed > without namespace: <xs:element nillable="true" type="xs:string"/> > > 2. Works fine when I removed the nillable from the @XmlElement, since it > is not violating the xsd spec. > > ~Barath -- Daniel Kulp [email protected] http://www.dankulp.com/blog
