Home : Relative Paths in GenJava, GenNet and GenService
Q48796 - INFO: Relative Paths in GenJava, GenNet and GenService

Relative Paths in GenJava, GenNet and GenService

 

Contents

  1. SYMPTOMS
  2. CAUSE
  3. RESOLUTION

SYMPTOMS

When selecting an assembly for GenJava, generation will fail if the path is not located on the GenService machine. Similarly, when specifying the output path in GenNet, generation will fail if the path is not located on the GenService machine.

CAUSE

There is a source of confusion when it comes to specifying relative paths using our GenNet or GenJava tool. This confusion has to do with the role that GenService plays and which tool creates the proxies. This is different (depending on whether GenJava or GenNet is invoked) and obviously implies where the proxies will be output to (either on the GenService machine or the GenJava/GenNet machine). Of course, things are simplified considerably when GenService and GenJava/GenNet are installed on the same machine.

GenService is a .NET component hosted as a Windows Service. Its function is two-fold, depending on whether GenJava or GenNet is invoked.

GenJava

GenService's function is to read a .NET assembly and send back a XML description of the assembly, so that GenJava can parse this XML description and construct Java proxies. Thus, the location of the target assembly is relative to GenService and must be a directory located on the same machine that GenService is installed on. The output path, however, is relative to GenJava, and must be a directory located on the same machine that GenJava is installed on. This is because GenJava creates the Java proxies.

GenNet

GenService's function is to generate .NET proxy code (in C#) from specified Java classes. GenNet first generates an XML description of the specified Java classes and passes this string to GenService, which parses and constructs the proxies. Thus, the location of the Java classes is relative to GenNet and must be in the classpath of where GenNet is installed on. The output path, however, is relative to GenService, and must be a directory located on the same machine. This is because GenService creates the Java proxies.

RESOLUTION

To avoid any confusion, an absolute path should be specified for the location of the .NET assembly, or the location of the output path. Furthermore, to summarize the above explanation, these absolute path locations are relative to GenService when it comes to specifying a .NET assembly (GenJava), or specifying an output directory (GenNet).

Status

There may be future enhancements to make this easier especially when GenService is installed on the same machine as GenNet/GenJava.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 7/10/2006.
Last Modified by No Author Name Available!.
Article has been viewed 7963 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article