This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60741
    
  65

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
 
Consider Paul's rocket mass heater.
 
subject: accessing web service from firefox browser
 
Similar Threads
how to pass an array of strings as an argument to a web service
web service client should send file
Webservice client code generation using axis2 and eclipse galilio
Axis2 wizard problems in eclipse
How to do Bulk data transfer using Web Service