title: CXF Web Service WSDL File Not Found Exception
body: <p>i had tried to develop a web service using eclipse indigo but there is error after generating wsdl file (java2ws) it display error on Test Service Explorere wizard which result previous generate wsdl file been erase. Thus, I'm manually copy the wsdl file to temp folder and copy back to the desire folder but following error is display when invoke from browser.</p>
  
  <p>Error: </p>
  
  <pre><code>javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
      org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:149)
      org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
      javax.xml.ws.Service.&lt;init&gt;(Service.java:57)
      javax.xml.ws.Service.create(Service.java:687)
      com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
      com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  root cause
  
  org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
      org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:94)
      org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
      org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:147)
      org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
      javax.xml.ws.Service.&lt;init&gt;(Service.java:57)
      javax.xml.ws.Service.create(Service.java:687)
      com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
      com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  root cause
  
  javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'localhost:8080/CreditCardService/CreditcardService?WSDL'.: java.io.FileNotFoundException: localhost:8080/CreditCardService/CreditcardService?WSDL
      com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
      com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239)
      org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
      org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:92)
      org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
      org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:147)
      org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
      javax.xml.ws.Service.&lt;init&gt;(Service.java:57)
      javax.xml.ws.Service.create(Service.java:687)
      com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
      com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  root cause
  
  java.io.FileNotFoundException: localhost:8080/CreditCardService/CreditcardService?WSDL
      sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
      org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986)
      org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:143)
      org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:802)
      org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
      org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
      org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230)
      org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285)
      com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
      com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
      org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:239)
      org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186)
      org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:92)
      org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:203)
      org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:147)
      org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:90)
      javax.xml.ws.Service.&lt;init&gt;(Service.java:57)
      javax.xml.ws.Service.create(Service.java:687)
      com.peter.client.CreditCardServiceClient.createServiceClient(CreditCardServiceClient.java:43)
      com.peter.controller.CreditCardController.doPost(CreditCardController.java:106)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Q9BHK.png" alt="Error Screen"></p>
  
  <p>This is the exception for the screen shot.
  eclipse.buildId=M20120208-0800
  java.version=1.7.0_05
  java.vendor=Oracle Corporation
  BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
  Framework arguments:  -vm C:\Program Files\Java\jdk1.6.0_26\jre\bin\client\jvm.dll -product org.eclipse.epp.package.jee.product
  Command-line arguments:  -os win32 -ws win32 -arch x86 -vm C:\Program Files\Java\jdk1.6.0_26\jre\bin\client\jvm.dll -product org.eclipse.epp.package.jee.product</p>
  
  <pre><code>Error
  Wed Aug 22 19:29:09 SGT 2012
  Unexpected exception (com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil)
  
  java.lang.RuntimeException: Unable to access localhost:8080/CreditCardWebService/services/CreditCardServicePort?wsdl
      at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.createFile(WImportUtil.java:402)
      at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.importUri(WImportUtil.java:346)
      at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.importSomethingRunnable(WImportUtil.java:218)
      at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil$1.run(WImportUtil.java:136)
      at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
      at com.ibm.rational.ttt.common.ui.dialogs.wimport.WImportUtil.importSomething(WImportUtil.java:134)
      at com.ibm.rational.ttt.ustc.api.GSC.importWSDL(GSC.java:108)
      at com.ibm.rational.ttt.ustc.api.GSC.importWSDL(GSC.java:96)
      at com.ibm.ast.ws.gsc.internal.GSCUtils.getWSDLFile(GSCUtils.java:156)
      at com.ibm.ast.ws.gsc.internal.GSCDialog.loadWSDL(GSCDialog.java:69)
      at com.ibm.ast.ws.gsc.internal.GSCDialog.createDialogArea(GSCDialog.java:59)
      at org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:155)
      at org.eclipse.jface.window.Window.create(Window.java:431)
      at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
      at com.ibm.ast.ws.gsc.internal.GSCLaunchCommand.launchExternally(GSCLaunchCommand.java:85)
      at com.ibm.ast.ws.gsc.internal.GSCLaunchCommand.execute(GSCLaunchCommand.java:146)
      at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.WSDLTestLaunchCommand.commandFactoryExecution(WSDLTestLaunchCommand.java:97)
      at org.eclipse.jst.ws.internal.consumption.ui.widgets.test.WSDLTestLaunchCommand.execute(WSDLTestLaunchCommand.java:72)
      at org.eclipse.jst.ws.internal.creation.ui.widgets.test.ServiceTestWidget.handleLaunchButton(ServiceTestWidget.java:105)
      at org.eclipse.jst.ws.internal.creation.ui.widgets.test.ServiceTestWidget.access$0(ServiceTestWidget.java:84)
      at org.eclipse.jst.ws.internal.creation.ui.widgets.test.ServiceTestWidget$1.widgetSelected(ServiceTestWidget.java:68)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
      at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
      at org.eclipse.jface.window.Window.open(Window.java:801)
      at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:257)
      at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)
      at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
      at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
      at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
      at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
      at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
      at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
      at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
  </code></pre>
  
  <p>Is there a way to generate wsdl manually? </p>
  
  <p>I tried typing the java2s but it say the command is not recognize 
  as internal program.</p>
  
  <p>Please help. </p>
  
  <p>Thanks. </p>