cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Kieselhorst (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication
Date Thu, 22 Oct 2009 10:18:59 GMT

    [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768628#action_12768628
] 

Dennis Kieselhorst commented on CXF-2443:
-----------------------------------------

Exception changed with CXF 2.2.4:

<beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:cxf="http://cxf.apache.org/core"
      xmlns:http="http://cxf.apache.org/transports/http/configuration"
      xmlns:sec="http://cxf.apache.org/configuration/security"
      xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
  http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
  http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

	<http:conduit id="http://url/.*">
		<http:authorization>
			<sec:UserName>user</sec:UserName>
			<sec:Password>pass</sec:Password>
		</http:authorization>
	</http:conduit>
</beans>

org.apache.cxf.bus.spring.SpringBusFactory createApplicationContext
WARNUNG: Initial attempt to crate application context was unsuccessful.
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 11 in XML document
from class path resource [cxf.xml] is invalid; nested exception is org.xml.sax.SAXParseException:
cvc-datatype-valid.1.2.1: 'http://url/.*' is not a valid value for 'NCName'.
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
	at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
	at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
	at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
	at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
	at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
	at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
	at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
	at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
	at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
	at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
	at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
	at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
	at org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory.newInstance(JaxWsDynamicClientFactory.java:71)
	at com.atanion.activation.target.executor.CxfSoapExecutor.execute(CxfSoapExecutor.java:53)
	at com.atanion.activation.target.executor.CxfSoapExecutor.main(CxfSoapExecutor.java:110)
Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: 'http://url/.*' is not
a valid value for 'NCName'.
	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
	at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
	at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:116)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
	... 22 more

A PropertyPlaceholder doesn't help.

> Dynamic client cannot be used if WSDL requires basic authentication
> -------------------------------------------------------------------
>
>                 Key: CXF-2443
>                 URL: https://issues.apache.org/jira/browse/CXF-2443
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.3, 2.2.4
>            Reporter: Dennis Kieselhorst
>
> The following snippet fails, if wsdlUri requires basic authentication:
> JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
> Client client = dcf.createClient(wsdlUri);
> org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve URL "XXXX".
> 	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.composeUrl(DynamicClientFactory.java:606)
> 	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:251)
> 	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
> 	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:189)
> 	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:144)
> 	at com.atanion.activation.target.executor.CxfSoapExecutor.execute(CxfSoapExecutor.java:63)
> 	at com.atanion.activation.target.executor.CxfSoapExecutor.main(CxfSoapExecutor.java:279)
> Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: XXXX
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
> 	at org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:161)
> 	at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:90)
> 	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.composeUrl(DynamicClientFactory.java:598)
> 	... 6 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message