Hello;
As you know there are standart web services in Maximo for WORKORDER,TICKET, etc.. You can change status of a ticket or workorder or something else with these web services..
But sometimes these web services are not enough. For example assume you want to calculate some data in Maximo according to that you will assign workorder to a user then change the status of workorder.
In this case, you can create your own web services with a couple lines of code…
First of all, you should extend Maximo Service Class (for WORKORDER example com.ibm.ism.pmcom.PmComWOService (in my case), for you this class can be psdi.app.workorder.WOService)
You can learn which class to extend from Database Configuration.
Go to Database Configuration.
Click Select Action Menu and find the service you want to extend. (You can create your own services here)
Then open eclipse and here is the code:)
package custom.services;
import java.rmi.RemoteException;
import javax.jws.WebMethod;
import psdi.iface.webservices.action.WSMboKey;
import psdi.server.MXServer;
import psdi.util.MXException;
import com.ibm.ism.pmcom.PmComWOService;
import custom.app.workorder.WOExtRemote;
public class WOService extends PmComWOService {
/**
*
*/
private static final long serialVersionUID = -157829023628868467L;
public WOService() throws RemoteException {
super();
// TODO Auto-generated constructor stub
}
//WOService(MXServer mxServer) method must exist, otherwise service does not start
public WOService(MXServer mxServer) throws RemoteException {
super(mxServer);
// TODO Auto-generated constructor stub
}
@WebMethod
public void testWebService(){
System.out.println("Hello Maximo Web Services()"+getURL());
}
//Don't forget @WebMethod annotations..
@WebMethod
public void testWebService2(@WSMboKey("WORKORDER") WOExtRemote wo,String owner) throws RemoteException, MXException{
System.out.println("Hello Maximo Web Services2()");
wo.setValue("OWNER", owner);
}
}
Now deploy code then write your own class in Database Configuration.. Then Restart..
Deploy Web Services.. (If deployed, undeploy and deploy..)
Now you can see your new methods in WSDL and you can try your new web services…
Have a good day….