File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes accessing web service from firefox browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "accessing web service from firefox browser" Watch "accessing web service from firefox browser" New topic
Author

accessing web service from firefox browser

s kirby
Greenhorn

Joined: Sep 25, 2010
Posts: 3
Hi,

I have a web service running under apache tomcat 6.0.26 and Axis2. I can talk to it just fine via my java client. I wondered if it was possible to access it via the URL in a browser. My question concerns the argument it takes, which is an array of 5 strings. So when I give the url, http://(my ip):8080/axis2/services/MtkService/determineBestGroup?args="str1 str2 str3 str4 str5", it accesses the WS (I see it in the tomcat logs), but only sees one string so fails. If I use args={"args1","args2","args3","args4","args5"} (i.e., java syntax) it isn't liking that either. Any suggestions?

Thanks,
thinrunner
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61198
    
  66

URL data must be properly encoded. Look up "URL encoding".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
I assume you have implemented SOAP based webservice. In that case you cannot access a webservice with a GET request which you are trying to do. When you are using java client it must be creating SOAP envelope to call your webservice so its working fine.

Invoking a webservice through URL work fine for REST based service.


SCJP 1.5(97%) My Blog
s kirby
Greenhorn

Joined: Sep 25, 2010
Posts: 3
Thanks Bear and Shivendra for your inputs. Looking up URL encoding has been very enlightening!

Regards,
thinrunner
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accessing web service from firefox browser