6 Replies Latest reply on Apr 16, 2010 9:04 AM by David Ward

    Problems loading WSDL with SOAPProxy

    Leon Doud Newbie

      I'm trying to load a WSDL using the classpath.  The wsdl file is called NotifyConsumer.wsdl, and it is a directory called "wsdl" within the ESB deployment.


      The wsdl property of the SOAPProxy action was configured using the following:


      <property name="wsdl" value="classpath://wsdl/NotifyConsumer.wsdl"/>



      When deploying the ESB file I get the following stack trace:


      Caused by: java.lang.IllegalArgumentException: URL cannot be null
          at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:99)
          at org.jboss.soa.esb.actions.soap.proxy.SOAPProxyWsdlLoader.loadDefinitions(SOAPProxyWsdlLoader.java:102)
          at org.jboss.soa.esb.actions.soap.proxy.SOAPProxy.<init>(SOAPProxy.java:145)
          ... 125 more


      I stepped through this with a debugger and found some interesting....


      SOAPProxyWsdlLoader uses ClassUtil.getResource (line 226) to find the "wsdl_url" and it passes SOAPProxyWsdlLoader.class as the second arg. When ClassUtil.getResource executes it changes the name of the resource from "wsdl/NotifyConsumer.wsdl" to "org/jboss/soa/esb/actions/soap/proxy/wsdl/NotifyConsumer.wsdl". As a result of this name change the wsdl file is not found.


      To test my understanding I made a directory structure of "org/jboss/soa/esb/actions/soap/proxy/wsdl" and put NotifyConsumer.wsdl in it, and redeployed the ESB. This time the ESB was successfully deployed.


      I think this is a bug unless I misunderstand the configuration options for the action. I wanted to post here first before opening an issue report.