How to set minOccurs="1" in wsdl for an input parameter to web service method.
posted 4 years ago
I have a web service implemented with apache cxf and spring. I have one web method which takes String argument as the input parameter. When I check the wsdl for this web method I see that the occurrence indicator minOccurs is set to 0 for the String input parameter. Here I want to set both minOccurs and maxOccurs to 1 to indicate that the input parameter is mandatory and singleton. To do this I used the annotation @Xmlelement and set its property required=true for the string input parameter, but this is not getting reflected in the wsdl. Am I doing something wrong here ? How do I get this right ?