Hi All,
I
I am trying to access a web services deployed on JBoss4.0.3 SP1. When I execute the
following line of code
javax.xml.rpc.Service service = factory.createService(wsdlLocation, serviceName);
I get the following error "org.jboss.axis.ConfigurationException: No engine
configuration file"
The following extract explains the problem and proposes a workaround. However I am not
sure how to implement the workaround, I would appreciate it if someone can give me some
more detail on how to implement this solution.
The default org.jboss.axis.client.Service constructor will throw this exception. My
particular case involves creating a new Service object from within an EJB, but this should
occur with any client.
Tracing through the code, I discovered that
org.jboss.axis.configuration.EngineConfigurationFactoryDefault defines the default
filenames for the client configuration as "client-config.wsdd", while the actual
file distributed with jboss-ws4ee-client.jar is "axis-client-config.xml". When
the Service object is constructed, org.jboss.axis.configuration.FileProvider looks on the
classpath for "client-config.wsdd", and of course can't find it.
The workaround specified in JBAS-1106 puts a file with the correct name but possibly the
wrong configuration information onto the classpath, where FileProvider can find it. This
will work for a standalone client, but not for client code within an EJB, since the Axis
packages appear to be loaded with a different classloader than that for the EJB.
The workaround is to provide the Service constructor with a FileProvider that specifies
the correct configuration file:
new Service(new FileProvider("META-INF/axis-client-config.xml"))
My source code to invoke the web service is as follows
// create service factory
javax.xml.rpc.ServiceFactory factory =
javax.xml.rpc.ServiceFactory.newInstance();
// define targetNameSpace
String targetNamespace = "http://www.openkm.org/";
// + "wsdl/net.xmethods.services.stockquote.StockQuote/";
// define qname
QName serviceName =
new QName(targetNamespace,"OKMAuthService");
// define porname
QName portName =
new QName(targetNamespace,"OKMAuthPort");
// define operation name
QName operationName = new
QName("http://localhost:8080/OpenKM/OKMAuth",
"login");
//Specify wsdl location
java.net.URL wsdlLocation =
new java.net.URL("http://localhost:8080/OpenKM/OKMAuth?wsdl");
// create service
javax.xml.rpc.Service service = factory.createService(wsdlLocation,
serviceName);
// create call
javax.xml.rpc.Call call = service.createCall(portName, operationName);
Thanks in advance
Denzil
My source code is as follows
public String login() throws Exception {
//Method level variables
String token;
try {
// create service factory
javax.xml.rpc.ServiceFactory factory = javax.xml.rpc.ServiceFactory.newInstance();
// define targetNameSpace
String targetNamespace = "http://www.openkm.org/";
// + "wsdl/net.xmethods.services.stockquote.StockQuote/";
// define qname
QName serviceName =
new QName(targetNamespace,"OKMAuthService");
// define porname
QName portName =
new QName(targetNamespace,"OKMAuthPort");
// define operation name
QName operationName = new QName("http://localhost:8080/OpenKM/OKMAuth",
"login");
//Specify wsdl location
java.net.URL wsdlLocation =
new java.net.URL("http://localhost:8080/OpenKM/OKMAuth?wsdl");
// create service
javax.xml.rpc.Service service = factory.createService(wsdlLocation, serviceName);
// new Service(new FileProvider("META-INF/axis-client-config.xml"))
// create call
javax.xml.rpc.Call call = service.createCall(portName, operationName);
String login = "user1 " + "pass1";
// invoke the remote web service
token = (String) call.invoke(new Object[] {login});
}
org.jboss.axis.ConfigurationException: org.jboss.axis.ConfigurationException: No engine
configuration file - aborting!
org.jboss.axis.ConfigurationException: No engine configuration file - aborting!
at org.jboss.axis.configuration.FileProvider.configureEngine(FileProvider.java:222)
at org.jboss.axis.AxisEngine.init(AxisEngine.java:150)
at org.jboss.axis.AxisEngine.(AxisEngine.java:132)
at org.jboss.axis.client.AxisClient.(AxisClient.java:88)
at org.jboss.axis.client.Service.getAxisClient(Service.java:370)
at org.jboss.axis.client.Service.(Service.java:180)
at org.jboss.axis.client.ServiceFactory.createService(ServiceFactory.java:246)
at
com.mpilo.fourier.dms.wsmanager.subscriber.AuthModuleWSManager.login(AuthModuleWSManager.java:86)
at
com.mpilo.fourier.dms.web.action.SaveOrCreateDocumentAction.execute(SaveOrCreateDocumentAction.java:66)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
2007-11-06 21:01:51,593 INFO [STDOUT] at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
org.jboss.axis.ConfigurationException: No engine configuration file - aborting!
org.jboss.axis.ConfigurationException: No engine configuration file - aborting!
at org.jboss.axis.configuration.FileProvider.configureEngine(FileProvider.java:222)
at org.jboss.axis.AxisEngine.init(AxisEngine.java:150)
at org.jboss.axis.AxisEngine.(AxisEngine.java:132)
at org.jboss.axis.client.AxisClient.(AxisClient.java:88)
at org.jboss.axis.client.Service.getAxisClient(Service.java:370)
at org.jboss.axis.client.Service.(Service.java:180)
at org.jboss.axis.client.ServiceFactory.createService(ServiceFactory.java:246)
at
com.mpilo.fourier.dms.wsmanager.subscriber.AuthModuleWSManager.login(AuthModuleWSManager.java:86)
at
com.mpilo.fourier.dms.web.action.SaveOrCreateDocumentAction.execute(SaveOrCreateDocumentAction.java:66)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
at org.jboss.axis.configuration.FileProvider.configureEngine(FileProvider.java:222)
at org.jboss.axis.AxisEngine.init(AxisEngine.java:150)
at org.jboss.axis.AxisEngine.(AxisEngine.java:132)
at org.jboss.axis.client.AxisClient.(AxisClient.java:88)
at org.jboss.axis.client.Service.getAxisClient(Service.java:370)
at org.jboss.axis.client.Service.(Service.java:180)
at org.jboss.axis.client.ServiceFactory.createService(ServiceFactory.java:246)
at
com.mpilo.fourier.dms.wsmanager.subscriber.AuthModuleWSManager.login(AuthModuleWSManager.java:86)
at
com.mpilo.fourier.dms.web.action.SaveOrCreateDocumentAction.execute(SaveOrCreateDocumentAction.java:66)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
at org.jboss.axis.configuration.FileProvider.configureEngine(FileProvider.java:236)
at org.jboss.axis.AxisEngine.init(AxisEngine.java:150)
at org.jboss.axis.AxisEngine.(AxisEngine.java:132)
at org.jboss.axis.client.AxisClient.(AxisClient.java:88)
at org.jboss.axis.client.Service.getAxisClient(Service.java:370)
at org.jboss.axis.client.Service.(Service.java:180)
at org.jboss.axis.client.ServiceFactory.createService(ServiceFactory.java:246)
at
com.mpilo.fourier.dms.wsmanager.subscriber.AuthModuleWSManager.login(AuthModuleWSManager.java:86)
at
com.mpilo.fourier.dms.web.action.SaveOrCreateDocumentAction.execute(SaveOrCreateDocumentAction.java:66)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilte
2007-11-06 21:01:51,609 INFO [STDOUT] rChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
at org.jboss.axis.AxisEngine.init(AxisEngine.java:154)
at org.jboss.axis.AxisEngine.(AxisEngine.java:132)
at org.jboss.axis.client.AxisClient.(AxisClient.java:88)
at org.jboss.axis.client.Service.getAxisClient(Service.java:370)
at org.jboss.axis.client.Service.(Service.java:180)
at org.jboss.axis.client.ServiceFactory.createService(ServiceFactory.java:246)
at
com.mpilo.fourier.dms.wsmanager.subscriber.AuthModuleWSManager.login(AuthModuleWSManager.java:86)
at
com.mpilo.fourier.dms.web.action.SaveOrCreateDocumentAction.execute(SaveOrCreateDocumentAction.java:66)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103358#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...