简体   繁体   中英

How do I remotely call a web service Programmatically?

I'm a bit new to web services and I have encountered a problem.

I need to access a remote web service through a java class, but I haven't got the foggiest idea how to do so.

If anyone could point me in the right direction I would very much appreciate it.

Something like this: http://download.oracle.com/javase/tutorial/networking/urls/connecting.html

Basically you construct a URL (that points to the web service), and you connect to it, read its response, etc.

The "Next >" link on this page will explain further. Follow the trail and you should be on your way.

There are several good libraries that abstract away all the gritty details for you. Google Java HTTP Client is a good one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM