Interesting idea.
![Yes [Y]](http://pics.10026.com/?src=/emoticons/emotion-21.gif)
var request = new GetApplicantInfoRequest();
request.ApplicantId = document.getElementById("ApplicantId").value;
var response = GetApplicantInfo(request); // This line calls the web service and returns the results
ShowResponse(response); // Generalized display routine
In this example GetApplicantInfoRequest, GetApplicantInfo, and the objects they return were all auto generated by the scripts based on inforamation gleaned from the web service's WSDL. The developer never even has to see the code it generates to be able to use it. (They just have to be aware of the contract specified by the WSDL interface.
Now comes Atlas and our first idea is to try to get them working together (or completely replace our own code with stuff from the Atlas library) but alas, the Atlas objects don't use SOAP (they use JSON instead), so we are currently researching ways to leverage what's provided in the best way possible.
Please keep this site posted of any headway you make in this area as this is a very active topic for us right now too.
This is *exactly* what I need. Will the web services wrapper be available anywhere?
Generic web service wrapping can be done via dynamic proxy generation as it has been done many times in the past. I have been playing with my own flavour of this, which can be found here: http://www.mscorlib.com/ajaxws/DynWs.aspx Consider it pre-alpha and not all listed services actually work, doesnt use JSON to serialize but that could be added later including the dynamic JSON proxy generation for the final client. I wanted to see what would be involved in actually getting something like this working.
The original conversation regarding wrapping services can be found here: http://forums.asp.net/ShowPost.aspx?PageIndex=1&PostID=1050756#1050756
My method above uses an early version ofhttp://ajaxpro.schwarz-interactive.de/ and some code which I had lying around which does the dynamic proxy generation of the actual WSDL endpoint.
The source will never be posted, I wanted to simply show that I can be done, and offer any help to others that want any insight as to how I did it.
I wrote a library to use "AJAX" (sync or async) to consume Web Services. You can find the article, the source code (less than 8 KB) and some demos at http://www.guru4.net/articoli/javascript-soap-client/en/
Your comments are welcome!
No comments:
Post a Comment