The @XmlElement(required = true) on the field should definitely do it. Are you sure the new version wasn't being picked up? Is there a full stack trace for that?
Dan On Thursday, January 12, 2012 7:11:04 AM krn1...@gmail.com wrote: > I am using Apache CXF for developing Web services . This is some part of > WSDL generated by the Apache CXF Soap Engine > > *<xs:complexContent> > <xs:extension base="tns:serviceRequest"> > <xs:sequence> > <xs:element minOccurs="0" name="xmlMessage" type="xs:string"/> > <xs:element minOccurs="0" name="orderInputForm" type="tns:orderForm"/> > </xs:sequence> > </xs:extension> > </xs:complexContent>* > Please let me know how can i make sure that a particular field is > mantadatory ?? > > When i tried using // @XmlElement(required = true) private String > xmlMessage ; > > As the WSDL is generated by Apache CXF Engine , i dont have any control on > WSDL file . So i need to make changes inside the java code itself , so that > on to the WSDL it displays that a particular field is mantadatory > > > By this the Application did not started , It had Errors on Server console > SEVERE: Error listenerStart Jan 12, 2012 8:34:03 PM > org.apache.catalina.core.StandardContext start SEVERE: Context [/tata-ws] > startup failed due to previous errors > > > Please tell me how can i make a Field Mantadatory ?? > > Thanks > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/How-can-i-make-a-Field-Mantadatory-in-WSDL- > through-Java-Code-tp5140164p5140164.html Sent from the cxf-user mailing list > archive at Nabble.com. -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com