 |
|
 |
Subject: XPages, Beans, Web Services and Javascript, continued...some success. |
 |
 |
 |
Product Area: Other |
 |
Technical Area: Application Development |
 |
Platform: ALL |
 |
Release: 8.5.1 |
 |
Reproducible: Not applicable |
 |
 |
 |
 |
I recently posted a question about Javascript SOAP web services:
http://www-10.lotus.com/ldd/nd85forum.nsf/5f27803bba85d8e285256bf10054620d/87f9270dabc9c8bc8525776e0036e2df?OpenDocument
...a problem I have solved. I can now call my web services from JS. I am refining this code, but will post in forum for anyone that is interested.
Quick bit of background: current project I am working on, they would like a complete separation of ui and logic using MVC pattern, the premise being: the application could be surfaced\ accessed via the web services in a java app, or whatever you want (they may decide to move to SQL backend, the whole app might be moved off Domino). It means we will hardly be using any of the JSF functionality, all requests will go via the web service(s).
I'm right at the edge of my knowledge here, but my question is: if I use backing beans for my data bean and model bean, how can my web service "access" my model bean? I invoke a JS ajax POST SOAP request on web client, I can successfully contact my web service and get responses. My web service(s) can "access" any java (or lotusscript) script libraries I have, but I don't know how to get to the web service to access java classes in the WebContent/WEB-INF/src folder. My primary reason for this is: my web services will get access to the scoped variables...due to above problem, I can't test this, but I am hoping I am correct.
There are a whole list of things I can think of that are going to make this more complicated, since I won't be able to bind to any forms\ beans etc. If I am correct, the submit will actually serialise the form and submit to web service, I can't POST the form to the server...to keep an absolute separation of logic and HTML.
One way I am thinking of is a mixture of the 2: design the system using beans and surface that through to the xpage(s). As we go along, build up the Web Service API, so as we get to some piece of functionality, we could do a MyBeanObject.GetSomeProperties() or MyJSClientObject.GetSomeProperties() which gets values through Web Service.
....But, if I can get my web service to the bean, it's a write once operation, else I also have to move code to traditional Java library.
My head is swirling a bit at the moment and I've been waffling...so any comments, suggestions would be greatly welcomed.
Nick
 
Feedback number WEBB87YJAL created by ~Holly Quetfookony on 08/03/2010

Status: Open
Comments:

XPages, Beans, Web Services and Jav... (~Holly Quetfook... 3.Aug.10)
. . Yes, we are interested, post the co... (~Tate Xantumize... 4.Aug.10)
. . . . Ok...here's what I've got... (~Holly Quetfook... 4.Aug.10) |
|  |
|