简体   繁体   中英

java 1.6 enum issue com.ibm.ws.webservices.engine.enum.Style.WRAPPED

I am migrating my application from Java 1.4 to Java 1.6 and RSA 7.0 to RSA 8.0 When I am opening my projects which used to be in RSA 7.0, some of the files which are generated from WSDL, getting the following error:

“Syntax error on token , class expected ; com.ibm.ws.webservices.engine cannot be resolved to a type”

For the below lines:

com.ibm.ws.webservices.engine.enum.Style.WRAPPED
com.ibm.ws.webservices.engine.enum.Use.LITERAL

When we manually changed the class path like below it compiled in 1.6:

com.ibm.ws.webservices.engine.enumtype.Style.WRAPPED
com.ibm.ws.webservices.engine.enumtype.Use.LITERAL

I have tried many option but couldn't find the proper solution. I have also posted the problem in other forum but looks like no solution so far.

I have found the solution to my question by myself, though it took long time, so here is the solution.

  1. change com.ibm.ws.webservice.engine.enum to com.ibm.ws.webservice.engine.enumtype
  2. add "com.ibm.ws.webservices.thinclient_7.0.0.jar" to your classpath and recompile the code.

You can find the "com.ibm.ws.webservices.thinclient_7.0.0.jar" in your <WAS HOME>/runtimes folder

Changing the package structure seems inevitable since enum is a keyword from Java5 onwards.
I have faced a similar issue when I converted a project from Java 1.4 to 1.5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM