Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1135917

Summary: SOAP reference binding cannot access BASIC/NTLM-protected WSDL
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Tadayoshi Sato <tasato>
Component: SwitchYardAssignee: Aileen <aileenc>
Status: CLOSED UPSTREAM QA Contact: Matej Melko <mmelko>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0 GACC: soa-p-jira
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:42:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Reproducer none

Description Tadayoshi Sato 2014-09-01 07:41:43 UTC
Created attachment 933264 [details]
Reproducer

Description of problem:
Platform BZ for https://issues.jboss.org/browse/SWITCHYARD-2309

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://localhost:8080/ReverseService?wsdl: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/ReverseService?wsdl
	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://localhost:8080/ReverseService?wsdl: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/ReverseService?wsdl
	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://localhost:8080/ReverseService?wsdl: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/ReverseService?wsdl
	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://localhost:8080/ReverseService?wsdl
	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.


How reproducible:
100%


Steps to Reproduce:
1. Pick up the attached reproducer (camel-soap-proxy.zip).
2. Manually deploy ReverseService.war, which is BASIC-protected.
3. Then try deploying the quickstart. You'll see the same error log as described in the issue description.


Actual results:
You'll see the error "Server returned HTTP response code: 401 for URL: http://localhost:8080/ReverseService?wsdl" and the deployment fails.

Expected results:
The reproducer deploys successfully.


Additional info:
Need to check if there is the same issue with NTLM authentication as well.

Comment 1 Keith Babo 2014-09-08 15:13:15 UTC
See comments on associated JIRA.  This is borderline between enhancement and bug, IMO.

Comment 2 Magesh Kumar Bojan 2015-07-07 05:26:15 UTC
Pull Request sent.

Comment 7 Red Hat Bugzilla 2025-02-10 03:42:54 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.