Spring Web Services used by Flash client. Part 1

Posted on 17/10/2009 by Charalampos Chrysikopoulos
I will try with this post series to describe my experience with spring web services and flash web services. Those are quite different things, the first is the server side web services and the second the client side.
In the first part I will describe some things that I understood about web services. In part 2 we will see how to implement the server with spring web services and at the end in part 3 we will see how to use flash to read the wsdl and use the web services provided by the spring servlet.
I think there is no tutorial online that describes the hole procedure, I missed something like that especially in flash.
First of all why use web services with flash and no xml? There is no reason for that. Say, you have your server with the web services ready and running, so you don't want to implement the same things passing a XML with a new servlet only for this flash client. In such a case its logical to demand that the flash should understand web services and use it.
I the past, I had to write a client in java that would use an existing web service from a client. I had a wsdl in front of me and I didn't know what to do. After a while I discovered that eclipse provides a functionality to generate a client from a given wsdl. And it worked just fine (perhaps because the wsdl was well written).
Eclipse provides also the server side web services generation. I tried to use it but I found some difficulties with the procedure. So I thought it would be a nice idea to try out the spring way. The guys in springsource understand web services in an another way.
They start with the data you want to send and receive and it ends with the wsdl and the endpoint that serves. It sounds complicated but it is quite simple, moreover its simple to change it. Changing the web services is more important than implement them.
The wsdl is a document that describes the web service. It contains all the necessary information
that the client needs to understand what to sent and he will get. If you are lucky, you will sit in from of an IDE that requires the wsdl and it will generate a client for you. In java there are many tools that do this (eclispe), in other languages I have no idea.
SoapUI is a nice tool (and free) to try and test your web services. Its written in java so its platform independent and gives many information and a ergonomic user interface to work with.
Now, Flash. Flash is not a tool for programmers. For them flex is the right tool. Flash
This entry was posted in flash, spring, web services, wsdl and tagged by Charalampos Chrysikopoulos