我试图浏览我在http://kevinboone.net/cxftest.html找到的这个ApacheCXF教程 使用Intellij。
编译代码时,我一直在努力。
错误:
(17, 34) java: cannot find symbol
symbol: class TestMeSoapPortImpl
location: class com.cxftest.server.TestmePort_TestMeSoapPort_Server
我不知道为什么。
public class TestmePort_TestMeSoapPort_Server{
protected TestmePort_TestMeSoapPort_Server() throws java.lang.Exception {
System.out.println("Starting Server");
Object implementor = new TestMeSoapPortImpl();
String address = "http://127.0.0.1:9000/cxftest/testme";
Endpoint.publish(address, implementor);
}
public static void main(String args[]) throws java.lang.Exception {
new TestmePort_TestMeSoapPort_Server();
System.out.println("Server ready...");
Thread.sleep(5 * 60 * 1000);
System.out.println("Server exiting");
System.exit(0);
}
}
----------结构
一个。 com.cxftext.server
{ 启动服务器 2014年9月16日下午12:42:41 org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL 信息:从WSDL创建服务{{{3}}} CXFTestService:file:com / cxftest / server / cxftest.wsdl 线程" main"中的例外情况javax.xml.ws.WebServiceException:org.apache.cxf.service.factory.ServiceConstructionException:无法创建服务。 at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:371) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:152) 在javax.xml.ws.Endpoint.publish(Endpoint.java:240) 在com.cxftest.server.Server。(Server.java:15) 在com.cxftest.server.Server.main(Server.java:20) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 在com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) 引起:org.apache.cxf.service.factory.ServiceConstructionException:无法创建服务。 在org.apache.cxf.wsdl11.WSDLServiceFactory。(WSDLServiceFactory.java:87) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:391) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:525) at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:261) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:215) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102) 在org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) 在org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) ......还有10个 引起:javax.wsdl.WSDLException:WSDLException:faultCode = PARSER_ERROR:问题解析'文件:com / cxftest / server / cxftest.wsdl'。:java.io.FileNotFoundException:com \ cxftest \ server \ cxftest .wsdl(系统找不到指定的路径) 在com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2198) 在com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2390) 在com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2422) 在org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:231) 在org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:163) 在org.apache.cxf.wsdl11.WSDLServiceFactory。(WSDLServiceFactory.java:85) ......还有19个 引起:java.io.FileNotFoundException:com \ cxftest \ server \ cxftest.wsdl(系统找不到指定的路径) at java.io.FileInputStream.open(Native Method) 在java.io.FileInputStream。(FileInputStream.java:146) 在java.io.FileInputStream。(FileInputStream.java:101) 在sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:613) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:189) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812) 在com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) 在com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) 在com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243) 在com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:347) 在com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2188) ......还有24个
使用退出代码1完成处理
} 我的目标是使用wsdl2java工具在Intellij中执行所有任务并熟悉ApacheCXF。
谢谢