I’m writing code to publish an item to a pubsub node, with a payload. Something like Example 99 found here.
So I’m using code like this :-
SimplePayload Payload = new SimplePayload( “entry”, “http://www.w3.org/2005/Atom”, “<stuff>a payload</stuff>” );
PayloadItem<SimplePayload> MessageItem = new PayloadItem<>(Payload);
LeafNode Node = m_PubSubManager.getLeafNode( “My Node Name” );
Node.publish( MessageItem );
But, so far as I can see SimplePayload does nothing with the elementName and namespace parameters that are passed to it. The toXML function just returns the payload.
So, I was wondering what the intention was for this class. At the moment it does little more than hold on to a CharSequence. But maybe I’m missing the point.
I had been expecting it to generate an XML element with the given name and namespace, and insert the payload as it’s content. i.e.
Surely there’s some other XML building class which does this already - I’ll go and have a look…
Have fun !
Smack version - 4.3.0-beta1