0 Replies Latest reply on Apr 17, 2009 10:00 AM by Gautam Zalpuri

    org.jboss.ws.WSException: Cannot write generated wsdl

    Gautam Zalpuri Newbie

      Hello,

      I have a wsdl that imports hr-xml elements as below. I use wsconsume to generate the server interfaces and then implement the interface in my class. Compiled the code; and created a war
      (War has WEB-INF/web.xml. Classes moved to WEB-INF/classes)
      When deploying to jboss, wsdl get emitted and then deployment fails with org.jboss.ws.WSException: Cannot write generated wsdl (more of the stacktrace at the bottom of this post)

      Any ideas of what may be happening, and, how to resolve this? I tried the same through eclipse - and same error. I'm using JBossAS 4.2.3/jbossws 3.1.1

      Thanks!

      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions name="BackgroundCheckService"
       xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:hr="http://ns.hr-xml.org/2007-04-15"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:messages="http://www.testcompany.com/ws/hrxml/Screening/1.0"
       xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.testcompany.com/ws/hrxml/Screening/1.0">
       <wsdl:types>
       <xs:schema attributeFormDefault="qualified"
       elementFormDefault="qualified"
       targetNamespace="http://www.testcompany.com/ws/hrxml/Screening/1.0">
       <xs:import namespace="http://ns.hr-xml.org/2007-04-15"
       schemaLocation="http://ns.hr-xml.org/2_5/HR-XML-2_5/CPO/ApplicationAcknowledgement.xsd" />
       <xs:import namespace="http://ns.hr-xml.org/2007-04-15"
       schemaLocation="http://ns.hr-xml.org/2_5/HR-XML-2_5/Screening/US/BackgroundCheck.xsd" />
       <xs:include schemaLocation="CommonServicesTypes.xsd" />
       </xs:schema>
       </wsdl:types>
      
       <wsdl:message name="BackgroundCheckRequest">
       <wsdl:part element="hr:BackgroundCheck" name="BackgroundCheckRequest" />
       </wsdl:message>
       <wsdl:message name="Acknowledge">
       <wsdl:part element="hr:ApplicationAcknowledgement" name="Acknowledge" />
       </wsdl:message>
      
       <wsdl:portType name="BackgroundCheckPort">
       <wsdl:operation name="CreateBackgroundCheck">
       <wsdl:input message="messages:BackgroundCheckRequest" />
       <wsdl:output message="messages:Acknowledge" />
       </wsdl:operation>
       </wsdl:portType>
      
       <wsdl:binding name="BackgroundCheckBinding" type="messages:BackgroundCheckPort">
       <soap:binding style="document"
       transport="http://schemas.xmlsoap.org/soap/http" />
       <wsdl:operation name="CreateBackgroundCheck">
       <soap:operation style="document" soapAction="" />
       <wsdl:input>
       <soap:body use="literal" />
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal" />
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
      
       <wsdl:service name="BackgroundCheckService">
       <wsdl:port binding="messages:BackgroundCheckBinding" name="BackgroundCheckPort">
       <soap:address location="REPLACE_WITH_ACTUAL_URL" />
       </wsdl:port>
       </wsdl:service>
      </wsdl:definitions>
      




      ERROR [MainDeployer] Could not start deployment: file:/C:/Java/jbos
      
      s-4.2.2.GA/server/default/deploy/backgroundcheckws.war
      
      org.jboss.ws.WSException: Cannot write generated wsdl
      
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.pr
      
      ocessOrGenerateWSDL(JAXWSWebServiceMetaDataBuilder.java:391)
      
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.bu
      
      ildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:158)
      
       at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupP
      
      roviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
      
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMeta
      
      Data(JAXWSMetaDataBuilderJSE.java:63)
      
       at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.create(Unifi
      
      edMetaDataDeploymentAspect.java:66)
      
       at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.deploy
      
      (DeploymentAspectManagerImpl.java:115)
      
       at org.jboss.wsf.container.jboss42.ArchiveDeployerHook.deploy(ArchiveDep
      
      loyerHook.java:97)
      
       at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInt
      
      erceptor.java:90)
      
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
      
      start(SubDeployerInterceptorSupport.java:188)
      
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
      
      ptor.java:95)
      
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      
      java:264)
      
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      
       at $Proxy45.start(Unknown Source)
      
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      
       at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
      
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      
      sorImpl.java:25)
      
       at java.lang.reflect.Method.invoke(Method.java:585)
      
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      
      er.java:155)
      
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      
      or.java:133)
      
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      
      BeanOperationInterceptor.java:142)
      
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      
      java:264)
      
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      
       at $Proxy9.deploy(Unknown Source)
      
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      
      tScanner.java:421)
      
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      
      canner.java:634)
      
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      
      doScan(AbstractDeploymentScanner.java:263)
      
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      
      loop(AbstractDeploymentScanner.java:274)
      
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      
      run(AbstractDeploymentScanner.java:225)
      
      Caused by: java.io.IOException: org.xml.sax.SAXParseException: The prefix "xml"
      
      cannot be bound to any namespace other than its usual namespace; neither can the
      
       namespace for "xml" be bound to any prefix other than "xml".
      
       at org.jboss.wsf.common.DOMUtils.parse(DOMUtils.java:156)
      
       at org.jboss.wsf.common.DOMUtils.parse(DOMUtils.java:135)
      
       at org.jboss.ws.tools.wsdl.WSDL11Writer.writeBuilder(WSDL11Writer.java:1
      
      56)
      
       at org.jboss.ws.tools.wsdl.WSDL11Writer.write(WSDL11Writer.java:140)
      
       at org.jboss.ws.tools.wsdl.WSDLWriter.write(WSDLWriter.java:90)
      
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.wr
      
      iteWsdl(JAXWSWebServiceMetaDataBuilder.java:418)
      
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.pr
      
      ocessOrGenerateWSDL(JAXWSWebServiceMetaDataBuilder.java:382)
      
       ... 35 more
      
      09:40:53,549 ERROR [RequestHandlerImpl] Error processing web service request
      
      java.lang.IllegalStateException: Cannot obtain endpoint meta data
      
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleWSDLRequest(Request
      
      HandlerImpl.java:520)
      
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doGet(RequestHandlerImpl.
      
      java:144)
      
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
      
      HandlerImpl.java:126)
      
       at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java
      
      :84)
      
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      
      icationFilterChain.java:290)
      
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      
      ilterChain.java:206)
      
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      
      lter.java:96)
      
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      
      icationFilterChain.java:235)
      
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      
      ilterChain.java:206)
      
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      
      alve.java:230)
      
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      
      alve.java:175)
      
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      
      yAssociationValve.java:179)
      
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      
      e.java:84)
      
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      
      ava:127)
      
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      
      ava:102)
      
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
      
      onnectionValve.java:157)
      
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      
      ve.java:109)
      
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      
      a:262)
      
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      
      :844)
      
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      
      ss(Http11Protocol.java:583)
      
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
      
      6)
      
       at java.lang.Thread.run(Thread.java:595)
      
      09:40:53,549 ERROR [[BackgroundCheck]] Servlet.service() for servlet BackgroundC
      
      heck threw exception
      
      java.lang.IllegalStateException: Cannot obtain endpoint meta data
      
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleWSDLRequest(Request
      
      HandlerImpl.java:520)
      
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doGet(RequestHandlerImpl.
      
      java:144)
      
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(Request
      
      HandlerImpl.java:126)
      
       at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java
      
      :84)
      
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      
      icationFilterChain.java:290)
      
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      
      ilterChain.java:206)
      
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      
      lter.java:96)
      
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      
      icationFilterChain.java:235)
      
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      
      ilterChain.java:206)
      
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      
      alve.java:230)
      
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      
      alve.java:175)
      
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      
      yAssociationValve.java:179)
      
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      
      e.java:84)
      
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      
      ava:127)
      
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      
      ava:102)
      
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
      
      onnectionValve.java:157)
      
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      
      ve.java:109)
      
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      
      a:262)
      
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      
      :844)
      
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      
      ss(Http11Protocol.java:583)
      
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
      
      6)
      
       at java.lang.Thread.run(Thread.java:595)