different minOccurs for different operations?

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

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

different minOccurs for different operations?

 
0
  #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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the XML, XSLT and XPATH Forum


Views: 945 | Replies: 0
Thread Tools Search this Thread



Tag cloud for XML, XSLT and XPATH
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC