This is a follow up to the earlier post about accessing EJBs from python.. In this post, we will build the CSharp Console and use that to access the EJBs which are running on JBoss. This code was built and tested using Mono on Fedora 10. My hope is that someone can test out the console in a windows proper environment. CSharp to dotnet is pretty hard with all but the most vanilla WS technologies. This post shows how the Qpid Management Framework can bridge that gap.
First.. follow the directions from the earlier post to check out the latest qpid code from apache, and the latest qmf example code from github. I will assume you have the broker running, and that you have tested the python client to see that it is working.
Now, lets build the dotnet qpid code. You will need ant, mono, and nant installed.
cd qpid/qpid/dotnet/client-010 # Read the README.txt file if things go wrong cd gentool ant cd .. nant
If you are getting a nansty nunit error, do the following before running nant:
Now, we will build the test code which will use the console to access the Java Server. The example code has 2 versions. One is using the raw QMF Session interface, and is the most similar to the python code. This is located in the qmfExample/cSharpConsole/generic directory. The second has some classes which were generated off of the example schema. This code is located in qmfExample/cSharpConsole/generic. The same logic can be used to generate either one.
cd qmfExample/cSharpConsole/generic # edit your default.build and set the property qpid.dir nant # it is now built, lets run it export MONO_PATH=$MONO_PATH:[QPID_DIR]/qpid/qpid/dotnet/client-010/bin/mono-2.0/debug/ mono ./bin/QmfExample.exe
And.. Bobs your uncle. Now we have 2 technologies (python and C#) which are historically not friendly to Java, accessing EJBs running on Jboss.