Skip to main content

Enum Types are not supported on a JWS

3 replies [Last post]
Joined: 2008-03-31

Hello, I've been working with JAX-WS (doing a WSDL-first approach) for about a week now, and I've run into a problem. (Excerpts of my actual files are below.) After running wsimport, the types are generated, including a Java Enum named LogLevel. LogLevel has the @XmlEnum annotation at the top.

When I write my implementation class for the webservice, It gives me an error on the method logEvent that says:

"The type com.program.eventlog.LogLevel used in parameter logEventRequest on method logEvent has no default constructor and might not be able to be bound to XML. - Enum Types are not supported on a JWS: com.program.common.eventlog.LogLevel"

Anyone have any ideas on why this is happening?

File 1 - EventLog.xsd (A common schema referenced in our DTOs)
<?xml version="1.0" encoding="UTF-8"?>

File 2 - LogEventDTO.xsd (Our DTOs are the parameters for wsdl operations)
<?xml version="1.0" encoding="UTF-8"?>

File 3 - EventLogWS.wsdl
<?xml version="1.0" encoding="UTF-8"?>

File 4 - generateCode.xml ant script

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-03-31

Ok, I think I figured it out. I am running JAX-WS 2.1.3 and BEA Workshop 10.1, and evidently these two do not play well together.

Weblogic uses their web service validator when code compiles, which doesn't allow Enum types. Turning this validator off in the project properties made this error go away.

Joined: 2008-09-20

Hi I also have same problem and still not able to solve this.
Even disabling all the validations in the project properties and in IDE preferences didn't helped me.
can u give the details on how did u turned off this web service validator.
thanks in advance.

Joined: 2013-06-17

I am having this same issue right now, I am working with oracle service bus 11g ( / oracle weblogic v10.3.4).
I built a business service via sbconsole and everything works fine when I used an operation which recieved just primitive parameters (Long), when I add a new method to my service businesss which recieved a class with some relations I get the error: Enum types are not supported on jws.

This happens whith a lot of methods, I am building a business service from current EJB remote interfaces, I have read a lot of documents since two days ago and everythings seems to be a a configuration issue, many people say weblogic (via sbconsole or eclipse) is using jax rpc instead of jaxws in order to generate web service definitions.

Any help will be appreciated :).