> I want to write a client which can access an EJB.
That's easy. :)
> The problem is, that this client should only get a XML-document with
> information about the EJB and should access the EJB with the information of
> the XML-Document. Any needed interfaces or jar-files should also only
> transported to the client in the XML-file.
That's hard. :)
The only thing I could imagine you doing would be to transport the
bytecode files base64 encoded in an xml message from the server to the
client. The client could then parse the xml message, determine JNDI
names, class names, etc, and then (using a custom classloader)
dynamically load the extracted client stub sent in the xml message,
narrow it, and return it to the caller.
Since the caller doesn't know the interface until runtime, the caller
is going to have to rely on reflection to load methods and execute
them. This is going to be messy any way you cut it, if you use Java.
You might want to consider looking into a system whereby you expose
your server side ejbs via CORBA and use python to bind to them on the
client side. This of course is a huge programming shift, but python
is a more dynamic language that's perfect for this kind of thing.
-c