![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Communicating with DOORS Topic Summary: Cummunication with DOORS from other programms Created On: 26-Feb-2008 22:20 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
Hello everybody,
I'm currently looking for the best solution on establishing a connection with DOORS and cummunicating with it from an own written programm (language might be C# or Java). The problem I'm facing is the fact that I can't find any code sample or similiar on how to do such a thing. I've searched the manuals as well as this forum. So far, I see these solutions: 1. Communicating via OLE 2. Cummunicating via IPC Running scripts from command line using dxlips ord dxlipf is very limited. For solution one I've found some example, but not for the second. I've read on this forum that apiSend or apiReceive can't handle more than 2KB. Furthermore, could anyone help me on how to use initDXLServerV2, there seems that the documentation fails on describing it. As I said before, I'm a still new to IPC communication so it would be nice if anyone could give me more information or even example code on how to use it with DOORS. Thanks in advance! |
|||
![]() |
|||
![]() |
|||
If you haven't already found it, there is a section in the DXL Reference Manual on "Controlling DOORS from applications that support automation". It's (erroneously) under the "Partitions" section in the 8.1 version, though I think they fixed that in 8.3.
It describes the OLE interface, and provides examples of controlling DOORS via VB macros in Excel. One note, we've been able to use the macro examples via Excel successfully, but had trouble connecting to DOORS with this interface from ASP.net (actually I think it might have been a VBScript inside it, or something along those lines). We have been able to control ClearCase from the same application, so we never did figure out where the problem was. Don't know anything about the IPC stuff... Chris |
|||
![]() |
|||
![]() |
|||
Thanks for the info, I'll give it a try, and let you know how it works or not...
Allthough I'll still be looking on a solution using IPC, so if anyone knows... Edited: 29-Feb-2008 at 09:57 by Beniamin Longodor |
|||
![]() |
|||
![]() |
|||
As I'm new to OLE as well as to IPC, do you know if there is any possibility to communicate with DOORS over OLE without having Doors to be opened, something like batch mode?
|
|||
![]() |
|||
![]() |
|||
Search for batch in the DOORS help file.
There are two topics you'll want to look at: - Running DOORS in batch mode - Summary of command line switches That should get you started. Basically you need to make a command line call with something like: C:\> doors -b dxl_programs\batch_analysis.dxl -p Car -u "Jill" ------------------------- Scott Boisvert Engineering Tools Administrator L-3 Communications - Avionics Systems scott.boisvert@l-3com.com |
|||
![]() |
|||
![]() |
|||
Actually there is not much about batch mode or command line switches in the manuals I searched through.
In fact I know how to use a batch file or a command, but I don't really know how to communicate with the Doors Server (batch mode) through IPC, that's what I'm actually looking for. |
|||
![]() |
|||
![]() |
|||
Hi,
I worked my way through trial and error during the past few days and I got a working communication between Java and DOORS. Please correct me, anyone, if you know better than me (which is quite possible). Some facts, before I go into detail:
So after these initial topics, I'll describe roughly what I'm doing - I want to do as much in my Java project as possible. If you have other requirements, you can adjust the architecture to your needs. In Java I prepare a server TCP socket in order to directly receive an answer from DOORS. (The other alternatives, like executing a command line and reading STDIN, OLE automation, clipboard communication or temp file creation have been discussed in other threads already, and I don't really like them ...). This server socket is listening in a separate thread. Then, I prepare a string: a DXL script to be executed. This DXL can send an answer to my Java program by opening an IPC client connection (read: TCP connection) and sending back the information. Here is a hello world example: String script = "ipc = client(4000, \"127.0.0.1\") \n" + "send (ipc, \"Hello Java!\") \n" + "disconnect ipc \n" + "delete ipc \n"); I then use a simple JNI method to do apiConnectSock, apiSend, etc. As described above, the answer is sent directly to the Java thread where the server socket is listening. This thread reads and concatenates everything it is sent (so the 2k limitation should not be a problem, if the output is split and sent in smaller bits.). I didn't go too deep inside the 2k limit, but my first guess would be that it has to do with send and receive buffers of the socket. After returning from the JNI method, I wait for the receiver thread to finish and read the string it received. A good way to encapsulate data should be using XML (as described, e.g., L=here]https://forum.telelogic.com/customer/doors/messageview.cfm?catid=17&threadid=9012[/L]). In the attached ZIP is my complete hello world program including the Java and C++ code. I hope this does help some of you. BTW, I also tried communicating with the DOORS DXL server directly from Java by opening a TCP socket and writing DXL to it. However, the server reports that it fails to get an acknowlege reply from the client and stops without sending anything back. So there is some kind of additional protocol on top, so I think there is no way other than using the C API for the initial communication. Maybe there would be a way to write a custom TCP DXL server which could be connected directly from Java using the batch code in chapter 4. But I am not sure about that. Regards, Stefan Winkler
|
|||
![]() |
|||
![]() |
|||
Stefan,
Thanks for the Java lesson - this may be useful to me. I think the end of the message has to be marked if its a long rtf string. I have something like the following - think it was swiped from someone else - but forget who - apologies to the author! Now how to stream the output to WORD and convert into word xml! An interesting project and something I probably don't have time to do. Its also something that DocExpress should do - sorry to go off topic. You should apply for a job on the docexpress team! ------------------------- Regards, Richard Good |
|||
![]() |
|||
![]() |
|||
Thanks a lot Stefen, you code example helped me a lot.
I've yet a problem when trying to start the DXL server from batch-mode: I can send something to DOORS but trying to receive a message from DOORS, I get the following exception: Does anyone have any solution for this or a workaround? Edited: 5-Apr-2008 at 00:13 by Beniamin Longodor |
|||
![]() |
Telelogic DOORS
» DXL Exchange
»
Communicating with DOORS
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.