6 Replies Latest reply on Jan 17, 2011 7:33 AM by ffang

    JMS SOAP endpoint unable to read WSDL from classpath or URL

    nbaliga

      I have a <jms:soap-provider> configured with the wsdl property set to:

       

      classpath:HelloWorld.wsdl

       

      I checked that in my SU, the HelloWorld.wsdl file is located right alongside the xbean.xml file i.e. under the root of the SU's ZIP file.

       

      I get the following exception:

      +Caused by: javax.jbi.management.DeploymentException: Unable to read WSDL from: class path resource

           at org.apache.servicemix.jms.endpoints.JmsSoapProviderEndpoint.validate(JmsSoapProviderEndpoint.java:141)[148:servicemix-jms:2010.02.0.fuse-01-00]

           at org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeployer.java:58)[90:servicemix-common:2010.02.0.fuse-01-00]

           at org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBeanDeployer.java:55)[90:servicemix-common:2010.02.0.fuse-01-00]

           at org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:98)[90:servicemix-common:2010.02.0.fuse-01-00]

           at org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)[90:servicemix-common:2010.02.0.fuse-01-00]

           at org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)[90:servicemix-common:2010.02.0.fuse-01-00]

           at org.apache.servicemix.jbi.deployer.artifacts.ServiceUnitImpl.deploy(ServiceUnitImpl.java:104)[93:org.apache.servicemix.jbi.deployer:1.3.0.fuse-01-00]

           at org.apache.servicemix.jbi.deployer.impl.ServiceAssemblyInstaller.deploySUs(ServiceAssemblyInstaller.java:207)[93:org.apache.servicemix.jbi.deployer:1.3.0.fuse-01-00]

           ... 14 more

      Caused by: java.lang.NullPointerException

           at org.apache.servicemix.soap.wsdl.Wsdl1Soap11BindingFactory.createInput(Wsdl1Soap11BindingFactory.java:132)[139:servicemix-soap2:2010.02.0.fuse-01-00]

           at org.apache.servicemix.soap.wsdl.Wsdl1Soap11BindingFactory.createWsdl1SoapBinding(Wsdl1Soap11BindingFactory.java:100)[139:servicemix-soap2:2010.02.0.fuse-01-00]

           at org.apache.servicemix.soap.wsdl.Wsdl1BindingFactory.createBinding(Wsdl1BindingFactory.java:35)[139:servicemix-soap2:2010.02.0.fuse-01-00]

           at org.apache.servicemix.soap.wsdl.BindingFactory.createBinding(BindingFactory.java:24)[139:servicemix-soap2:2010.02.0.fuse-01-00]

           at org.apache.servicemix.jms.endpoints.JmsSoapProviderEndpoint.validateWsdl1(JmsSoapProviderEndpoint.java:189)[148:servicemix-jms:2010.02.0.fuse-01-00]

           at org.apache.servicemix.jms.endpoints.JmsSoapProviderEndpoint.validate(JmsSoapProviderEndpoint.java:129)[148:servicemix-jms:2010.02.0.fuse-01-00]

           ... 21 more+

       

      I tried changing the WSDL location to be a URL, just for debugging and I get

      a similar kind of error:

      +javax.jbi.management.DeploymentException: Unable to read WSDL from: URL http://209.42.3.254:9080/Webservices/HelloWorld?wsdl

      ...+

       

      Any pointers?

       

      Thanks.

        • 1. Re: JMS SOAP endpoint unable to read WSDL from classpath or URL
          ffang

          Hi,

           

          Use classpath:HelloWorld.wsdl should work, I tried with the testcase you sent me in another thread , which has jms:soap-provider and specify wsdl as classpath:HelloWorld.wsdl, exactly same as you compliant here, but it can load this wsdl, as the wsdl in your testcase isn't valid per WS-I BP(I believe you already know it per your last post in ) so you get some other exception when parse the wsdl.

           

          <jms:soap-provider service="test:ProviderService"

                        endpoint="jms"

                        destinationName="transport.bridge.queue"

                        wsdl="classpath:HelloWorld.wsdl"

                        connectionFactory="#connectionFactory" />

           

          The error you saw here is

          Caused by: javax.jbi.management.DeploymentException: Unable to read WSDL from: class path resource http://HelloWorld.wsdl(NOTE: the error here is http://HelloWorld.wsdl)

           

          So here http url handler jump in and of course there's no http://HelloWorld.wsdl,

          I think somehow your default installed url handler messed up which cause this problem, could you provide more details how to reproduce this error, such as what bundle you installed or cfg you changed before you saw this problem.

           

           

          http://fusesource.com/forums/thread.jspa?threadID=2459

           

           

          Freeman

          • 2. Re: JMS SOAP endpoint unable to read WSDL from classpath or URL
            nbaliga

            Sorry, didn't get it.

             

            Are you saying that since my wsdl (generated by CXF) is not WS-I compliant and so when I set validateWsdl=false, it gets past my earlier exception of WSDL is not WS-I BP compliant, but bombs later with a seemingly unrelated Exception of cannot load WSDL from classpath ?

             

            And are you saying that the very same WSDL works for you?

             

            As far as the URL case is concerned, let's just ignore it for now. But I did have a webservice running at the host:port combination that I'd mentioned earlier which was serving up the WSDL at the URL, just as a way for debugging what seemed to me was a Classpath exception.

            • 3. Re: JMS SOAP endpoint unable to read WSDL from classpath or URL
              ffang

              Hi,

               

              I mean I can't reproduce the problem you mentioned here.

               

              I played with the testcase you send me, just with minor change the service and endpoint name, to make it same as it in the wsdl, because it's the way expected to do. so the jms:soap-provider should be

               

              <jms:soap-provider service="test:HelloWorldService"

                            endpoint="HelloWorldPort"

                            destinationName="transport.bridge.queue"

                            wsdl="classpath:HelloWorld.wsdl"

                            validateWsdl="false"

                            connectionFactory="#connectionFactory" />

               

              then drop the sa.jar in $ESB_HOME/deploy folder(of course you need install woden bundle and refresh smx-jms bundle before it, as we discussed in another thread), then it works, no exception of cannot load WSDL from classpath.

               

              Just attach the revised testcase works for me.

              Note, I only touch the ./jms-su/src/main/resources/xbean.xml from your original testcase

               

              Freeman

               

              Edited by: ffang on Dec 15, 2010 5:13 AM

              • 4. Re: JMS SOAP endpoint unable to read WSDL from classpath or URL
                nbaliga

                Wow, this is embarassing! So looks like I had some typos in there w.r.t matching Service and Port Names to service and endpoint names in the xbean.xml.

                 

                Yes, after downloading your adjusted project, it worked just fine.

                 

                Thanks very much for your help again.

                • 5. Re: JMS SOAP endpoint unable to read WSDL from classpath or URL
                  praga

                  Hi,

                   

                  Can you share the configurations please that would be helpful for me

                  • 6. Re: JMS SOAP endpoint unable to read WSDL from classpath or URL
                    ffang

                    Hi,

                     

                    You can see the working example testJmsSoap.tar  attached with my previous post of this thread.

                     

                    Freeman