Re: how does one talk to a web service? What makes something a web
service?
Richard Maher wrote:
"Arne Vajh?j" <arne@vajhoej.dk> wrote in message
news:4a482d80$0$48233$14726298@news.sunsite.dk...
Andrew wrote:
On 28 June, 22:51, Arne Vajh?j <a...@vajhoej.dk> wrote:
Andrew wrote:
I thought I knew what a web service was but now I am not so sure. I am
still learning java and come from a C++ background. The way people on
my project talk about web services reminds me of the C++ CORBA
servants I used to write. In which case we would use WSDL instead of
OMG IDL. But I have seen the code of some of the sruff they say is a
web service and it does not seem like a service to me. For a start,
there is no WSDL. There is a spring MVC controller responding to a URL
pattern. People can go to the URL and do admin type things from the
web page. That doesnt seem like a web service to me.
I have been asked to work on a process that has to talk to such a
'service'. How would be this be done from java please? Since AFAICS it
is just a web page I would have to talk HTML, post a request and get a
response etc. That doesn't seem the right way to use a service to me.
It seems far too low level. The equivalent in my old world would be
for someone to say that I would be talking to a CORBA service and then
I find I am expected to code it using raw sockets and working directly
with the low level CORBA data transmission protocol.
A web service is:
program---web service
not:
browser---web app
If they do not expose a SOAP interface (documented with WSDL), then
you may need to use (Http)URLConnection or Jakarta HttpClient to
send requests.
There is no WSDL. I think they are expecting HttpClient to be used. I
don't call that a web service.
It can still be a web service.
If it expects and returns XML I would still consider it a
web service.
How 'bout JSON?
It does not have to be XML. It could be JSON. Or it could be CSV.
Typical JSON is used in AJAX context.
Whether AJAX calls for data are web services calls or just part
of a web app is debatable.
I would consider the calls from a RichFaces web app to be
part of the web app, but calls from a GWT app to be web service
calls.
WebSockets?
WebSockets is transport not content. I think we will need to
see some usage before we decide on whether it is a candidate
for web services.
Web services does not have to be over HTTP.
> Binary?
Possible, but there is a fundamental conflict between the web
portability and binary format.
PS. How many people have seen a serious WS-Security implementation as
opposed to poking an application-specific Username/Password into the SOAP
headers or an XML variable?
I have seen both.
Arne