[jboss-user] [EJB 3.0] - Enum as method argument throws exception at runtime when exp

webmarck do-not-reply at jboss.com
Sat Oct 28 08:58:51 EDT 2006


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 {
  | 
  | 	CUSTOMERS, CLIENTS, ALL
  | }

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?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981523#3981523

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981523



More information about the jboss-user mailing list