You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dennis Kieselhorst (JIRA)" <ji...@apache.org> on 2009/09/21 17:44:16 UTC

[jira] Created: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

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
            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.


[jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Dennis Kieselhorst (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Dennis Kieselhorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12762268#action_12762268 ] 

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

I will try to set the id using a PropertyPlaceholder...

> 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
>            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.


[jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768651#action_12768651 ] 

Daniel Kulp commented on CXF-2443:
----------------------------------



Use <http:conduit name="http://url/.*"> 

not id=


> 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.


[jira] Resolved: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2443.
------------------------------

    Resolution: Fixed

With CXF-2497 resolved, this should now be resolved.   WSDL retrieval is now through the conduits for http as well as https so the configs should be picked up for the http cases as well.


> 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
>            Assignee: Daniel Kulp
>
> 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.


[jira] Updated: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Dennis Kieselhorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Kieselhorst updated CXF-2443:
------------------------------------

    Affects Version/s: 2.2.4

> 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.


[jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Dennis Kieselhorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760620#action_12760620 ] 

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

username:password@url also results in 401.

Created a cxf.xml with:
<http:conduit name="{targetNamespace}Portname.http-conduit">
	<http:authorization>
		<sec:UserName>username</sec:UserName>
		<sec:Password>password</sec:Password>
	</http:authorization>
</http:conduit>

Doesn't work either. What do you mean with id? If I set the bean id to the URL, I get a xml error:
cvc-attribute.3: The value 'http://myurl' of attribute 'id' on element 'http:conduit' is not valid with respect to its type, 'ID'.

> 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
>            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.


[jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760482#action_12760482 ] 

Daniel Kulp commented on CXF-2443:
----------------------------------


We pretty much just use the HTTPUrlConnection for wsdl retrieval stuff.   Thus, you MAY be able to try a URL lke:

http://username:password@blah.com/test?wsdl
or similar.

Alternatively, you would need to create a Spring config file with an "http:conduit element with an id of the URL and set properties in there for the username/password and such.  Then create a bus with that config file.  

> 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
>            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.


[jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Dennis Kieselhorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760015#action_12760015 ] 

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

org.apache.axis.wsdl.gen.Parser supports username/ password so this issue blocks a migration of one of our projects that is currently using Axis 1.4.

Even if I create another createClient method with username and password in DynamicClientFactory and pass them to new constructors in ClientImpl und WSDLServiceFactory, I end up in javax.wsdl.xml.WSDLReader.

It seems the only way to solve this is to use implementation specific methods: http://rreddy.blogspot.com/2008/03/how-to-use-wsdlreader-for-getting-wsdl.html

Any other ideas?

> 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
>            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.


[jira] Assigned: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-2443:
--------------------------------

    Assignee: Daniel Kulp

> 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
>            Assignee: Daniel Kulp
>
> 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.


[jira] Commented: (CXF-2443) Dynamic client cannot be used if WSDL requires basic authentication

Posted by "Dennis Kieselhorst (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769160#action_12769160 ] 

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

Ok then the example in your comment in CXF-1480 is wrong.

Anyhow it doesn't work:
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://.......
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1196)
	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:603)
	... 22 more

> 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.