ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Jemiolo (JIRA)" <>
Subject [jira] Commented: (MUSE-146) NotificationConsumer creates empty NotificationMessage array when no XML prefixes present
Date Mon, 27 Nov 2006 23:35:23 GMT
    [ ] 
Dan Jemiolo commented on MUSE-146:

Okay, using my latest build, I get the following trace when I send a message payload that
doesn't use prefixes:

Nov 27, 2006 6:28:10 PM org.apache.muse.util.LoggingUtils logMessage
FINE: [SERVER TRACE] SOAP envelope contents (incoming):

<soap:Envelope xmlns:soap="">
        <wsa:To xmlns:wsa=""></wsa:To>
        <wsa:Action xmlns:wsa=""></wsa:Action>
        <wsa:MessageID xmlns:wsa="">uuid:65b369aa-c51d-e805-2946-9cd1f7aa86d3</wsa:MessageID>
        <wsa:From xmlns:wsa="">
        <wsnt:Notify xmlns:wsnt="">
                xmlns:wsa="" xmlns:wsnt=""&gt;
                <wsa:Address xmlns:wsa=""></wsa:Address>
                <wsa:ReferenceParameters xmlns:wsa="">
                    <muse-wsa:ResourceId xmlns:muse-wsa="">MuseResource-1</muse-wsa:ResourceId>
                Dialect="" xmlns:tns="">tns:MyTopic</wsnt:Topic>
                <wsa:ReferenceParameters xmlns:wsa=""/>
                <wsa:Address xmlns:wsa=""></wsa:Address>
                <MyMessage xmlns="">This is a message

Nov 27, 2006 6:28:10 PM org.apache.muse.util.LoggingUtils logError
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.<init>(
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	27 more...

This is very weird. The NotificationMessage element is removed! the <wsnt:NotificationMessage
part is erased, but the namespace declarations remain as text, and the closing bracket (>)
has been normalized to the proper character code (as if it were text data). When you put a
prefix back in, the NotificationMessage element remains.

Because the NotificationMessage element is removed (and its children become Notify's children),
the parser gets screwed up.

I honestly don't know what to do about this, because that server-side logging (LoggingUtils.logMessage())
happens right after the XML is received from Axis2. I'm guessing it may be an Axis2 problem,
but I will doublecheck using our new "mini" platform tonight.

> NotificationConsumer creates empty NotificationMessage array when no XML prefixes present
> -----------------------------------------------------------------------------------------
>                 Key: MUSE-146
>                 URL:
>             Project: Muse
>          Issue Type: Bug
>          Components: Core Engine - Routing and Serialization, WSN NotificationConsumer
>    Affects Versions: 2.0.0
>         Environment: Windows XP SP2, Apache 2.2, Tomcat 5.5, Muse 2.0.0, Eclipse 3.2.1,
XmlBeans 2.2.0
>            Reporter: Vinh Nguyen
>         Assigned To: Dan Jemiolo
>            Priority: Minor
>             Fix For: 2.1.0
>         Attachments:
> Sending a notification containing a complex element doesn't seem to work.  It only works
for an element containing a simple string message.  I'm using XmlBeans for conversion between
xml schemas and java objects.  Using the code below, the notification does not appear to be
sent, nor do any errors get thrown in the process.
> BoxDocument doc = BoxDocument.Factory.newInstance();
> BoxType type = doc.addNewBox();
> type.setWidth(BigInteger.valueOf(123));
> type.setHeight(BigInteger.valueOf(123));
> QName qname = new QName(NAMESPACE_URI, "MyMessage", PREFIX);
> Element payload = XmlUtils.createElement(qname, XmlUtils.getFirstElement((Document)doc.getDomNode()));
> NotificationProducer np = ...
> np.publish(TOPIC_NAME, payload);
> Here is the XML from doc.xmlText():
> <box:Box xmlns:box=""><box:width>123</box:width><box:height>123</box:height></box:Box>

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message