aspose 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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "accessing web service from firefox browser" Watch "accessing web service from firefox browser" New topic

accessing web service from firefox browser

s kirby

Joined: Sep 25, 2010
Posts: 3

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?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63039

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

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

It is sorta covered in the JavaRanch Style Guide.
subject: accessing web service from firefox browser
It's not a secret anymore!