| | |
different minOccurs for different operations?
Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 2
Reputation:
Solved Threads: 0
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
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
![]() |
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: XSLT and DB2 data
- Next Thread: appending a new node to am existing xml file
Views: 945 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for XML, XSLT and XPATH
api blogger blogging code delete development dynamiccreationofnvariablesinxslt error firstthreecharacterofastringrequired flipbook gdata google html include java link linspire linux microsoft news node openoffice overwrite precedence programming rss standards swf template transform variable w3c web xml xmlnotloading xmlonserver xsl xslt





