Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with message style web service  RSS feed

 
Nitin Shivaram
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to implement message style web service and the text node under message returns null. The following is the setup.
I have a MDB waiting on a queue and i have a generated a web service on this queue. The standalone client looks up this web service to send a Document object. At the bean level i got a reference to the Element (which i presume is what is written to the queue by the weblogic provided servlet), when i try to get to the mesaage element level and then the text level i get the value as null.
Am i doing something wrong here, replies are much appreciated.
The setup:
jdk1.3.1
weblogic6.1

thanks,
Nitin
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would try to dump the entire contents of the Element to see what was really being transmitted.
Bill
 
Nitin Shivaram
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok here is the trace..
This is what i send to the web service

---------------------------------
The following is the listing of the onMessage method of the MDB.


and here is the trace on the server..
The element name is : message
The element type is : 1
The length of the node list is : 1
The node name under message is : text
The node value under message is : null

hope this helps. thanks
[ April 04, 2002: Message edited by: Nitin Shivaram ]
 
sandy comp
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
If you are using XMl (as u mentioned "Document"), then, if the node on which ur querying for text is of type "Text Node" then and then only only u'll get text associated with that node. otherwise u'll get null.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The node named text is an Element type node. It has one child, which is a text node type and contains the actual string you sent.
I know it is contrary to expectation, but the value of the Element node is indeed null, you have to get the child text node and get its value.
You should download the XML spec from www.w3.org
somewhere there is a chart about the different nodes and what the various name and value values can be.....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!