HPOSSOD 1.0 Technical Note

HP Web Services for Output Server 40
Using HP Web Services for Output Server
Sample clients
vice");
/* Get HP Web Services for Output Server Proxy */
port = new HPOSGatewayService(endpoint_new, qname).getHPOSGateway-
Port();
bp=(BindingProvider)port;
SOAPBinding binding = (SOAPBinding)bp.getBinding();
/* enable MTOM */
binding.setMTOMEnabled(true);
map = bp.getRequestContext();
/* Pass the User Credentials like this (sets in HTTP Headers)*/
map.put(BindingProvider.USERNAME_PROPERTY,user);
map.put(BindingProvider.PASSWORD_PROPERTY,psw);
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws Exception{
/* Pass Username Password Ip and Port number */
WSGClient client=new WSGClient("<user>","<password>","<IP>","<port>");
/* Example for HP Web Service for Output Server services*/
/* Documents can be delivered in 3 ways */
client.deliverJob();
client.sendMultipleDocuments();
client.sendDocumentWithChunks();
//query operations
client.queryJob();
client.querySubJobs();
client.queryObjects();
//pause operations
client.pauseJobs();
client.pauseSubJobs();
client.pauseObjects();
//resume operations
client.resumeJobs();
client.resumeSubJobs();
client.resumeObjects();
//cancel operations
client.cancelJobs();
client.cancelSubJobs();
//DPA operations
client.createObject();
client.enableObject();
client.disableObject();