Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3532

WSDL published to wrong directory when path contains blank characters

    XMLWordPrintable

Details

    • Hide

      The problem occurs with all of our web services. Therefore I think that it's sufficient to install JBoss in a directory containing one or more blanks in its path name, and then deploy a web service.

      Show
      The problem occurs with all of our web services. Therefore I think that it's sufficient to install JBoss in a directory containing one or more blanks in its path name, and then deploy a web service.

    Description

      We use JBoss at Fujitsu as platform for our ServerView products. Currently we are shifting from JBoss 5.1 to JBoss 7. While we used the Metro WS stack with JBoss 5.1, we now want to use the CXF stack. After some adaptation works our web services work fine, except when JBoss is installed in a directory whose path name contains blank characters. In this case the following messages appear in the log file:

      11:18:25,740 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-3) Creating Service

      {http://schemas.fujitsu.com/serverview/security/2008/07/sts}

      STSService from WSDL: WEB-INF/wsdl/2008-07/sts.wsdl
      11:18:26,599 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-3) Setting the server's publish address to be http://jbossws.undefined.host:3169/cas/sts/service/v2008_07
      11:18:26,662 INFO [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-3) WSDL published to: file:/C:/Program%20Files/Fujitsu/ServerView%20Suite/jboss/standalone/data/wsdl/STS.ear/sts-endpoint.war/2008-07/sts.wsdl
      11:18:26,771 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."STS.ear"."sts-endpoint.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."STS.ear"."sts-endpoint.war".INSTALL: Failed to process phase INSTALL of subdeployment "sts-endpoint.war" of deployment "STS.ear"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_27]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_27]
      at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_27]
      Caused by: java.lang.RuntimeException: Cannot publish wsdl to: C:\Program Files\Fujitsu\ServerView Suite\jboss\standalone\data\wsdl\STS.ear\sts-endpoint.war\2008-07\sts.wsdl
      at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:107)
      at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.publishContractToFilesystem(EndpointImpl.java:222)
      at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:93)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
      at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
      at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:117)
      at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113)
      at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)
      at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
      ... 5 more
      Caused by: java.io.FileNotFoundException: C:\Program Files\Fujitsu\ServerView Suite\jboss\standalone\data\wsdl\STS.ear\sts-endpoint.war\2008-07\..\Unversioned\fault.wsdl (The system cannot find the path specified)
      at java.io.FileInputStream.open(Native Method) [rt.jar:1.6.0_27]
      at java.io.FileInputStream.<init>(Unknown Source) [rt.jar:1.6.0_27]
      at java.io.FileInputStream.<init>(Unknown Source) [rt.jar:1.6.0_27]
      at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source) [rt.jar:1.6.0_27]
      at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source) [rt.jar:1.6.0_27]
      at java.net.URL.openStream(Unknown Source) [rt.jar:1.6.0_27]
      at org.jboss.ws.common.utils.AbstractWSDLFilePublisher.publishWsdlImports(AbstractWSDLFilePublisher.java:172)
      at org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher.publishWsdlFiles(WSDLFilePublisher.java:91)
      ... 14 more

      11:18:27,021 INFO [org.jboss.as.server] (management-handler-thread - 7) JBAS015870: Deploy of deployment "STS.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"STS.ear\".\"sts-endpoint.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"STS.ear\".\"sts-endpoint.war\".INSTALL: Failed to process phase INSTALL of subdeployment \"sts-endpoint.war\" of deployment \"STS.ear\""}}
      11:18:27,224 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment cas-acc-ejb.jar in 213ms
      11:18:27,255 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment sts-srv-ejb.jar in 243ms
      11:18:27,318 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment sts-audit.jar in 302ms
      11:18:29,115 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment sts-endpoint.war in 2097ms
      11:18:29,255 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment STS.ear in 2248ms
      11:18:29,271 INFO [org.jboss.as.controller] (management-handler-thread - 7) JBAS014774: Service status report
      JBAS014777: Services which failed to start: service jboss.deployment.subunit."STS.ear"."sts-endpoint.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."STS.ear"."sts-endpoint.war".INSTALL: Failed to process phase INSTALL of subdeployment "sts-endpoint.war" of deployment "STS.ear"

      There problem here is that the apparently missing WSDL file "fault.wsdl" is created in the directory

      C:\Program%20Files\Fujitsu\ServerView%20Suite\jboss\standalone\data\wsdl\STS.ear\sts-endpoint.war\Unversioned\fault.wsdl

      rather than in the correct directory

      C:\Program Files\Fujitsu\ServerView Suite\jboss\standalone\data\wsdl\STS.ear\sts-endpoint.war\Unversioned\fault.wsdl,

      where it is later on searched for.

      I found no other workaround than to correct the problem in line 86 of this source file:

      [jbossws-cxf-server-4.0.2.GA]/src/main/java/org/jboss/wsf/stack/cxf/deployment/WSDLFilePublisher.java

      Original:

      83 Document doc = getWsdlDocument(bus, def);
      84 writeDocument(doc, wsdlFile);
      85
      86 URL wsdlPublishURL = wsdlFile.toURI().toURL();
      87 log.info("WSDL published to: " + wsdlPublishURL);
      88
      89 // Process the wsdl imports

      Workaround:

      83 Document doc = getWsdlDocument(bus, def);
      84 writeDocument(doc, wsdlFile);
      85
      86 //URL wsdlPublishURL = wsdlFile.toURI().toURL(); incorrect! Workaround below:
      87 URL wsdlPublishURL = new URL(URLDecoder.decode(wsdlFile.toURI().toURL().toExternalForm(), "UTF-8"));
      88 log.info("WSDL published to: " + wsdlPublishURL);
      89
      90 // Process the wsdl imports

      Attachments

        Issue Links

          Activity

            People

              ropalka Richard Opalka
              schmidt1 Hans-Ulrich Schmidt (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified