HPOSSOD 1.0 Technical Note

HP Web Services for Output Server 52
Using HP Web Services for Output Server
Sample clients
ignored
//indicates how many response chunks to get
"<batch-size>3</batch-size>"+
/* add zero or more job-client-ids */
//if no job-client-id specied gets all jobs for that user
"<job-identifier>jqm:454545</job-identifier>"+
"<job-identifier>jqm:12465432</job-identifier>"+
// "<job-identifier>jqm:6564254</job-identifier>"+
//add filter attributes
"<job-owner>user</job-owner>"+
"</operation-attributes>" +
// Add requested-attributes(display attributes)
"<request-attributes>"+
//requested-attributes
"<requested-attributes>brief</requested-attributes>"+
"</request-attributes>"+
"</wsg-request>";
// Get all the response chunks
//NOTE: To use query response chunking client has to maintain session
setSesssionMaintain(true);//maintains session on client side
String queryResponse=null;
while(true){
/* call HPOS Web Service Proxy and get Response*/
queryResponse=port.queryObjects(queryContract);
//print Request and Response
System.out.println("queryContract : "+queryContract);
System.out.println("queryResponse : "+queryResponse);
//parse the response and check whether has-more-chunks is true/false
if(!HasMoreChunksExists(queryResponse)) break;
}
}
public void pauseJobs(){
//pause contract
String pauseContract="<wsg-request>" +
"<operation-attributes>" +
//Add one or more job-client-id's to pause
"<job-client-id>dlm:8:39</job-client-id>" +
//"<job-client-id>dlm:8:40</job-client-id>" +
//"<job-client-id>dlm:8:41</job-client-id>" +
"</operation-attributes>" +
//NOTE: Here Request-attributes not needed.
"</wsg-request>";
/* call HPOS Web Service Proxy and get Response*/
String pauseResponse=port.pauseJobs(pauseContract);