OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

document server with OO

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
eckobar
General User
General User


Joined: 20 Jul 2006
Posts: 35

PostPosted: Fri Sep 08, 2006 3:28 am    Post subject: document server with OO Reply with quote

hi.

i want to do the following steps:
1. enter some data in normal openoffice GUI, realized with macro
2. send this entered data to a UNO Service
3. uno service is programmed by me and call a webservice somewhere on the web to get information according to entered data
4. webservice delivers me a complete finished oo document
5. show document from webservice in OO
6. save / print / edit / delete getted document

now i have following questions
1. is it true that i need a self designed UNO Service to communicate with the webservice?
2. can i use nearly all (jdom,log4j,...) functionality in such a self designed UNO Service?
3. are the steps to do, correct or is there a better way?

would be very very thankful for helpful information. looking to hol.sten which helped my a lot in the past.

mfg
eckobar
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Fri Sep 08, 2006 11:06 am    Post subject: Re: document server with OO Reply with quote

eckobar wrote:
looking to hol.sten which helped my a lot in the past.

Ok, here I am, although I didn't fully understand what you want to accomplish.

eckobar wrote:
i want to do the following steps:
1. enter some data in normal openoffice GUI, realized with macro

Why does this have to be an OOo GUI?

eckobar wrote:
4. webservice delivers me a complete finished oo document

So your remote service runs OOo too?

eckobar wrote:
now i have following questions
1. is it true that i need a self designed UNO Service to communicate with the webservice?
2. can i use nearly all (jdom,log4j,...) functionality in such a self designed UNO Service?

Sorry, no idea, because I never needed to write an UNO service.

eckobar wrote:
3. are the steps to do, correct or is there a better way?

Better? That depends on what you really want to accomplish. I would try another approach: I would write a Java application to handle the listed tasks:
- Show a GUI to enter some data
- Communicate with a Web Service
- Receive an OOo document from the Web Service
- Open OOo with the received OOo document for saving, printing, editing.
This approach looks like some OOo-UNO-API programming and a lot of pure Java programming.

With kind regards
hol.sten
Back to top
View user's profile Send private message
eckobar
General User
General User


Joined: 20 Jul 2006
Posts: 35

PostPosted: Fri Sep 08, 2006 3:37 pm    Post subject: Reply with quote

thx hol.sten for your reply.

it is very very important to use openoffice GUI because it is wished (by customer) that no other gui components are used (probaly for usability).

yes it is true, that my remote service (webservice) also run a oo api.
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Sat Sep 09, 2006 3:35 am    Post subject: Reply with quote

eckobar wrote:
it is very very important to use openoffice GUI because it is wished (by customer) that no other gui components are used (probaly for usability).

Ok, so you don't want to convince the customer, that there may be an easier approach.

Before I would delve myself into programming an UNO service, I would at least try a beanshell solution:
- Write the OOo GUI in OOo Basic
- Call from OOo Basic some Beanshell functions (http://www.oooforum.org/forum/viewtopic.phtml?t=16251)
- Call from the Beanshell functions my Java application

Beanshell is Java, so if this approach works, I may not need an UNO service and only a little OOo Basic part.

Another possibility is JavaScript: http://www.oooforum.org/forum/viewtopic.phtml?t=21564

With kind regards
hol.sten
Back to top
View user's profile Send private message
eckobar
General User
General User


Joined: 20 Jul 2006
Posts: 35

PostPosted: Sat Sep 09, 2006 5:55 am    Post subject: Reply with quote

hi hol.sten!

problem with customer is, that customer is an agency which is not very flexible. *gg*

thx, for explanation which steps are needed.

first question:
is the "Beanshell" you told, the same like http://de.wikipedia.org/wiki/BeanShell ???

second question:
do you think it is easier and faster to learn OO Basic (parts which are need, not the whole language. *gg*) and Beanshell handling, than to write a UNO service??? is a UNO service too complex or could I get not the wished functionality???

thx for you work.
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Sat Sep 09, 2006 11:25 am    Post subject: Reply with quote

eckobar wrote:
is the "Beanshell" you told, the same like http://de.wikipedia.org/wiki/BeanShell ???

Yes, it is this Beanshell http://beanshell.org/.

eckobar wrote:
do you think it is easier and faster to learn OO Basic (parts which are need, not the whole language. *gg*) and Beanshell handling, than to write a UNO service??? is a UNO service too complex or could I get not the wished functionality???

If you know Java, then you know Beanshell. That is not a big step. And I think that you need OOo Basic anyway. So my suggestion is, that if my idea works, you don't need an UNO service.

With kind regards
hol.sten
Back to top
View user's profile Send private message
eckobar
General User
General User


Joined: 20 Jul 2006
Posts: 35

PostPosted: Sun Sep 10, 2006 12:35 am    Post subject: Reply with quote

ok, will grap some informations about oo basic and beanshell. will inform you about my progress, probably i will need your help too, if i had some problem *gg*.

thx
Back to top
View user's profile Send private message
eckobar
General User
General User


Joined: 20 Jul 2006
Posts: 35

PostPosted: Fri Sep 15, 2006 4:43 am    Post subject: Reply with quote

hello hol.sten!

today i had some time to make a very very simple proof of concept of the document server. your explanations were true and very helpful, only with one exception ... i didn't need any oo basic .. only java and beanshell.

maybe you could help me with the following problem http://www.oooforum.org/forum/viewtopic.phtml?t=43686 ... made new thread for thematical differences
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Fri Sep 15, 2006 10:05 am    Post subject: Reply with quote

eckobar wrote:
today i had some time to make a very very simple proof of concept of the document server. your explanations were true and very helpful, only with one exception ... i didn't need any oo basic .. only java and beanshell.

So, please tell here, how you solution works. I'm curious about it and it might be helpful for others, too.

With kind regards
hol.sten
Back to top
View user's profile Send private message
eckobar
General User
General User


Joined: 20 Jul 2006
Posts: 35

PostPosted: Fri Sep 15, 2006 1:46 pm    Post subject: Reply with quote

1:
i scripted a very simple beanshell script ... the documentation on beanshell.org delivered my enough information. i tried to set some text in oo document, etc. also very helpful: openoffice >> tools >> macros >> manage macros >> beanshell >> add macro ... than you have some basic routines to set text and get some very important objects like the xcomponent and xdesktop.

2:
i compiled some java classes with eclipse and packed them into a jar file. in my proof of concept all classes are only with dummy functions

3:
tried to use java classes with beanshell script ... is very easy ... only the classpath must be set correct to find the jar files.

4 (here is the really interesting part):
run a beanshell script which calls a java function, which delivers a whole new document as stream .... getting the oo desktop object ... extract the componentloader ... load new document in new window from stream ... FINISH

it is really easy to use beanshell and make a connection between beanshell + java + openoffice.

in this stage of my project i scripted only a proof of concept for my boss ... took me 1 hour.

in future stages i want to encapsulate the whole logic into my java classes, also a little gui swing dialog for some user choices are planned.... the document generation should be done with a webservice (designed by me *gg*), which is running anywhere on the web.

if someone need more informations or is interested in any way, you can contact me nfs[at]eckobar[com].
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group