Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Help understanding PubSub and namespaces?

$
0
0

Hi,

 

I need some help understanding how namespaces work in relation to PubSub.

 

Problem:

I've created an XML schema with various types of objects that I'd like my clients to be able to publish via PubSub.  I'm not sure how to associate my schema and traditional XML namespaces with the PubSub schemas.

 

Example:

I've created a custom "Location" object, described as:

 

<xsd:complexType name="LocationType">

     <xsd:attribute name="latitude" type="xsd:double" use="required"></xsd:attribute>

     <xsd:attribute name="longitude" type="xsd:double" use="required"></xsd:attribute>

</xsd:complexType>

 

 

When reading or writing the XML, I use proper namespace syntax like this:

<tns:Location xmlns:tns="http://seattle1.adspore.com/schema/types" latitude="42.75663" longitude="-122.4837374"></tns:Location>

 

I have the ability to control the "tns" prefix, the document writer makes the association between the "http://...." url and the "prefix" where appropriate.

 

 

Question:

How should this be handled within Smack and Openfire?  When I observe the nodes in the Openfire database rows, the "http://seattle1...." portion is actually the node id.  This doesn't look correct.

 

Any help understanding would be very helpful, there just are not enough examples for me to understand how this works.

 

Thanks,

 

DD


Viewing all articles
Browse latest Browse all 10742

Trending Articles