[ 
http://issues.apache.org/jira/browse/MUSE-149?page=comments#action_12457718 ] 
            
Jose Antonio commented on MUSE-149:
-----------------------------------

Just tried with Muse 2.1 and I get the same but I've finally found the problem. 
I was using the following request:

public static void main(String[] args) {
                String NAMESPACE_URI = "http://ws.apache.org/muse/test/wsrf";;
                QName NOTIFICATION_TOPIC = new 
QName(NAMESPACE_URI,"Notification");
                
                try {
                        URI serviceURI = new 
URI("http://localhost:8080/NotificationServiceTest/services/WsResource";);
                        URI consumerURI = new 
URI("http://localhost:8080/FicticiousService/services/WsResource";);
                        
                        EndpointReference serviceEpr = new 
EndpointReference(serviceURI);
                        EndpointReference consumerEpr = new 
EndpointReference(consumerURI);             
                        
                        WsResourceProxy proxy = new WsResourceProxy(serviceEpr);
                        proxy.setTrace(true);

                        proxy.getCurrentMessage(NOTIFICATION_TOPIC);
                        
                } catch (URISyntaxException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (SoapFault e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        }

So it generated the SOAP Message: 

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
    <soap:Header>
        <wsa:To 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
        <wsa:Action 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</wsa:Action>
        <wsa:MessageID 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:68934fe5-fffd-e27d-5144-5c6fc90c2f5b</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
            
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
    </soap:Header>
    <soap:Body>
        <wsnt:GetCurrentMessage
            xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"; 
xmlns:="http://ws.apache.org/muse/test/wsrf";>Notification</wsnt:GetCurrentMessage>
    </soap:Body>
</soap:Envelope>

As you can see the topic name has no qualification. Using the code

QName NOTIFICATION_TOPIC = new QName(NAMESPACE_URI,"Notification","nm");

Generates the SOAP message:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
    <soap:Header>
        <wsa:To 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
        <wsa:Action 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</wsa:Action>
        <wsa:MessageID 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:98807d9b-665f-f009-84f9-5f8760aa35e3</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
            
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
    </soap:Header>
    <soap:Body>
        <wsnt:GetCurrentMessage
            xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"; 
xmlns:nm="http://ws.apache.org/muse/test/wsrf";>nm:Notification</wsnt:GetCurrentMessage>
    </soap:Body>
</soap:Envelope>

And so, I get a response:

<soapenv:Envelope
    xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
    <soapenv:Header>
        <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
        <wsa:ReplyTo>
            <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
        </wsa:ReplyTo>
        <wsa:MessageID>urn:uuid:5A6170A5F52E3BF9DD11659307403972</wsa:MessageID>
        
<wsa:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</wsa:Action>
        <wsa:RelatesTo 
wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid:98807d9b-665f-f009-84f9-5f8760aa35e3</wsa:RelatesTo>
    </soapenv:Header>
    <soapenv:Body>
        <soap:Fault xmlns:soap="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:tns="http://axis2.platform.core.muse.apache.org";>
            <soap:Code>
                <soap:Value>soap:Receiver</soap:Value>
            </soap:Code>
            <soap:Reason>
                <soap:Text>[ID = 'NoMessageAvailable'] The topic 
'{http://ws.apache.org/muse/test/wsrf}Notification' has not published any 
messages.</soap:Text>
            </soap:Reason>
            <soap:Detail>
                <wsnt:NoCurrentMessageOnTopicFault 
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>[ID = 'NoMessageAvailable'] The 
topic '{http://ws.apache.org/muse/test/wsrf}Notification' has not published any 
messages.</wsnt:NoCurrentMessageOnTopicFault>
            </soap:Detail>
        </soap:Fault>
    </soapenv:Body>
</soapenv:Envelope>

The problem now is that using that code:

public static void main(String[] args) {
                String NAMESPACE_URI = "http://ws.apache.org/muse/test/wsrf";;
                QName NOTIFICATION_TOPIC = new 
QName(NAMESPACE_URI,"Notification","nm");
                
                try {
                        URI serviceURI = new 
URI("http://localhost:8080/NotificationServiceTest/services/WsResource";);
                        URI consumerURI = new 
URI("http://localhost:8080/FicticiousService/services/WsResource";);
                        
                        EndpointReference serviceEpr = new 
EndpointReference(serviceURI);
                        EndpointReference consumerEpr = new 
EndpointReference(consumerURI);             
                        
                        WsResourceProxy proxy = new WsResourceProxy(serviceEpr);
                        proxy.setTrace(true);
                        
                        proxy.subscribe(consumerEpr, null, null);
                        proxy.generateNotification("This is a notification that 
must be delivered");
                        proxy.getCurrentMessage(NOTIFICATION_TOPIC);
                        
                } catch (URISyntaxException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (SoapFault e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        }

Generates that SOAP Trace:

[CLIENT TRACE] SOAP envelope contents (outgoing):

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
    <soap:Header>
        <wsa:To 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
        <wsa:Action 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
        <wsa:MessageID 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:b11f0217-dacb-9a60-bc05-e637ffcd7641</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
            
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
    </soap:Header>
    <soap:Body>
        <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
            <wsnt:ConsumerReference>
                <wsa:Address 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/FicticiousService/services/WsResource</wsa:Address>
            </wsnt:ConsumerReference>
        </wsnt:Subscribe>
    </soap:Body>
</soap:Envelope>

[CLIENT TRACE] SOAP envelope contents (incoming):

<soapenv:Envelope
    xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
    <soapenv:Header>
        <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
        <wsa:ReplyTo>
            <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
        </wsa:ReplyTo>
        <wsa:MessageID>urn:uuid:44F52D8FB526AC125D11659309786152</wsa:MessageID>
        
<wsa:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
        <wsa:RelatesTo 
wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid:b11f0217-dacb-9a60-bc05-e637ffcd7641</wsa:RelatesTo>
    </soapenv:Header>
    <soapenv:Body>
        <wsnt:SubscribeResponse
            xmlns:tns="http://axis2.platform.core.muse.apache.org"; 
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
            <wsnt:SubscriptionReference>
                
<wsa:Address>http://127.0.0.1:8080/NotificationServiceTest/services/SubscriptionManager</wsa:Address>
                <wsa:ReferenceParameters>
                    <muse-wsa:ResourceId 
xmlns:muse-wsa="http://ws.apache.org/muse/addressing";>MuseResource-1</muse-wsa:ResourceId>
                </wsa:ReferenceParameters>
            </wsnt:SubscriptionReference>
            <wsnt:CurrentTime>2006-12-12T14:43:01+01:00</wsnt:CurrentTime>
        </wsnt:SubscribeResponse>
    </soapenv:Body>
</soapenv:Envelope>

[CLIENT TRACE] SOAP envelope contents (outgoing):

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
    <soap:Header>
        <wsa:To 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
        <wsa:Action 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://ws.apache.org/muse/test/wsrf/GenerateNotificationRequest</wsa:Action>
        <wsa:MessageID 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:7ed37cf8-0348-547f-5120-70d3ca545581</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
            
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
    </soap:Header>
    <soap:Body>
        <pfx0:GenerateNotification 
xmlns:pfx0="http://ws.apache.org/muse/test/wsrf";>
            <pfx0:NotificationText>This is a notification that must be 
delivered</pfx0:NotificationText>
        </pfx0:GenerateNotification>
    </soap:Body>
</soap:Envelope>

[CLIENT TRACE] SOAP envelope contents (incoming):

<soapenv:Envelope
    xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
    <soapenv:Header>
        <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
        <wsa:ReplyTo>
            <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
        </wsa:ReplyTo>
        <wsa:MessageID>urn:uuid:44F52D8FB526AC125D11659309814304</wsa:MessageID>
        
<wsa:Action>http://ws.apache.org/muse/test/wsrf/GenerateNotificationRequest</wsa:Action>
        <wsa:RelatesTo 
wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid:7ed37cf8-0348-547f-5120-70d3ca545581</wsa:RelatesTo>
    </soapenv:Header>
    <soapenv:Body>
        <muse-op:GenerateNotificationResponse
            xmlns:muse-op="http://ws.apache.org/muse/test/wsrf"; 
xmlns:tns="http://axis2.platform.core.muse.apache.org"/>
    </soapenv:Body>
</soapenv:Envelope>

[CLIENT TRACE] SOAP envelope contents (outgoing):

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
    <soap:Header>
        <wsa:To 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
        <wsa:Action 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</wsa:Action>
        <wsa:MessageID 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:5550a629-28c5-e900-0d5a-109ebc063400</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
            
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
        </wsa:From>
    </soap:Header>
    <soap:Body>
        <wsnt:GetCurrentMessage
            xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"; 
xmlns:nm="http://ws.apache.org/muse/test/wsrf";>nm:Notification</wsnt:GetCurrentMessage>
    </soap:Body>
</soap:Envelope>

org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP response 
code: 500 for URL: 
http://localhost:8080/NotificationServiceTest/services/WsResource
        at 
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:279)
        at 
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:235)
        at 
org.apache.muse.ws.notification.remote.NotificationProducerClient.getCurrentMessage(NotificationProducerClient.java:80)
        at 
org.apache.ws.muse.test.wsrf.NotificationTest.main(NotificationTest.java:33)

> Error 500 getting the current message
> -------------------------------------
>
>                 Key: MUSE-149
>                 URL: http://issues.apache.org/jira/browse/MUSE-149
>             Project: Muse
>          Issue Type: Bug
>          Components: WSN NotificationProducer
>    Affects Versions: 2.0.0, 2.1.0
>         Environment: Apache Tomcat 5.5 in a Ubuntu 6.06 box. JDK 1.5 from Sun 
> Microsystems
>            Reporter: Jose Antonio
>         Assigned To: Dan Jemiolo
>             Fix For: 2.1.0
>
>         Attachments: catalina.out, muse.log, NotificationServiceTest.zip, 
> NotificationTest.java
>
>
> When calling to getCurrentMessage from a Notification client, I get an error 
> 500. It's the only operation that generates this kind of error as I can 
> subscribe to a topic and notifications are generated when needed, but that 
> operation is generating an error before it reaches Muse.
> Attached are some files that could be used to reproduce it. This is the SOAP 
> messages that gets exchanged when running the test:
> [CLIENT TRACE] SOAP envelope contents (outgoing):
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
>     <soap:Header>
>         <wsa:To 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
>         <wsa:Action 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
>         <wsa:MessageID 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:2806625d-4a8d-dcfe-90a6-1c826dc07912</wsa:MessageID>
>         <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>             
> <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
>         </wsa:From>
>     </soap:Header>
>     <soap:Body>
>         <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
>             <wsnt:ConsumerReference>
>                 <wsa:Address 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/FicticiousService/services/WsResource</wsa:Address>
>             </wsnt:ConsumerReference>
>         </wsnt:Subscribe>
>     </soap:Body>
> </soap:Envelope>
> [CLIENT TRACE] SOAP envelope contents (incoming):
> <soapenv:Envelope
>     xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"; 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>     <soapenv:Header>
>         <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
>         <wsa:ReplyTo>
>             
> <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
>         </wsa:ReplyTo>
>         
> <wsa:MessageID>urn:uuid:F9202DB4CDDD77D74E11641126874342</wsa:MessageID>
>         
> <wsa:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
>         <wsa:RelatesTo 
> wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid:2806625d-4a8d-dcfe-90a6-1c826dc07912</wsa:RelatesTo>
>     </soapenv:Header>
>     <soapenv:Body>
>         <wsnt:SubscribeResponse xmlns:tns="http://ws.apache.org/axis2"; 
> xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2";>
>             <wsnt:SubscriptionReference>
>                 
> <wsa:Address>http://127.0.0.1:8080/NotificationServiceTest/services/SubscriptionManager</wsa:Address>
>                 <wsa:ReferenceParameters>
>                     <muse-wsa:ResourceId 
> xmlns:muse-wsa="http://ws.apache.org/muse/addressing";>MuseResource-1</muse-wsa:ResourceId>
>                 </wsa:ReferenceParameters>
>             </wsnt:SubscriptionReference>
>             <wsnt:CurrentTime>2006-11-21T13:38:12+01:00</wsnt:CurrentTime>
>         </wsnt:SubscribeResponse>
>     </soapenv:Body>
> </soapenv:Envelope>
> [CLIENT TRACE] SOAP envelope contents (outgoing):
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
>     <soap:Header>
>         <wsa:To 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
>         <wsa:Action 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://ws.apache.org/muse/test/wsrf/GenerateNotificationRequest</wsa:Action>
>         <wsa:MessageID 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:20380101-53f5-c614-4cd1-d21e29f3989a</wsa:MessageID>
>         <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>             
> <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
>         </wsa:From>
>     </soap:Header>
>     <soap:Body>
>         <pfx0:GenerateNotification 
> xmlns:pfx0="http://ws.apache.org/muse/test/wsrf";>
>             <pfx0:NotificationText>This is a notification that must be 
> delivered</pfx0:NotificationText>
>         </pfx0:GenerateNotification>
>     </soap:Body>
> </soap:Envelope>
> [CLIENT TRACE] SOAP envelope contents (incoming):
> <soapenv:Envelope
>     xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"; 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>     <soapenv:Header>
>         <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
>         <wsa:ReplyTo>
>             
> <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
>         </wsa:ReplyTo>
>         
> <wsa:MessageID>urn:uuid:F9202DB4CDDD77D74E11641126939044</wsa:MessageID>
>         
> <wsa:Action>http://ws.apache.org/muse/test/wsrf/GenerateNotificationRequest</wsa:Action>
>         <wsa:RelatesTo 
> wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid:20380101-53f5-c614-4cd1-d21e29f3989a</wsa:RelatesTo>
>     </soapenv:Header>
>     <soapenv:Body>
>         <muse-op:GenerateNotificationResponse
>             xmlns:muse-op="http://ws.apache.org/muse/test/wsrf"; 
> xmlns:tns="http://ws.apache.org/axis2"/>
>     </soapenv:Body>
> </soapenv:Envelope>
> [CLIENT TRACE] SOAP envelope contents (outgoing):
> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
>     <soap:Header>
>         <wsa:To 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://localhost:8080/NotificationServiceTest/services/WsResource</wsa:To>
>         <wsa:Action 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest</wsa:Action>
>         <wsa:MessageID 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:19f3dd63-a3bc-09c1-00d2-bcf64dea0dab</wsa:MessageID>
>         <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>             
> <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
>         </wsa:From>
>     </soap:Header>
>     <soap:Body>
>         <wsnt:GetCurrentMessage
>             xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"; 
> xmlns:="http://ws.apache.org/muse/test/wsrf";>Notification</wsnt:GetCurrentMessage>
>     </soap:Body>
> </soap:Envelope>
> org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP response 
> code: 500 for URL: 
> http://localhost:8080/NotificationServiceTest/services/WsResource
>       at 
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
>       at 
> org.apache.muse.ws.notification.remote.NotificationProducerClient.getCurrentMessage(NotificationProducerClient.java:80)
>       at 
> org.apache.ws.muse.test.wsrf.NotificationTest.main(NotificationTest.java:32)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to