Hi,
I tried to add the following MCR to the WSServiceGroup.rmd I use.
<Property name="wsrf-sg:MembershipContentRule" modifiability="read-write"
mutability="mutable">
<InitialValues>
<wsrf-sg:MembershipContentRule MemberInterfaces="test:WsResource"
ContentElements="test:MyProperty"
xmlns:test="http://ws.apache.org/muse/test/wsrf"/>
</InitialValues>
</Property>
When initializing the Resource by calling the getPropertyDocument() method,
I get the following exception:
org.apache.muse.ws.addressing.soap.SoapFault: [ID = 'NotNillable'] The
property '{http://docs.oasis-open.org/wsrf/sg-2}MembershipContentRule' is
not nillable, but there is an instance of it with no child nodes (a null
value).
at org.apache.muse.core.AbstractResourceClient.invoke(
AbstractResourceClient.java:254)
at
org.apache.muse.ws.resource.remote.WsResourceClient.getResourcePropertyDocument(
WsResourceClient.java:142)
at org.apache.muse.test.wsrf.WsrfTestClient.main(
WsrfTestClient.java:191)
Are there any child elements for the MCR-element???
thx,
Christian
Daniel Jemiolo
<[EMAIL PROTECTED]
m.com> To
[email protected]
15.11.2006 13:55 cc
Subject
Please respond to Re: WSN-Producer example with
[EMAIL PROTECTED] wsrf-sg:Content property
he.org
Hi,
I think you might be misunderstanding how resources are evaluated for
service group membership. Resource that are potential service group
members have a list of properties (WSRP doc), and the service group
resource has a set of membership content rules which are also a list of
properties. In the latter case, the list signifies which properties a
resource must have in order to become a service group member. When the
WSSG Add operation is invoked, if the service group determines that they
resource has the properties that are in its membership content rules, then
it will create a third resource: a service group entry. The service group
entry has a property named wsrf-sg:Content, and it contains the actual
values of the resource properties that are in the MCR list.
Here's an example:
Let's say I want a service group that will only contain WSDM-enabled
resources. WSDM requires that all manageable resources have a
muws1:ResourceId property, so my service group will have a membership
content rule that lists muws1:ResourceId. In the RMD doc for the service
group resource, I add:
<Property>
<InitialValues>
<wsrf-sg:MembershipContentRule ContentElements="muws1:ResourceId"
xmlns:muws1="..." xmlns:wsrf-sg="..."/>
</InitialValues>
</Property>
After initialization, I try to add a ws-resource that has the
muws1:ResourceId property in its WSRP doc. When I do this, a service group
entry will be created. It will have three properties:
1. ServiceGroupEPR - The EPR of the service group that this entry belongs
to.
2. MemberEPR - The EPR of the ws-resource we're adding.
3. Content - The value of the member's muws1:ResourceId property, which I
got dynamically via GetResourceProperty().
So, you should be most concerned with setting the MCRs (declaratively in
RMD or programmatically - I recommend declaratively). Is this more clear?
Dan
Christian Ewers <[EMAIL PROTECTED]> wrote on 11/15/2006 04:27:18 AM:
>
> Hi,
> I'm trying to extend the wsn-producer example by adding the WS-Resource
to
> a remote ServiceGroup.
> For doing so, I added the wsrf-sg:Content property to the existing
resource
> properties, extended the MyCapabilityImpl.java class by adding the
> getContent(), setContent(Element e) methods and I added the
WssgConstants.
> CONTENT_QNAMEto the _PROPERTIESarray.
>
> Property in the WSDL-File:
>
> <xsd:element ref="wsrf-sg:Content" minOccurs="0" maxOccurs="1"/>
>
> I added the following test-content to the WsResource.rmd file (also
added
> the wsrf-sg namespace)
>
> <Property name="wsrf-sg:Content" modifiability="read-write" mutability=
> "mutable">
> <InitialValues>
> <wsrf-sg:Content>
> <wsrf-sg:RPDoc>
> <myns:ServerName>TestServerName</myns:ServerName>
> </wsrf-sg:RPDoc>
> </wsrf-sg:Content>
> </InitialValues>
> </Property>
>
> Now I'm getting the following exception when initializing the resource
by
> using the WsnTestclient. I didn't add any ServiceGroup related code so
far.
>
> java.lang.NullPointerException
> at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown
Source)
> at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown
Source)
> at
> org.apache.muse.ws.notification.properties.ResourcePropertyChangeEvent.
> toXML(ResourcePropertyChangeEvent.java:97)
> at
> org.apache.muse.ws.notification.properties.ResourcePropertyChangeEvent.
> toXML(ResourcePropertyChangeEvent.java:80)
> at
> org.apache.muse.ws.notification.impl.SimpleNotificationProducer.
> publish(SimpleNotificationProducer.java:452)
> at
> org.apache.muse.ws.notification.properties.ChangeNotificationListener.
> propertyChanged(ChangeNotificationListener.java:99)
> at
>
org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollection.
> changeCompleted(SimpleResourcePropertyCollection.java:337)
> at
>
org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollection.
> insertResourceProperty(SimpleResourcePropertyCollection.java:718)
> at
>
org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollection.
> insertResourceProperty(SimpleResourcePropertyCollection.java:681)
> at
>
org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollection.
> addInitialValues(SimpleResourcePropertyCollection.java:169)
> at
>
org.apache.muse.ws.resource.properties.impl.SimpleResourcePropertyCollection.
> applyMetadata(SimpleResourcePropertyCollection.java:297)
> at
>
org.apache.muse.ws.resource.impl.SimpleWsResource.initialize(SimpleWsResource.java:215)
> at
> org.apache.muse.core.routing.RouterFilePersistence.
> reloadResource(RouterFilePersistence.java:139)
> at
> org.apache.muse.core.AbstractFilePersistence.
> reloadResources(AbstractFilePersistence.java:393)
> at
>
org.apache.muse.core.AbstractFilePersistence.reload(AbstractFilePersistence.java:334)
> at
> org.apache.muse.core.routing.SimpleResourceRouter.
> initialize(SimpleResourceRouter.java:248)
> at
> org.apache.muse.core.platform.AbstractIsolationLayer.
> initialize(AbstractIsolationLayer.java:176)
> at
> org.apache.muse.core.platform.axis2.AxisIsolationLayer.
> setOperationContext(AxisIsolationLayer.java:138)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.axis2.engine.DependencyManager.
> configureBusinessLogicProvider(DependencyManager.java:70)
> at
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver.
> invokeBusinessLogic(RawXMLINOutMessageReceiver.java:79)
> at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.
> receive(AbstractInOutSyncMessageReceiver.java:39)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:504)
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.
> processHTTPPostRequest(HTTPTransportUtils.java:324)
> at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:234)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.
> doFilter(ApplicationFilterChain.java:173)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.
> processConnection(Http11BaseProtocol.java:664)
> at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.
> runIt(LeaderFollowerWorkerThread.java:80)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:595)
>
> What am I doing wrong?
>
> Thx,
> Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]