Hello,

The WS-Notification standard states the wsa:Action attribute must be set to
'http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify'.
As of this we can not change the client which sends it correctly.
I resolved the problem by overwriting the class NotifyHandler and call the
super constructor with the correct action uri.

public class NotifyHandler extends AbstractMessageHandler {
        //
        // Response message never changes, so we use a static value
        //
        private static final Element _NOTIFY_RESPONSE = XmlUtils
                        .createElement(WsnConstants.NOTIFY_RESPONSE_QNAME);

        public NotifyHandler() {
                super(WsnConstants.CONSUMER_URI + "/Notify", 
WsnConstants.NOTIFY_QNAME);
        }
...


crapp wrote:
> 
> Hello,
> 
> Our consumer receives WS-Notifications via Muse and Axis2. The producer
> sends the notifications with the wsa:action attribute set to
> 'http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify'
> 
> Our MUSE implementation currently listens for the wsa:action set to
> 'http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/NotifyRequest'.
> 
> I saw that in the WSDL and in the services.xml this wsa:action needs to be
> set. I did that, re-generated the sources of the client from WSDL and
> compiled them. Now I am getting the below error on my consumer. What else
> do I need to do to change the wsa:action attribute value on the consumer
> side?a
> 
> INFO: There was an error while processing a request:
> 
> [ID = 'NoMessageContent'] The NotificationMessage XML does not have a
> Message element. All messages
> must have a message payload associated with them.
> 
>        
> org.apache.muse.ws.notification.impl.SimpleNotificationMessage.<init>(SimpleNotificationMess
> age.java:117)
>        
> org.apache.muse.ws.notification.impl.NotificationMessageSerializer.fromXML(NotificationMessa
> geSerializer.java:46)
>        
> org.apache.muse.core.serializer.ArraySerializer.fromXML(ArraySerializer.java:126)
>        
> org.apache.muse.core.routing.ReflectionMessageHandler.fromXML(ReflectionMessageHandler.java:
> 132)
>        
> org.apache.muse.core.SimpleResource.invoke(SimpleResource.java:368)
>        
> org.apache.muse.core.routing.SimpleResourceRouter.invoke(SimpleResourceRouter.java:290)
>        
> org.apache.muse.core.platform.axis2.AxisIsolationLayer.invoke(AxisIsolationLayer.java:136)
>        
> org.apache.muse.core.platform.axis2.AxisIsolationLayer.handleRequest(AxisIsolationLayer.java
> :88)
>         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         java.lang.reflect.Method.invoke(Method.java:597)
>        
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessage
> Receiver.java:88)
>        
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessage
> Receiver.java:39)
>         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:493)
>         18 more...
> ------------------------------------------
> 
> 
> Regards,
> Christian Rapp
> 

-- 
View this message in context: 
http://www.nabble.com/Howto-adjust-value-for-wsa%3AAction--tp17749755p17770458.html
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