0 Replies Latest reply on Nov 9, 2006 3:38 AM by Martin Hesse

    Error in WSDL with complex type (EJB3 WebService)

    Martin Hesse Newbie

      Hello,

      I use EJB3-annotated Webservices in JBoss 4.0.4 GA. This worked fine, even with rather complex types, up until now.

      I have an Interface

      public interface EntityAware<E> {
      
       /**
       * @return an entity of type E
       * @throws EntityConversionException
       */
       E getEntity() throws EntityConversionException;
      
      }
      


      which I want my DTOs to implement. Like this:

      
      public class PersonInfo implements EntityAware<Person> {
      
       ...
      
       public Person getEntity() throws EntityConversionException {
       // TODO Auto-generated method stub
       return null;
       }
      
      }
      
      


      If then, such a DTO (implementing the interface) is used as a type in my Webservice, the WSDL gets very complex. It would then include all affected namespaces in the java class hierachy down to java.lang.Class.

      Example:

      ...
      <import namespace="http://reflect.lang.java/jaws" />
      <import namespace="http://www.w3.org/2001/XMLSchema" />
      <import namespace="http://cert.security.java/jaws" />
      <import namespace="http://annotation.lang.java/jaws" />
      <import namespace="http://lang.java/jaws" />
      <import namespace="http://services.ws.foo.bar.com/jaws" />
      <import namespace="http://net.java/jaws" />
      <import namespace="http://security.java/jaws" />
      <import namespace="http://util.java/jaws" />
      ...
      


      Is this a desired behaviour?

      To my understanding a DTO should be able to implement any kind of interface without the datatypes of that very interface having any kind of impact on the schema-representation of the DTO in the WSDL.

      Is there a way to change that behaviour by configuration or do I need a newer version of jbossws?

      Best regards and many thanks,

      Martin Hesse