1 Reply Latest reply on Jun 14, 2011 4:53 AM by Bill Bo

    problems using the ReST interface

    Bill Bo Newbie

      I am probably the only person even trying to use the ReST interface, so I doubt I'll get much help.  But I am stuck, so I'll give it a shot.

       

      Basically I am running the "push" example, but I am rewriting the PostOrder part of it to actually use ReST instead of JMS.  (It is sad in general that the ReST examples are mostly just JMS.  But I digress.)

       

      The first thing is that when I go to the URL hosting the queue in FireFox I get this:

       

      XML Parsing Error: prefix not bound to a namespace

      Location: http://10.10.24.26:8080/emb/queues/jms.queue.orders

      Line Number 1, Column 37:<queue><name>jms.queue.orders</name><atom:link rel="create" href="http://10.10.24.26:8080/emb/queues/jms.queue.orders/create"/><atom:link rel="create-with-id" href="http://10.10.24.26:8080/emb/queues/jms.queue.orders/create/{id}"/><atom:link rel="pull-consumers" href="http://10.10.24.26:8080/emb/queues/jms.queue.orders/pull-consumers"/><atom:link rel="push-consumers" href="http://10.10.24.26:8080/emb/queues/jms.queue.orders/push-consumers"/></queue>

       

      The first thing we see here is that "link" is preceded with "atom:" and that is why FF won't parse it nicely.  How can that be fixed?  I mean, I sure would like it if FF would draw the XML nicely like it does with other XML.

       

      My group uses Jersey for everything, so I am trying to do it with Jersey instead of with RestEasy.  When I hit that URL with jersey it returns a 200 response, but there is nothing in the headers and nothing in the links.  Could this be related to the namespace issue FF is seeing?  Do you have to somehow tell Jersey to use a specific namespace?  What namespace is that?  How can you tell it?

       

      The last thing that is confusing me is that the bit of ReST code in the example uses "msg-push-consumers" as the link name.  This is also what the docs say to use.  But if you look at what FF printed above the rel= just says "push-consumers".  How does that work?

       

      Thanks for any suggestions.

        • 1. Re: problems using the ReST interface
          Bill Bo Newbie

          I hate that when people follow up to their own message.  I don't know what I did, but this much is working now.  It is returning the headers.  And they do start with "msg-".  Still don't understand why, or what namespace is being used here.  If you have any answer to that, please share.