You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Arthur Gulf <ar...@inbox.lv> on 2006/11/19 12:48:04 UTC

(bez temata)

 I'm writing simple wsn to redirect messages from an outer source to
all the consumers subscribed to the producer which makes all the
necessary redirection functions. Muse's examples (wsn-consumer &
wsn-producer) provide already implemented infrastructure for this
purpose. But WsnTestClient.java makes just one half of the desirable
functionality: it just subscribes Consumer. Due to Muse API it can be
done via SubscriptionClient (.destroy()). Thus, modifying the code
this way:

     NotificationProducerClient producer = new
NotificationProducerClient(epr);
     producer.setTrace(true);
     SubscriptionClient sc = producer.subscribe(consumer, null,
null);
    /* .. and now we want to destroy the subscription, i.e.
unsubscribe: */
     sc.destroy();

 ... should provide unsubscription. Instead, I get SoapFault:

org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
response code: 500 for URL:
http://192.168.3.27:8080/wsn-bridge/services/SubscriptionManager
    at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
    at
org.apache.muse.ws.resource.remote.WsResourceClient.destroy(WsResourceClient.java:105)
    at
corp.sap.pal.le.wsn.consumer.WsnTestClient.main(WsnTestClient.java:77)

    Thank you in advance, 
    Arthur Gulf
 

Re: (bez temata)

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Hi,

It looks like we forgot to add the WS-Addressing actions for 
SubscriptionManager to the Axis2 services.xml file. Without these actions 
in place, Axis2 won't let the request through to the WS-resource. You can 
fix this by adding the following XML to 
WEB-INF/services/muse/META-INF/services.xml

<service name="SubscriptionManager">
    <description>This is the Apache Muse router service.</description>
    <parameter name="ServiceClass" locked="false">
org.apache.muse.core.platform.axis2.AxisIsolationLayer</parameter>
    <operation name="handleRequest">
        <messageReceiver class=
"org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
        <actionMapping>
http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata</actionMapping>
        <actionMapping>
http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceTermination/DestroyRequest
</actionMapping>
        <actionMapping>
http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceTermination/SetTerminationTimeRequest
</actionMapping>
        <actionMapping>
http://docs.oasis-open.org/wsrf/rpw-2/GetResourceProperty/GetResourcePropertyRequest
</actionMapping>
        <actionMapping>
http://docs.oasis-open.org/wsrf/rpw-2/GetResourcePropertyDocument/GetResourcePropertyDocumentRequest
</actionMapping>
        <actionMapping>
http://docs.oasis-open.org/wsrf/rpw-2/GetMultipleResourceProperties/GetMultipleResourcePropertiesRequest
</actionMapping>
    </operation>
</service>



Arthur Gulf <ar...@inbox.lv> wrote on 11/19/2006 06:48:04 AM:

>  I'm writing simple wsn to redirect messages from an outer source to
> all the consumers subscribed to the producer which makes all the
> necessary redirection functions. Muse's examples (wsn-consumer &
> wsn-producer) provide already implemented infrastructure for this
> purpose. But WsnTestClient.java makes just one half of the desirable
> functionality: it just subscribes Consumer. Due to Muse API it can be
> done via SubscriptionClient (.destroy()). Thus, modifying the code
> this way:
> 
>      NotificationProducerClient producer = new
> NotificationProducerClient(epr);
>      producer.setTrace(true);
>      SubscriptionClient sc = producer.subscribe(consumer, null,
> null);
>     /* .. and now we want to destroy the subscription, i.e.
> unsubscribe: */
>      sc.destroy();
> 
>  ... should provide unsubscription. Instead, I get SoapFault:
> 
> org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> response code: 500 for URL:
> http://192.168.3.27:8080/wsn-bridge/services/SubscriptionManager
>     at
> 
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
>     at
> 
org.apache.muse.ws.resource.remote.WsResourceClient.destroy(WsResourceClient.java:105)
>     at
> corp.sap.pal.le.wsn.consumer.WsnTestClient.main(WsnTestClient.java:77)
> 
>     Thank you in advance, 
>     Arthur Gulf
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org