I have the same issue as SL ReloadOS API inquiry and I am using maven dependency.
<dependency>
<groupId>com.softlayer.api</groupId>
<artifactId>softlayer-api-client</artifactId>
<version>0.2.2</version>
</dependency>
Server.Service serverService = Server.service(client, hardware.getId()); fails to compile with error Type mismatch: cannot convert from Hardware.Service to Server.Service
serverService.reloadOperatingSystem("FORCE", config);
Since I am using maven,
how to change the code of com.softlayer.api.service.hardware.Server
class?
The issue has been fixed and it was released on master branch of SoftLayer API Client for Java.
Issue: https://github.com/softlayer/softlayer-java/issues/21
Follow these steps to use master branch:
Open a command prompt (I suppose that you are using Windows), go to path that you unzipped the project and compile the project using
maven mvn compile
Open the project and try to run the script that you have