4 Replies Latest reply on Oct 12, 2006 6:54 PM by thomas.diesler

    JbossWS fails when using wsdlLocation and generated WSDL

    artursignell

      Hi,

      I have a simple webmethod such as the one below, taking an array as an argument. This works fine as long as I remove the "wsdlLocation" specification.


      @WebService(name = "WSDLTest", targetNamespace = "namespace", wsdlLocation = "META-INF/wsdl/WSDLTest.wsdl")
      @SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)
      @Stateless
      public class WSDLTest {
      
       @WebMethod(operationName = "testMethod", action = "testMethod")
       public void testMethod(
       @WebParam(name = "binaryData") BinaryData[] binaryData)
       throws Exception {
      
       System.out.println("OK");
      
       }
      
      }
      


      However, when I save the JBossWS-generated wsdl to a file and tell JBossWS to use it using the "wsdlLocation" parameter, I get the following error:

      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Failed to resolve class name for {namespace}value: No ClassLoaders found for: java.lang.BinaryData
       at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.loadClassForTerm(RtElementHandler.java:1050)
       at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.classForNonArrayItem(RtElementHandler.java:1379)
       at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.classForElement(RtElementHandler.java:857)
       at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.startElement(RtElementHandler.java:460)
      ...
      


      BinaryData is a simple dataclass containing only an integer and methods for setting and getting it. It resides in the webservice.data-package but is for some reason searched for in the java.lang package where the Exception is defined (defining an own exception in another package changes "java.lang" to the package name where the exception is defined).

      JBossWS version is 1.0.3.