Error during JAXWS call with basic authentication
difanders Jan 5, 2012 8:58 AMOn JBoss-6.1.0.Final I get the following exception when calling a JAXWS service (hosted on another JBoss instance):
Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:152) [:2.3.1-patch-01]
at org.jboss.wsf.stack.cxf.client.ProviderImpl.createServiceDelegate(ProviderImpl.java:71) [:3.4.1.GA]
at javax.xml.ws.Service.<init>(Service.java:57) [:1.0.0.Final]
at MyService.<init>(MyServicesService.java:58) [:]
... 159 more
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:93) [:2.3.1-patch-01]
at org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:207) [:2.3.1-patch-01]
at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:150) [:2.3.1-patch-01]
... 162 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col,system-id]: [1,944,"http://myhost:8280/MyServices?wsdl"]
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:235) [:2.3.1-patch-01]
at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:186) [:2.3.1-patch-01]
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:91) [:2.3.1-patch-01]
... 164 more
Caused by: com.ctc.wstx.exc.WstxParsingException: Unexpected close tag </body>; expected </HR>.
at [row,col,system-id]: [1,944,"http://myhost:8280/MyServices?wsdl"]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:630) [:3.2.6]
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:461) [:3.2.6]
at com.ctc.wstx.sr.BasicStreamReader.reportWrongEndElem(BasicStreamReader.java:3256) [:3.2.6]
at com.ctc.wstx.sr.BasicStreamReader.readEndElem(BasicStreamReader.java:3198) [:3.2.6]
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2830) [:3.2.6]
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019) [:3.2.6]
at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:998) [:2.3.1-patch-01]
at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:849) [:2.3.1-patch-01]
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:226) [:2.3.1-patch-01]
... 166 more
The error occurs when the web application uses basic authentication. With no authentication turned on everything works fine.
This error also appeared in JIRA JBAS-8358 (https://issues.jboss.org/browse/JBAS-8358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel) but issue seems to have been closed as it couldn't be reproduced.
Any bright ideas?