How to Access EJB on Weblogic Server 9/10 from C# Client
Use this example as a guideline to show you how to access your Enterprise Java Beans (EJB) from a .NET client, using J-Integra for .NET. This example could be deployed on BEA's Weblogic 9.1 or 10.0 Application Server.
Note: For a more detailed step-to-step instruction, please refer to this Access EJB on Weblogic 8.1 from .NET Client example.
To run the example, follow these directions:
- Download the attachment below (bea_weblogic_91_http.zip), and unzip it into any folder of your choice.
- Run Janetor to Configure J-Integra for .NET
Use Janetor tool open the \java_server\janet.xml configration file. All settings in Janetor should be already set, the only thing you need to do is to install your own J-Integra for .NET license before your test.
- Generate a Web Application aRchive (WAR file)
In Janetor, go to "File - Export web application archive". The screenshot below shows the Export web application archive window. See the documentation for Janetor for a description of all the fields. Make sure you select the correct ejb20_basic_beanManaged_client.jar from the downloaded example. Change Output file as necessary.
- Deploy the WAR file on WebLogic Application Server 9.1 or 10.0
To deploy WAR file in both Weblogic 9.1 and 10, you can simply drop the AccountEjb.war in the Weblogic's autodeploy directory:
To varify that the WAR file is correctly deployed, you could open your web browser and go to this link:
You should see the following text in your web browser:
J-Integra for .NET Servlet
J-Integra for .NET config file janet.xml has been located.
This means that your WAR file with the runtime of J-Integra for .NET have been deployed on the Weblogic Server.
- Run GenNet and Compile the Proxies (Optional)
The .NET proxies has been already generated and compiled into JanetExample.DLL, which can be found in the following example directory: \csharp_client\bin\Debug
If you want to generated the proxies yourself, please refer to the Weblogic 8.1 example proxy generation.
- Compile and Run the .NET Client
Run the premade csharp_client.exe located in \csharp_client\bin\Debug directory to start the C# client.
Or, you could open the C# project in Visual Studio 2003/2005, and modify/run the test.