If you went to Simple/Aegis you can set nillable to false. On Mon, Jan 12, 2009 at 7:28 AM, Ronald Pieterse <[email protected]>wrote:
> > I have been thinking about this for some time now as well until I came > across > this issue :-) Is there already a solution like you described in CXF or is > a > wrapper class still necessary at this moment? > > Thnx. > Ronald > > > dkulp wrote: > > > > > > In all honesty, the ONLY way to do this with JAX-WS is to write some > > wrapper classes that specify the required=true flags on the XmlElement > > annotations. For the most part, you can run the java2wsdl/java2ws tool > > with the -wrapperClasses flag to have it generate prototype .java files > > that you can hand edit. > > > > I keep thinking about creating a special @NotNull or @Required annotation > > or something that could be used to extend the jaxws stuff, just haven't > > had any time to do it. :-( > > > > > > Dan > > > > > > > > > > On Thursday 03 April 2008, cmathrusse wrote: > >> I've got my WebService defined as follows: > >> > >> @WebService(targetNamespace = "http://cosmos.it.sybase.com", name = > >> "CosmosBroker") > >> @SOAPBinding(parameterStyle = ParameterStyle.WRAPPED, style = > >> Style.DOCUMENT, use = Use.LITERAL) > >> public interface CosmosBroker { ... > >> > >> And I have a method defined: > >> @WebMethod(operationName = "isCustomerActive", action = "") > >> @WebResult(name = "isCustomerActiveReturn") > >> Boolean isCustomerActive( > >> @WebParam(name = "customerId") > >> String customerId) ; > >> > >> But when the wsdl is generated my complex type looks as follows: > >> <xs:complexType name="isCustomerActive"> > >> <xs:sequence> > >> <xs:element minOccurs="0" name="customerId" type="xs:string"/> > >> </xs:sequence> > >> </xs:complexType> > >> > >> So what do I need to do to make my customerId parameter required? > >> (minOccurs="1") or is there even a way to accomplish this? > >> > >> Thanks for the help... > > > > > > > > -- > > J. Daniel Kulp > > Principal Engineer, IONA > > [email protected] > > http://www.dankulp.com/blog > > > > > > -- > View this message in context: > http://www.nabble.com/How-to-make-paramters-on-WebMethod-required-tp16473972p21413502.html > Sent from the cxf-user mailing list archive at Nabble.com. > >
