File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set minOccurs="1" in wsdl for an input parameter to web service method.

Kavita Mohite
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ?

Here is the code :

I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic