1 Reply Latest reply on Oct 28, 2006 9:03 AM by Nicolai Ødum

    Enum as method argument throws exception at runtime when exp

    Nicolai Ødum Newbie

      Enum as method argument throws exception at runtime when exposed as Webservice

      JBoss 4.0.5GA with EJB3 enabled

      I have a stateless session bean with a method that takes a enum as a argument that I would like to expose as a webservice. The method looks like this

      @WebMethod void resetDatabase(DatabaseType type);

      Where DatabaseType is

      public enum DatabaseType {

      I have created a simple client that calls that method but I get the following exception

      Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://syncml.mpsuite.niro.dk/jaws}DatabaseType at org.jboss.ws.metadata.JSR109MetaDataBuilder.buildParameterMetaDataRpc(JSR109MetaDataBuilder.java:240)
      at org.jboss.ws.metadata.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:189)
      at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:207)
      at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:122)

      Am I forgetting something or does the current version of EJB3 webservice not support enum?