Ok, 
not sure if I understood correctly but you want your resource to send a
notification to another resource?

If that is the case then your workflow is incorrect from what I know of
Muse. Notifications work like this:

You have a publisher - this is the part that sends notifications. The
publisher exposes:

<actionMapping>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</actionMapping>
           
<actionMapping>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</actionMapping>

You then have a consumer - this is the part that receives notifications. The
consumer subscribes to the publisher using a NotificationProducerClient
based on the EPR of the publisher. Then it subscribes and the subscribe
operation on the NotificationProducerClient returns a SubscriptionClient.

The publisher creates a NotificationProducer and then uses it to publish the
data it wants to publish, which will be sent to all the consumers. 

For more info look at the demo in the Muse release.


alfredo.s.g_uam_spain wrote:
> 
> I have a problem in my notifications because the generated WS supports
> this : 
> 
> WsResource
> Service EPR : http://localhost:9090/museBROKER/services/WsResource
> Service REST epr : http://localhost:9090/museBROKER/rest/WsResource
> Service Description : WsResource
> Service Status : Active
> Available Operations
> 
>     * handleRequest
>     * invoke
> 
> because in the services.xml is defined like : 
> 
> <service name="WsResource">
>         <parameter locked="false"
> name="ServiceClass">org.apache.muse.core.platform.axis2.AxisIsolationLayer</parameter>
>         <operation name="handleRequest">
>             <messageReceiver
> class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>            
> <actionMapping>http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination/DestroyRequest</actionMapping>
>            
> <actionMapping>http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsrf/rpw-2/SetResourceProperties/SetResourcePropertiesRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/NotifyRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocumentRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsrf/rpw-2/QueryResourceProperties/QueryResourcePropertiesRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination/SetTerminationTimeRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</actionMapping>
>            
> <actionMapping>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</actionMapping>
>         </operation>
>     </service>
> 
> 
> So, if i want to send a notification to this WS what URI, or EPR should i
> use? because Notify is not an operation of the ws and i get a SoapFault if
> i use a NotificationConsumerClient in this way:
> 
> 
> 
>             String webAppRoot = "/museBROKER/services/WsResourceBroker/";
> 
>             String contextPath = webAppRoot;
> 
>             URI address = getLocalAddress(contextPath, consumer_port);
> 
>             EndpointReference consumer = new EndpointReference(address);
> 
>             NotificationConsumerClient wsn = new
> NotificationConsumerClient(consumer);
> 
> 
>  [java]     <soapenv:Header>
>      [java]        
> <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
>      [java]         <wsa:ReplyTo>
>      [java]            
> <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
>      [java]         </wsa:ReplyTo>
>      [java]        
> <wsa:MessageID>urn:uuid:3F7BDF4A5AC257772611933094785671</wsa:MessageID>
>      [java]        
> <wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
>      [java]         <wsa:RelatesTo
> wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid:55820f86-a63e-c08d-e105-da78b86c1ebc</wsa:RelatesTo>
>      [java]     </soapenv:Header>
>      [java]     <soapenv:Body>
>      [java]         <soapenv:Fault>
>      [java]             <soapenv:Code>
>      [java]                 <soapenv:Value>soapenv:Sender</soapenv:Value>
>      [java]             </soapenv:Code>
>      [java]             <soapenv:Reason>
>      [java]                 <soapenv:Text xml:lang="en-US">Service not
> found operation terminated !!</soapenv:Text>
>      [java]             </soapenv:Reason>
>      [java]             <soapenv:Detail/>
>      [java]         </soapenv:Fault>
>      [java]     </soapenv:Body>
>      [java] </soapenv:Envelope>
> 
>      [java] org.apache.muse.ws.addressing.soap.SoapFault: Service not
> found operation terminated !!
>      [java]     at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:298)
>      [java]     at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
>      [java]     at
> org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:99)
>      [java]     at
> org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:83)
>      [java]     at
> org.apache.muse.test.wsn.Snmp_muse$TextTableListener.next(Unknown Source)
>      [java]     at
> org.snmp4j.util.TableUtils$TableRequest.onResponse(Unknown Source)
>      [java]     at org.snmp4j.Snmp.processPdu(Unknown Source)
>      [java]     at org.snmp4j.MessageDispatcherImpl.fireProcessPdu(Unknown
> Source)
>      [java]     at
> org.snmp4j.MessageDispatcherImpl.dispatchMessage(Unknown Source)
>      [java]     at org.snmp4j.MessageDispatcherImpl.processMessage(Unknown
> Source)
>      [java]     at org.snmp4j.MessageDispatcherImpl.processMessage(Unknown
> Source)
>      [java]     at
> org.snmp4j.transport.AbstractTransportMapping.fireProcessMessage(Unknown
> Source)
>      [java]     at
> org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(Unknown
> Source)
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-do-i-notify-to-a-wsdl2java-generated-ws--tf4690129.html#a13409094
Sent from the Muse User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to