在使用axis调用webservice的时候报这个错误,org.apache.axis.ConfigurationException: No service named XX is available。
解决办法,只治标不治本。解决该问题的办法是,将这个异常的日志级别提高到INFO,在自己的LOG4J配置文件中添加如下配置:log4j.xml
<logger name="org.apache.axis.ConfigurationException">
<level value="INFO" />
</logger>
或
log4j.properties
log4j.logger.org.apache.axis.ConfigurationException = INFO
下面是网友也遇到这个问题。
Hi,
Not sure if you got you answer as yet but anyhow, I thought below details would help all folks who are having same problem.
This is logged because this code in AxisEngine (line 308 in Axis 1.x):
depends on an exception being thrown on the first attempt (line 311) to then try a different method of finding the service (which succeeds if you see no log of the AxisFault on line 316). The log entry is created because a ConfigurationException logs itself (at DEBUG level) on creation (questionable practice, imho). To avoid this misleading log entry you'll want to add this to your log4j.properties file:
log4j.logger.org.apache.axis.ConfigurationException = INFO
Details can be found at the following link :
http://wiki.apache.org/ws/FrontPage/Axis/DealingWithCommonExceptions
Thanks,
Josh