You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Dan Jemiolo (JIRA)" <ji...@apache.org> on 2006/11/09 20:15:37 UTC

[jira] Updated: (MUSE-146) NotificationConsumer creates empty NotificationMessage array when no XML prefixes present

     [ http://issues.apache.org/jira/browse/MUSE-146?page=all ]

Dan Jemiolo updated MUSE-146:
-----------------------------

          Component/s: Core Engine - Routing and Serialization
                       WSN NotificationConsumer
              Summary: NotificationConsumer creates empty NotificationMessage array when no XML prefixes present  (was: NotificationProducer unable to send complex type elements)
        Fix Version/s: 2.1.0
    Affects Version/s: 2.0.0
             Priority: Minor  (was: Major)

The root of this problem is actually on the consumer side. The ReflectionMessageHandler, when using NotificationMessageSerializer to parse an array of NotificationMessage elements, returns an empty array if the message payload does not use XML prefixes for its namespaces. The call does not fail with a runtime exception, NPE, etc. - it simply does not parse any messages, and so the array that the notify() implementation iterates over is zero-length. If prefixes are used, the messages are parsed properly.

If I cannot determine the cause of this by EOD tomorrow, it will have to wait for 2.2 and we will make an entry in the troubleshooting section of the manual.


> NotificationConsumer creates empty NotificationMessage array when no XML prefixes present
> -----------------------------------------------------------------------------------------
>
>                 Key: MUSE-146
>                 URL: http://issues.apache.org/jira/browse/MUSE-146
>             Project: Muse
>          Issue Type: Bug
>          Components: WSN NotificationConsumer, Core Engine - Routing and Serialization
>    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: MuseBox.zip
>
>
> 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="http://cisco.com/musebox/schemas/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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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