• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JSTL - x:parse vs. Jakarta - xtags:parse

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys,

I've been struggling the last days trying to send and receive data to/from a webservice. Only today I got it up and running 100%, but I there is some questions in my mind that I haven't been able to answer.

First I have used the jakarta iolib to send the SOAP envelope and everything turned out alright. I processed the response as XML and used AJAX tp parse it. But my company said that they didn't want this solution, because the people who would use the software couldn't/mussn't use any javascript. So the solution was to send, receive and parse the response in a single jsp file. Not much MVC, but I had to get that up and running FAST. Anyway, I thought that would be an easy bet, all I had to do would be to encapsulate the output of the <io:soap> in a JSTL's <x :p arse> and get the info I needed using some <x ut> and XPATH here and there. but, alas, that didn't work. All I got was a [document:null] response. As if the response I got from the webservice was not XML, even though my browsers parsed it as XML alright, so did AJAX. Turning a long story short, when I used Jakarta's <xtags :p arse> everything worked seamlessly, even though the content was the same. Then, with jakarta, I could parse, retrieve and use the SOAP's response using my terrible XPATH skills.

what happened? Why did Jakarta's tags worked and the JSTL xml tags didn't? Why JSTL didn't recognize my content as XML?

Hear from you, guys!

----------THE CODE-------------

Oops! I was dealing for so many time with this, that everything related to my post seemed self-evident to me!

here goes the code:

This one works all alright:



this one don't (can't even apply any XPATH):


[ February 14, 2006: Message edited by: Fabio Fonseca ]
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry but I have used up my allocation of mind reading powers for the day.
Without seeing a little bit of code showing how you applied the JSTL/XML parser etc etc, you're not going to be able to get much help.

Oh, and when you make a post, you can click the checkbox to "Disable smilies in this post". It stops the forum fubaring your custom tags.
If only there was a way to switch it on by default.
 
Fabio Fonseca
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey Stefan,

I edited my first post with the code. What would be best? just add a new reply or editing the post do the trick?

thanks in advance!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic