4

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.

Mike
  • 1,889
  • 5
  • 26
  • 32

2 Answers2

4

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

Mike
  • 1,889
  • 5
  • 26
  • 32
2

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

gnat
  • 6,213
  • 108
  • 53
  • 73
Ajay George
  • 11,759
  • 1
  • 40
  • 48
  • how did you to that .... because I am still finding the solution for that ... could you help me with that – Mike Dec 15 '11 at 04:03
  • Mine was a more of manual effort. Modern IDEs could help you with the refactoring step. You can probably use an ANT script as well to do a global replace. http://ant.apache.org/manual/Tasks/replace.html – Ajay George Dec 15 '11 at 06:13
  • Mine wasn't the exact issue that you are facing. So for you I suppose you need to replace `com.ibm.ws.webservices.engine.enum` with `com.ibm.ws.webservices.engine.enumtype` – Ajay George Dec 15 '11 at 13:40