There was a note somewhere in the code related to namespaces that stated 
"<:abc>" was a valid element name implying you could have a non-null, blank 
prefix.  I don't think that's legal when I read the XML Namespaces spec.  I did 
submit a patch to XmlUtils to properly handle adding namespaces which was 
incorporated by Dan into the head.  I think it includes what you're suggesting.

 On Mon 12/15/08  7:37 AM , "Chris Twiner (JIRA)" [email protected] sent:
> 
> [ https://issues.apache.org/jira/browse/MUSE-149?page=com.atlassi
> an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=
> 12656612#action_12656612 ] 
> Chris Twiner commented on MUSE-149:
> -----------------------------------
> 
> just a note regarding Francesco's issue.  Replacing a small piece of code
> in SimpleNotificationMessage toXML solves this issue:
> change
> 
> XmlUtils.setNamespaceAttribute(root, prefix, namespace);
> 
> to 
> 
> if (prefix != null && prefix.length() > 0 ) {
> XmlUtils.setNamespaceAttribute(root, prefix, namespace);
> }
> 
> it then becomes the programmers repsonsibility to use DOM namespace
> functions correctly.  
> Does anyone object to this kind of defensive code being added directly into
> XmlUtils.setNamespaceAttribute(root, prefix, namespace)  ?
> > XML Encoding Error on Ubuntu 6.06 and Tomcat
> 5.5>
> ------------------------------------------------>
> >                 Key: MUSE-149
> >                 URL: https://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
> >            Assignee: Dan Jemiolo
> >            Priority: Minor
> >             Fix For: 2.3.0
> >
> >         Attachments: catalina.out, muse.log,
> notification.txt, NotificationServiceTest.zip, NotificationTest.java,
> request1.txt, request2.txt, request3.txt>
> >
> > 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-4a8
> d-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:Add
> ress>>         </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:Mess
> ageID>>         
> <wsa:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/Subscr
> ibeRequest</wsa:Action>>         <wsa:RelatesTo
> wsa:RelationshipType="http://www.w3.org/2005/08/addressing/reply";>uuid:280662
> 5d-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/Subscrip
> tionManager</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-53f
> 5-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:Add
> ress>>         </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:Mess
> ageID>>         
> <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:203801
> 01-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:Ac
> tion>>         <wsa:MessageID 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";>uuid:19f3dd63-a3b
> c-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:Add
> ress>>         </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/WsResour
> ce>   at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.j
> ava:254)>     at
> org.apache.muse.ws.notification.remote.NotificationProducerClient.getCurren
> tMessage(NotificationProducerClient.java:80)>         at
> org.apache.ws.muse.test.wsrf.NotificationTest.main(NotificationTest.java:32
> )
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] additional 
> commands, e-mail: m
> [email protected]
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to