title: Webserver generates badly formatted services.wsdl
body: <p>I have a Tomcat 7.0 web server which I use to run a web service on it. The web service framework is CXF 2.5.2.</p>
  
  <p>When testing the web service from the Eclipse Web Service Explorer everything works as supposed. However, when generating a Java Client from the WSDL (using Eclipse) and running it, I get the following error when calling <code>super(wsdlLocation, serviceName)</code> from the Service implementation:</p>
  
  <pre><code>Exception in thread "main" javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
  at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:150)
  at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:91)
  at javax.xml.ws.Service.&lt;init&gt;(Service.java:77)
  at test.Test_Service.&lt;init&gt;(Test_Service.java:43)
  at test.Test_TestSOAP_Client.main(Test_TestSOAP_Client.java:47)
  
  Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
  at org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:94)
  at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:204)
  at org.apache.cxf.jaxws.ServiceImpl.&lt;init&gt;(ServiceImpl.java:148)
  ... 4 more
  
  Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'c' (code 99) in start tag Expected a quote at [row,col,system-id]: [1,208,"http://www.example.com:8081/TestWS/services?wsdl"]
  at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:240)
  at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:191)
  at org.apache.cxf.wsdl11.WSDLServiceFactory.&lt;init&gt;(WSDLServiceFactory.java:92)
  ... 6 more
  
  Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'c' (code 99) in start tag Expected a quote at [row,col,system-id]: [1,208,"http://www.example.com:8081/TestWS/services?wsdl"]
  at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
  at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:3005)
  at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2926)
  at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2802)
  at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1050)
  at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1080)
  at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:974)
  at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:901)
  at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:231)
  ... 8 more
  </code></pre>
  
  <p>The interesting part should be the <code>Unexpected character 'c' (code 99) in start tag Expected a quote
   at [row,col,system-id]: [1,208,"http://www.example.com:8081/TestWS/services?wsdl"]</code> message. When inspecting the generated services.wsdl, I found, that the problem is in the meta part:</p>
  
  <pre><code>&lt;meta http-equiv=content-type content="text/html; charset=UTF-8"&gt;
  </code></pre>
  
  <p><code>content-type</code> should be normally wrapped into quotes. Is this a known bug in one of the used frameworks/servers? What can I do to work around this? And why is there no problem when using the Eclipse Web Services Explorer? Is it more fault-tolerant (as my Firefox seems to be as it also doesn't have any problems to display a graphical representation of the generated wsdl).</p>