Hello All,
I'm having trouble running Axis2 Client in a SessionBean. I'm using Axis2-1.1-SNAPSHOT, EJB3 on JBoss 4.0.4.GA.
My Session Bean Method:
public
void test() {System.
out.println("Hello World !");try
{
ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(
"/repository",
"/axis2.xml");
// Rest of the code is not pasted here
}catch(Exception e) {
e.printStackTrace();
}
}
My EJB jar directory structure.
EJBTest.jar/repository/modules/rampart-1.1-SNAPSHOT.mar
EJBTest.jar/axis2.xml
EJBTest.jar/com/**/*.class
I have placed the generated Stub , Handler and all the axis2 libraries in a separate jar. The Session Bean has no problem accesing those classes.
The following exception is coming when running the bean method.
org.apache.axis2.AxisFault: System can not find the given axis2.xml /axis2.xml
10:41:24,577 ERROR [STDERR] at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(
FileSystemConfigurator.java:111 )10:41:24,577 ERROR [STDERR] at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(
ConfigurationContextFactory.java:61 )10:41:24,577 ERROR [STDERR] at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(
ConfigurationContextFactory.java:180 )10:41:24,577 ERROR [STDERR] at com.ejb.tutorial.BookTestBean.test(Unknown Source) ........
If there is any better way of using Axis2 clients in EJB's, please let me know.
Thanks,
Sridhar.
