You’d likely need to work with the jaxb-facets folks to figure this out. Their stuff involves doing a lot of “highly discouraged” things that are a bit complicated. Adding stuff into the java.xml.* namespaces is certainly problematic. Using their hacked JAXB runtime is a bit less so, but still can have issues in certain containers.
Dan > On Dec 21, 2014, at 6:15 AM, flying_machine1 <[email protected]> wrote: > > I am trying to add restriction to wsdl using @Facet annotation in Employee > class but in generated wsdl restriction is not getting created.I am > following this > <http://www.infosys.tuwien.ac.at/staff/hummer/tools/jaxb-facets.html> > article but still it's not working.Below is the code. > 1)Employee.java > > import javax.xml.bind.annotation.Facets; > > public class Employee { > > @Facets(minInclusive="1",maxInclusive="10") > int id; > @Facets(pattern="[a-z][a-z0-9]{0,4}") > String name; > EmployeeRole role; > > //getter and setter > } > > 2)type defination in mployeeservice.wsdl > > <xs:complexType name="employee"> > <xs:sequence> > <xs:element name="id" type="xs:int"/> > <xs:element minOccurs="0" name="name" type="xs:string"/> > <xs:element minOccurs="0" name="role" type="tns:employeeRole"/> > </xs:sequence> > </xs:complexType> > > Above wsdl does not contain <xs:restriction> for employee. > > Please help me in this. > > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Unable-to-add-restriction-to-bean-in-apache-cxf-soap-service-tp5752609.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
