A SwitchYard application with a SOAP reference binding looking up remote WSDL URL fails to deploy if the WSDL is protected using BASIC authentication, even if the binding has a correct authentication configuration to access the endpoint as follows:
<sca:reference name="ReverseService" multiplicity="0..1" promote="ProxyService/ReverseService">
<soap:binding.soap>
<soap:wsdl>http://localhost:8080/ReverseService?wsdl</soap:wsdl>
...
<soap:basic>
<soap:user>kermit</soap:user>
<soap:password>the-frog-1</soap:password>
</soap:basic>
</soap:binding.soap>
</sca:reference>
I get the following error at deployment:
15:28:29,210 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."switchyard-quickstart-camel-soap-proxy.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."switchyard-quickstart-camel-soap-proxy.jar".SwitchYardService: org.switchyard.component.soap.WebServiceConsumeException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: SWITCHYARD035405: Unable to read WSDL at http: at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:89)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: org.switchyard.component.soap.WebServiceConsumeException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: SWITCHYARD035405: Unable to read WSDL at http: at org.switchyard.component.soap.OutboundHandler.doStart(OutboundHandler.java:204)
at org.switchyard.deploy.BaseServiceHandler.start(BaseServiceHandler.java:59)
at org.switchyard.deploy.internal.Deployment.deployReferenceBindings(Deployment.java:310)
at org.switchyard.deploy.internal.Deployment.start(Deployment.java:143)
at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:121)
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:78)
... 5 more
Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR: SWITCHYARD035405: Unable to read WSDL at http: at org.switchyard.component.soap.util.WSDLUtil.readWSDL(WSDLUtil.java:153)
at org.switchyard.component.soap.OutboundHandler.doStart(OutboundHandler.java:98)
... 10 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626) [rt.jar:1.7.0_65]
at java.net.URL.openStream(URL.java:1037) [rt.jar:1.7.0_65]
at org.switchyard.component.soap.util.WSDLUtil.readWSDL(WSDLUtil.java:144)
... 11 more
While I haven't confirmed, the same should hold true for NTLM as well.
|