I’ve been through countless examples and can only get a web service to spit back a single result. And that took about two weeks and a derivative of several examples.
Can you tell me if I’m wasting my time trying to get this to work?
I want to create a web service that accepts a document unique ID.
It will return all the fields on the document, including attachments and rich text (body fields that could contain tables, pasted spreadsheets, etc.)
Is this even possible, or should I go to plan B which is to buy a tool to export everything out of Notes and work with it in the destination system?
Subject: Web Service in R6 — wasting my time?
You may be able to as follows.
Create a form with (at least) a RTF in it.
Add a post-open event that reads the UNID of the document you are interested in.
(That might well be the same document that you are opening using this form)
Iterate through all of the items in the document, and populate the RTF with a report of all each one.
Subject: In short, no, but it’s easier with R7 (grin)
-
Not having R7 myself, I’ve done things like this with R6, and each system uses the same basic idea: Use an external JVM to do the actual web service protocol. The Domino end uses that external JVM as necessary to perform web services functions, like deliver content using MTOM.- There are two ways to do that: First and simplest to implement is use Runtime.exec in the Domino Java code invoke a command-line, but that will only really work with a web services client, and you’re trying to do a server.
-
Second is to write a server, a proxy essentially, that’s an RMI server on one end and a web services server on the other. RMI is Java 1.3 compatible, so Domino can talk to the RMI side directly, and the RMI server can be written using a newer JVM, so the web services side can speak “web service”. This is considerably more complex to code, but it works pretty well, even directly from the Notes client.
-
As for getting the data out, I’d use the DXL suggestion. If your application can’t understand DXL, simplly run it through an XSLT filter to convert it, which should be doable at either end. I do this same thing in reverse for one system … get XML, use XSLT to convert it to DXL, and import that data with one command in Domino.
-
Or you could use Tomcat or JBoss as web services container and configure them to communicate with Domino, which I believe is typically done as a servlet. I’ve never done this, but I’ve read about it being done, and working pretty well.
-
Don’t give up, Dan. It’s doable. It’s just not easy. (heh heh)
-
Hope this helps…
Subject: So Agent/Script Library is not the way?
So all the examples I’ve seen with the “WebService” agent, “Domino” script library and “WSDL” page won’t be able to do what I want? I understand it can get a web service working, but will I hit a brick wall when I actually try to start sending rich text and attachments?
The other suggestions sound like it’s getting more complicated to do this. It would be nice to learn that stuff, but I don’t know if I’ll have the time. I’m having a real hard time finding working examples for any of this stuff out there.
The external system is a ColdFusion-based CMS called FarCry.
The whole point for this was to only copy over the documents as they’re needed (via a WebService) as opposed to just dumping everything out of the Notes DB into FarCry. I figured why export all the garbage when they might only need 1/4 of it? But maybe at the end of the day, it’ll be easiest just to fully export everything into FarCry and they can clean it up in there.
Subject: Dan, by the way, we have a XML and web services course
See New course - Using XML and Web Services in Notes and Domino 7
It is heavy on Java and LotusScript but it does use ND7.
Howard
Subject: RE: So Agent/Script Library is not the way?
-
Sorry Dan, busy busy beaver, me. Reverse Polish RMI system is now fully functional for seamless integration of MTOM-based web services into both the R6 server and client. Man that was tough! LS2J is a finicky beast.- I know of no way what-so-ever to get R6.x to directly consume an attachment from a web service, nor source one. Its JVM is plain and simple too outdated to support the technologies required. I’ve been doing SOAP with R6 for years, and despite hundreds of hours spent on the task, I never, ever do SOAP from Domino. Period. I hack a link from Domino to the web service using an intermediate JVM that’s new enough to do what I need.
-
That doesn’t mean my way is the only way. I just means I’ve never found another way. I can’t address if R7’s only slightly newer 1.4 JVM will suffice or not, but I do know the latest SOAP protocol is MTOM, and that requires 1.5.0_09 or newer, so 1.4 is still behind the power curve by a considerable margin. It could easily do DIME, though I’ve never seen R7 so I can’t say for sure.
-
Hope you got this figured out…
Subject: How about DXL?
That will export everything in the document as DXL. Would you then be able to use that in your destination system?
You can use an agent to do the export of the document after passing in a UNID.
Howard