Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

accessing web service from firefox browser

 
s kirby
Greenhorn
Posts: 3
  • 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
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
  • 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
  • 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
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!