minOccurs in WSDL set to 0 for a string which is required

Last post 07-04-2009 9:22 AM by johnwsaunders3. 2 replies.

Sort Posts:

  • minOccurs in WSDL set to 0 for a string which is required

    07-02-2009, 10:05 AM
    • Member
      1 point Member
    • wwwnet
    • Member since 07-01-2008, 7:00 PM
    • Posts 14

     I have a webmethod which has string parameters passed to it. These are required parameters. But in the WSDL minOccurs is set to 0. Is there any way to change the default behaviour?

  • Re: minOccurs in WSDL set to 0 for a string which is required

    07-02-2009, 6:09 PM
    Answer
    • Participant
      1,465 point Participant
    • yaronn01
    • Member since 11-24-2006, 3:48 PM
    • Jerusalem
    • Posts 220

    Class types are always either optional or nullable.

    Read here:

    http://webservices20.blogspot.com/2008/11/web-services-xml-nullable-and-optional.html

    http://webservices20.blogspot.com/
    Web Services Performance, Interoperability And Testing Blog
  • Re: minOccurs in WSDL set to 0 for a string which is required

    07-04-2009, 9:22 AM
    Answer

    As Yaron said, the answer is no.

    However, don't feel bad: it wouldn't matter, even if you could change it. .NET doesn't validate incoming XML against the schema in any case.

    John Saunders
Page 1 of 1 (3 items)