Re: Exposing my models as webservices

"Michael Nash JGlobal.com" <[email protected]> Tue, 6 Jul 2004 20:29:40 -0400
Newsgroups gmane.comp.java.keel.devel,gmane.comp.java.keel.user
Organization JGlobal
Message-ID <20040706202940.49605df0@jglobal>
Nate:

> Well, I was really attracted to Keel because I knew this type of situation was
> going to come up for my application: I need to expose the entire application as
> a set of webservices (this is because the client now longer wants a jsp/struts
> front end, but one in Flash.  And I think the Flash GUI calling webservices
> might be the niftiest solution.).  So hopefully my expectations worked
> out...but I have a couple questions. 

I'd be happy to try to assist...

> How may I ask have people done this?  From just a quick glance at clnt-axis, it
> looks like Keel basically just exposes a generic webservice and it expects a
> model name plus whatever params the model is going to need. 

I've done it on 2 projects so far, and yes, you're quite right, it's a generic webservice - just like all the other client models.

> So you had to
> hand-roll your WSDL file to describe what those parameters are (can't use
> Java2WSDL of course).  But isn't that a pretty messy service description for
> that one webservice if you want to expose a bunch of models.   There would be
> lots of optional elements in there that only get used depending on which model
> was specified.  

But that's the whole idea of the Model service - to have a single interface to different UIs. The UI level is where you can specialize - e.g. in one of the projects I did with Axis, it was JSP on the front-end, using clnt-struts and comm-axis to talk to a server running clnt-axis. The JSP's looked *exactly* like the JSP's you'd use in a single-vm Keel project. So did the models, and the system.xconf - the only thing different was the fact that we were using Axis as the transport. In the situation for Flash, I can't say exactly how it would be done, but if you can parrallel clnt-xxx, the same thing should be possible there, with no need for a specialized WSDL for each model.

> Maybe I could break it out in the wsdl file by naming each model as a different
> service, but then the client still has to make sure they call the service with
> the model name.  
> 
> An alternative I am thinking about is creating a Java class as a proxy to each
> model that I want to expose as a service (or group them in the proxy), and then
> deploy the proxies with traditional Axis tools like Java2WSDL. 

Quite possible, and probably, as you say, "automatable" - e.g. you could generate the beans, or even use DynaBeans (like we do in clnt-struts).

Let me know how it goes and if I can help out at all!

Regards,

Mike
> Thank you so much in advance. 
> -Nate  
> http://keelframework.org/documentation
> Keelgroup mailing list
> [email protected]
> http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com


-- 
Michael Nash

JGlobal Ltd 
Next-Generation Web Application Development and Open Source Support
http://www.jglobal.com

Bahamas Commerce and Trade
Offshore eCommerce Hosting and Business Services
http://www.bahamascommerce.com

http://keelframework.org/documentation
Keelgroup mailing list
[email protected]
http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com