Bugzilla – Full Text Bug Listing
|Summary:||wsrf-query with a bad XPath query returns "null"|
|Product:||Java WS Core||Reporter:||Charles Bacon <firstname.lastname@example.org>|
|Component:||globus_wsrf_core||Assignee:||Jarek Gawor <email@example.com>|
ip-156:~/pkgs/globus-4.0.2 bacon$ bin/wsrf-query -s http://220.127.116.11:8888/wsrf/services/DefaultIndexService Foobar null This is the same result as if there were no results returned: ip-156:~/pkgs/globus-4.0.2 bacon$ bin/wsrf-query -s http://18.104.22.168:8888/wsrf/services/DefaultIndexService '/Foobar' null I would suggest that the first should generate some kind of "Invalid XPath expression: Foobar" error, and the second should return something like "No results found for XPath expression '/Foobar'". We saw the "null" result in a tutorial today, and it didn't help the student understand what had gone wrong.
Both expressions are valid. I will, however, update the client to display a nice error message if no results were returned.
Committed a fix to trunk to display a nice error msg when no results are returned: $ wsrf-query.bat -s http://192.168.1.102:8080/wsrf/services/ContainerRegistryService foo Query did not return any results.