User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 427,196 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,175 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums

different minOccurs for different operations?

Join Date: Mar 2008
Posts: 2
Reputation: gr3270 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gr3270 gr3270 is offline Offline
Newbie Poster

Question different minOccurs for different operations?

  #1  
Mar 20th, 2008
Anyone solved this one? - Suppose I have a Person complex type defined in an xsd. And it has an element, eg age, that is declared as minOccurs=0. ie, age is optional for the creation/existence of the complexType.

Now suppose I want to pass that Person as the argument on 5 different SOAP requests (operations) that are defined in a WSDL. And suppose that I want to enforce and declare to the caller that on 3 of those operations age is a required element, and on 2 of them age is not required.

Is there a best way to do this? Should I create new complex types such as Op1Person, Op2Person etc that each have the appropriate setting for minOccurs for that operation? ("Op1Person" would probably only include the Person elements that were required for Operation op1).

So, "Person" is the real domain object, what would be the best way to specify what elements of Person are required for particular operations? And to specify it declaratively so it's known at build time, rather than relying on assertion exceptions being thrown at runtime?

-gr
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 10:29 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC