Element[] to QName to topic?

View: New views
4 Messages — Rating Filter:   Alert me  

Element[] to QName to topic?

by Jan Torben Heuer-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

How can I parse topics that are supplied via soap? I want to add them later
with NotificationProducer#addTopic(QName);

The xml-code may look like:
<wsbn:Topic
dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple"
xmlns:tsas="http://www.opengis.net/ses/1.0.0/">
        <tsas:Measurements>mytopic</tsas:Measurements>
</wsbn:Topic>

But I'm not sure how else the topic can be provided.
Is there already topic-parsing-code in muse that I can reuse?


Thanks,

Jan
--
                                Institute for Geoinformatics
jan.heuer@... Robert-Koch-Strasse 26-28
+49 251 83-31960 48151 Münster, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@...
For additional commands, e-mail: muse-user-help@...


RE: Element[] to QName to topic?

by Chris.Twiner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jan,

The XmlUtils.getQName / getQNameFromChild functions can retrieve QNames for you.  These search up the path to collect the namespaces mentioned by the QNames.  Note these are QNames in the xsd fashion i.e. prefix:localName and the prefix -> namespace mapping must be in a parent element.

cheers,
Chris

-----Original Message-----
From: Jan Torben Heuer [mailto:jan.heuer@...]
Sent: Wednesday, August 06, 2008 12:28 PM
To: muse-user@...
Subject: Element[] to QName to topic?

Hi,

How can I parse topics that are supplied via soap? I want to add them later with NotificationProducer#addTopic(QName);

The xml-code may look like:
<wsbn:Topic
dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple"
xmlns:tsas="http://www.opengis.net/ses/1.0.0/">
        <tsas:Measurements>mytopic</tsas:Measurements>
</wsbn:Topic>

But I'm not sure how else the topic can be provided.
Is there already topic-parsing-code in muse that I can reuse?


Thanks,

Jan
--
                                Institute for Geoinformatics
jan.heuer@...       Robert-Koch-Strasse 26-28
+49 251 83-31960                48151 Münster, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@...
For additional commands, e-mail: muse-user-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@...
For additional commands, e-mail: muse-user-help@...


Re: Element[] to QName to topic?

by Jan Torben Heuer-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 06 August 2008 13:17:27 Chris.Twiner@... wrote:

Hi,

> The XmlUtils.getQName / getQNameFromChild functions can retrieve QNames for
> you.  These search up the path to collect the namespaces mentioned by the
> QNames.  Note these are QNames in the xsd fashion i.e. prefix:localName and
> the prefix -> namespace mapping must be in a parent element.

The method signature is: XmlUtils.getQName(Element) - however the topic is
parsed as DefferedTextImpl which is a node but not an Element. Did I miss
something? My topic looks like:

<wsbn:Topic
dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple"
xmlns:tsas="http://www.opengis.net/sas/1.0.0/">
                                tsas:Measurements
</wsbn:Topic>

is that correct?

Jan

--
                                Institute for Geoinformatics
jan.heuer@... Robert-Koch-Strasse 26-28
+49 251 83-31960 48151 Münster, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@...
For additional commands, e-mail: muse-user-help@...


RE: Element[] to QName to topic?

by Chris.Twiner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jan,

the wsbn:Topic element is the one that you pass in.  It should then get the QName from the element fully.  Note that this only helps with simple topic expressions not the full expression syntax (which can't return a single QName).  FYI Muse doesn't support the full expression syntax (nested namespaces etc).

cheers,
Chris

-----Original Message-----
From: Jan Torben Heuer [mailto:jan.heuer@...]
Sent: Thursday, August 07, 2008 1:24 PM
To: muse-user@...
Subject: Re: Element[] to QName to topic?

On Wednesday 06 August 2008 13:17:27 Chris.Twiner@... wrote:

Hi,

> The XmlUtils.getQName / getQNameFromChild functions can retrieve
> QNames for you.  These search up the path to collect the namespaces
> mentioned by the QNames.  Note these are QNames in the xsd fashion
> i.e. prefix:localName and the prefix -> namespace mapping must be in a parent element.

The method signature is: XmlUtils.getQName(Element) - however the topic is parsed as DefferedTextImpl which is a node but not an Element. Did I miss something? My topic looks like:

<wsbn:Topic
dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple"
xmlns:tsas="http://www.opengis.net/sas/1.0.0/">
                                tsas:Measurements </wsbn:Topic>

is that correct?

Jan

--
                                Institute for Geoinformatics
jan.heuer@...       Robert-Koch-Strasse 26-28
+49 251 83-31960                48151 Münster, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@...
For additional commands, e-mail: muse-user-help@...


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@...
For additional commands, e-mail: muse-user-help@...