• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accessing web service from firefox browser

 
s kirby
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URL data must be properly encoded. Look up "URL encoding".
 
shivendra tripathi
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
s kirby
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear and Shivendra for your inputs. Looking up URL encoding has been very enlightening!

Regards,
thinrunner
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic