CXF + spring 的org.apache.cxf.frontend.WSDLQueryException:
之前用jax-ws写了一个webservice,但是和现有SSH的一个应用系统结合后,没法获取spring的application.xml里的sessionFactory配置。只能在WS的构造体里写
//String fs = new File(HyDataWrapperWS.class.getResource("/").getPath()).getParent()+"/webservice.xml";
//Resource rs = new FileSystemResource(fs);?
//BeanFactory factory = new XmlBeanFactory(rs);?
//
//HyDataWrapperWSProcess p = (HyDataWrapperWSProcess)factory.getBean("hydatawrapperwsprocess");
手动的获取bean。并且webservice.xml还得重复一遍定义datasource和sessionfactory。后来打算用cxf来重新构造webservice,就是看到cxf和spring可以完美结合。按照apache的标准教程一步一步下来,http://localhost:8080/hy/service//HyDataWrapperWSService?wsdl但是最后就是没法看到wsdl。报has thrown> exception, unwinding now> org.apache.cxf.frontend.WSDLQueryException:> Exception occurred while trying to process> http://localhost:9081/MortgageGateway/soap/LnSetupLoanService> at org.apache.cxf.frontend.WSDLGetUtils.getDocument(WSDLGetUtils.java:248)> at> org.apache.cxf.frontend.WSDLGetInterceptor.getDocument(WSDLGetInterceptor.ja> va:158) at> org.apache.cxf.frontend.WSDLGetInterceptor.handleMessage(WSDLGetInterceptor.> java:110) at> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain> .java:263) at> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationOb> server.java:123) at> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDes> tination.java:207) at类似的错误。