0

I am currently converting from Java 1.4 to Java 1.6. When I try to recompile my code in Java 1.6 I get the following compilation error:

_getAgentInfoOperation0.setUse(com.ibm.ws.webservices.engine.enum.Use.LITERAL);
_getAgentInfoOperation0.setStyle(com.ibm.ws.webservices.engine.enum.Style.WRAPPED);

I understand that enum is a reserved word in Java 1.6. I was told that I could change the enum to enumtype and that should compile cleanly. I changed the code to enumtype:

_getAgentInfoOperation0.setUse(com.ibm.ws.webservices.engine.enumtype.Use.LITERAL);
_getAgentInfoOperation0.setStyle(com.ibm.ws.webservices.engine.enumtype.Style.WRAPPED);

When I change to enumtype I get the following two errors:

1) The method setUse(Use) in the type OperationDesc is not applicable for the arguments (Use).

2) The method setStyle(Style) in the type OperationDesc is not applicable for the arguments (Style).

Does anyone know what I need to do to get a clean compile?

Thanks,

ams2705
  • 287
  • 2
  • 5
  • 17
  • You did not change package's names so it does not compile. Can u post full msg of compilation error ? – gregory561 Jul 11 '12 at 16:18
  • Thanks for the quick reply Gregory. Which package names i need to change? The full error message is the same as in the above post. There are no additional message in the error. – ams2705 Jul 11 '12 at 16:30
  • It seems your `_getAgentInfoOperation0.setUse()` and `_getAgentInfoOperation0.setStyle()` methods still depend on old class locations, do you have access to `_getAgentInfoOperation0` source? – Amir Pashazadeh Jul 11 '12 at 16:35

1 Answers1

0

It looks to me like OperationDesc is your code and com.ibm.ws... is a library you're using. I suspect that, even though you switched to using the new enumtype version of the library, your old code is still expecting the enum version, so it doesn't recognize the new Use or Style objects.

After reading this forum thread, I wonder if perhaps you haven't updated your build path to use com.ibm.ws.webservices.thinclient_7.0.0.jar.

Pops
  • 30,199
  • 37
  • 136
  • 151