HPOSSOD 1.0 Technical Note
HP Web Services for Output Server 38
Using HP Web Services for Output Server
Sample clients
using WSGClient.HPOMWS;//Web reference
An example of a portion of the client API on C Sharp for is as follows:
class ClientProgram
{
// create a Web service proxy stub
static HPOSGatewayService service = new HPOSGatewayService();
static void Main(string[] args)
{
//create an instance of class querySubJobs
querySubjobs subjob = new querySubjobs();
//specify the argument as the contract
job.arg0 =
"<wsg-request><operation-attributes><job-identifier>jqm:6544210</job-identifie
r></operation-attributes><request-attributes><requested-attributes>job-owner</
requested-attributes></request-attributes></wsg-request>";
// invoke the service by passing the ins
querySubjobsResponse response = service.querySubjobs(subjob);
//print the response
Console.WriteLine(response.@return);
}
}
As an example for deliverJobs, you need to follow the steps mentioned below:
static HPOSGatewayService service = new HPOSGatewayService();
static void Main(string[] args)
{
string sXmlHPOSContract =
"<wsg-request><operation-attributes><destination>WSG1</destination></operation
-attributes><request-attributes><document-filename>abc</document-file-
name></request-attributes></wsg-request>";
DocumentData oDocument = new DocumentData();
oDocument.document = File.ReadAllBytes("c:\\abc.txt");
deliverJob job = new deliverJob();
job.arg0 = sXmlHPOSContract;
job.arg1 = oDocument;
deliverJobResponse response = service.deliverJob(job);
Console.WriteLine(response.@return);
}
NOTE: The response returned for .Net client is an object and for a Java client it returns a string.
Sample clients for Java clients
An example of a portion of the client API for all services is as follows:
/*
* WSGClient.java