You can disable WSRP schema validation for your resource type by adding
the following under the <resource-type/> element:
<init-param>
<param-name>validate-wsrp-schema</param-name>
<param-value>false</param-value>
</init-param>
However: in the validateSchema() method, we're reading each property value
with getResourceProperty(). At this point in the initializaiton process,
the resource is fully initialized, and the code is just doing a sanity
check to make sure you're returning property values the way you said you
would (in your schema). So, there's really no difference between a client
issuing a GetResourceProperty call and the validateSchema() method calling
getResourceProperty().
Did you only implement GetResourcePropertyDocument? GetResourceProperty is
required by WSRF, so you should implement both for a WS-resource.
Dan
"Vinh Nguyen \(vinguye2\)" <[EMAIL PROTECTED]> wrote on 01/11/2007
03:15:36 AM:
> 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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]