I ran into the same issue but my solution to simply provide a initial value to the properties in initialize(). When the client calls getResourcePropertyDocument, I believe Muse will call get() for each of the properties so I get it from the actual datasource (a file in my case). I believe Andrew is also working on a JIRA item that will automatically initialize the variables generated by codegen so that you shouldn't see this error.
Balan Subramanian Autonomic Computing, IBM, RTP, NC 919.543.0197 | [EMAIL PROTECTED] "Vinh Nguyen \(vinguye2\)" <[EMAIL PROTECTED]> 01/11/2007 03:15 AM Please respond to [email protected] To <[email protected]> cc Subject dynamic resource properties I have a resource type that has custom properties identified in an rmd file. Some of the property elements are defined as <xs:element ref="..." minOccurs="1" maxOccurs="1"/>, meaning they must exist and only exist once. I have a capability class which has get/set methods for each property. When Muse starts, it initializes the resource, and I get the following error: org.apache.muse.ws.resource.properties.schema.faults.SchemaValidationFau lt: [ID = 'BelowMinimum'] The property '{http://schemas.cmp.cisco.com/2006/07/Chameleon/LogicalResource}adminis teredState' has a minOccurs value of 1, but there are only 0 instances in the document. at org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollec tion.validateSchema(SimpleResourcePropertyCollection.java:1209) at org.apache.muse.ws.resource.impl.SimpleWsResource.initialize(SimpleWsRes ource.java:223) ... What I'm trying to do is have the resource properties pulled dynamically from an external source, like from a database. Also, the properties should only be pulled when the client calls the GetResourcePropertyDocument operation. This is because the property values can differ at any point in time, so it should not be "cached" in the Muse application layer. But, from the error I'm getting above, it seems as if Muse is explicitly calling the capability methods to get the resource properties when the resource is initialized, and not when the client actually makes a call to get the properties. Is there a reason why Muse must call to get the properties so early, instead of when really needed? In my case, the dynamic properties will always be null until the client makes the call, so Muse will always throw an error on startup because it is encountering 0 property values where it expects 1.
