NK4.0.2: JMS Transport Documentation

Poster Content
nk4um Moderator
Posts: 485
February 22, 2010 11:25
Hi Jeremy sorry about the sparseness of the documentation for JMS still it''s great that you found the answer in the source code. We are going to be having another round of documentation refinement soon which will increase the coverage of reference documentation.

The HDS you''ve found will transrept to XML. What the transreptor does in this case is insert a <hds> root node so you end up with this:

<hds>
  <name>value</name>
  <name>value</name>
  <name>value</name>
</hds>
nk4um User
Posts: 79
February 21, 2010 22:21NK4.0.2: JMS Transport Documentation
In the JMS Transport Documentation
/book/view/book:tpt:jms/doc:tpt:jms:transport

it is stated that the header and properties can be sourced from the context as HDS or XML. But an example of the XML is not provided. I had to unpack urn.org.netkernel.tpt.jms-0.3.0.jar to see that it is valid HDS but not well formed XML (no root element):


HDSBuilder b=new HDSBuilder();
      for (Enumeration e=aMessage.getPropertyNames(); e.hasMoreElements(); )
      {   String propertyName = (String)e.nextElement();
         String propertyValue = aMessage.getStringProperty(propertyName);
         b.addNode(propertyName, propertyValue);
      }
      properties=b.getRoot();


The code above produces:


<name>value</name>
<name>value</name>
<name>value</name>


Which I believe would fail if you attempted to source this as a document.