HPOSSOD 1.0 Technical Note
HP Web Services for Output Server 51
Using HP Web Services for Output Server
Sample clients
System.out.println("queryResponse : "+queryResponse);
//parse the response and check whether has-more-chunks is true/false
if(!HasMoreChunksExists(queryResponse)) break;
}
}
public void querySubJobs()throws Exception{
String queryContract= "<wsg-request>" +
"<operation-attributes>" +
//Response is chunked into <=batch-size if batch-size>0 else
ignored
//indicates how many response chunks to get
"<batch-size>1</batch-size>"+
/* add zero or more job-client-ids */
//if no job-client-id specified gets all jobs for that user
"<job-identifier>jqm:27305618</job-identifier>"+
"<job-identifier>jqm:272400820</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.querySubjobs(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 queryObjects()throws Exception{
String queryContract= "<wsg-request>" +
"<operation-attributes>" +
//Response is chunked into <=batch-size if batch-size>0 else