Technical Note Using HP Web Services for Output Server HP Web Services for Output Server is an application that enables HP Output Server job management, document transfer, and delivery pathway management remotely through SOAP over HTTP protocol.
Using HP Web Services for Output Server Security Example & is used as & < is used as < > is used as > “ is used as " ‘ is used as ' Security HP Web Services for Output Server provides basic authentication based on the JAAS framework. You need to create and configure login modules to authenticate the users for HP Web Services for Output Server. By default, authentication is set to false.You can change authentication to true in the wsg.
Using HP Web Services for Output Server HP Web Services for Output Server configuration /* Get HPOSWeb Service Proxy */ HPOSGateway port = new HPOSGatewayService(endpoint, qname).getHPOSGatewayPort(); BindingProvider bp=(BindingProvider)port; SOAPBinding binding = (SOAPBinding)bp.getBinding(); Map map= bp.getRequestContext(); /* Pass the User Credentials like this (sets in HTTP Headers)*/ map.put(BindingProvider.USERNAME_PROPERTY,); map.put(BindingProvider.
Using HP Web Services for Output Server Managing the JBoss server You can view the settings in the JBoss_HOME/server/default/conf/jboss-log4j.xml file as follows: PAGE 5Using HP Web Services for Output Server Job management functions Delivering a job You can use HP Web Services for Output Server to submit jobs on HP Output Server logical destinations. HP Web Services for Output Server supports single document delivery and multiple document delivery with and without chunks. Single-document delivery The deliverJob API is used for single document delivery.
Using HP Web Services for Output Server Multiple-document print failure The following is an example of deliverJob response: 0 success dlm:1:72 0 success 0 success jqm:2530598
Using HP Web Services for Output Server Multiple-document print failure labld_ps1 - 0 success jqm:867208 pre-processing labld_file - 0 success jqm:932744 p
Using HP Web Services for Output Server Multiple-document print failure Response- createJobResponse object For .NET clients, Input param- createJob object createJob object will have only one argument. 1. XML createJob contract Response- createJobResponse object Table 1-2.
Using HP Web Services for Output Server Multiple-document print failure Web Service Name: sendDocuments Web Service Parameters Parameter 1 - XML sendDocuments contract Parameter 2 - DocumentData For .NET clients, Input param- sendDocuments object sendDocuments object will have two arguments. 1. XML sendDocuments contract 2. DocumentData which holds the data for the document. Response- sendDocumentsResponse object This API allows you to send multiple documents.
Using HP Web Services for Output Server Multiple-document print failure The following is an example of a sendDocuments response: 0 Success 0 Success dlm:1:72 0 success 0 s
Using HP Web Services for Output Server Multiple-document print failure createJobs will have only one argument. 1.
Using HP Web Services for Output Server Multiple-document print failure Input param- createDocuments object createDocuments object will have only one argument. 1. XML createDocuments contract Response- createDocumentsResponse object The following is an example of a createDocuments request: JOB:7AC0AEF8F7D13B3A831DDD917D562460:19 invoice.
Using HP Web Services for Output Server Multiple-document print failure Input param- sendChunks object sendChunks object will have two arguments. 1. XML sendChunks contract 2.
Using HP Web Services for Output Server Multiple-document print failure Users are authorized at the HP Output Server level to query jobs. This API achieves the same functionality as the pdq command on HP Output Server. Table 1-7.
Using HP Web Services for Output Server Multiple-document print failure The following is an example of a queryJobs response: 0 success has-more-chunks false dlm:1:72 0 success 0
Using HP Web Services for Output Server Multiple-document print failure Table 1-8.
Using HP Web Services for Output Server Multiple-document print failure The following is an example of a querySubJobs response on a destination: 0 success has-more-chunks false retained labld_ps jqm:2530598
Using HP Web Services for Output Server Multiple-document print failure Input param- cancelJobs object cancelJobs will have only one argument. 1. XML cancelJobs contract Response - cancelJobsResponse object Users are authorized at the HP Output Server level to cancel jobs. Canceling a job stops the delivery of the job including all subjobs. No request attribute is passed for the cancelJobs functionality. The operation attribute is a DLM job ID, and you can cancel multiple DLM jobs at the same time.
Using HP Web Services for Output Server Multiple-document print failure Canceling a subjob stops the delivery of the related job and all subjobs in it. Users are authorized at the HP Output Server level to cancel subjobs. No request attribute is passed for the cancelSubJobs functionality. The operation attribute is a JQM job ID, and can you cancel multiple JQM jobs at the same time. The response returns all the subjobs that are canceled.
Using HP Web Services for Output Server Multiple-document print failure Users are authorized at the HP Output Server level to modify jobs. The operation attributes set for modifyJobs store the job IDs. The job IDs are DLM job IDs and hold the attributes representing the destinations. Multiple DLM job IDs can be sent as part of the operation attributes. You can use new job attributes or modify the existing attributes to modify the jobs. Table 1-11.
Using HP Web Services for Output Server Multiple-document print failure Pausing jobs The pauseJobs API is used to pause HP Output Server jobs. The structure of the API is: Web Service Name: pauseJobs Web Service Parameters Parameter 1 - XML pauseJobs contract You can pause a job when it is in the pre-processing, document-transfer-pending, transferring, pending, queue, held, or interrupted job state. When the job state is aborting, processing, paused, or retained, you cannot pause a job.
Using HP Web Services for Output Server Multiple-document print failure Parameter 1 - XML pauseSubJobs contract For .NET clients, Input param- pauseSubJobs object pauseSubJobs will have only one argument. 1. XML pauseSubJobs contract Response- pauseSubJobsResponse object You can pause a subjob when it is in the pre-processing, document-transfer-pending, transferring, pending, or interrupted job state. Pausing is not possible when the job state is aborting, processing, paused, or retained.
Using HP Web Services for Output Server Multiple-document print failure Response- resumeJobsResponse object You can resume a job when the job state is paused. Resuming a job allows it to be processed to completion. Users are authorized at the HP Output Server level to resume jobs. This API achieves the same functionality as the pdresume command on HP Output Server. The operation attribute is a DLM job ID. Table 1-14.
Using HP Web Services for Output Server Multiple-document print failure The following is an example of a resumeSubJobs request: jqm:2530598 The following is an example of a resumeSubJobs response: 0 success jqm:2530598 0
Using HP Web Services for Output Server Multiple-document print failure Table 1-16.
Using HP Web Services for Output Server Multiple-document print failure Querying objects The queryObject API is used to list subjob or object attributes. The structure of the API is: Web Service Name: queryObject Web Service Parameters Parameter 1 - XML queryObject contract This API achieves the same functionality as the pdls command on HP Output Server. Table 1-17.
Using HP Web Services for Output Server Delivery pathway management functions The following is an example of a queryObjects response: 0 success has-more-chunks false labpd_ftp 0 success Delivery
Using HP Web Services for Output Server Delivery pathway management functions The following is an example of a createObjects request: destination pweb hpwd_physical_template dsm qweb NOTE: The createObjects API can be invoked through the method accepts the
Using HP Web Services for Output Server Delivery pathway management functions The following is an example of a deleteObjects request: destination pweb The following is an example of a deleteObjects response: 0 success 0
Using HP Web Services for Output Server Delivery pathway management functions The following is an example of an enableObjects response object: 0 success 0 success NOTE: The enableObjects API can be used for delivery pathway management functions and server management functions.
Using HP Web Services for Output Server Delivery pathway management functions The following is an example of disableObjects response object: 0 success 0 success NOTE: The disableObjects API can be used for delivery pathway management functions and server management functions.
Using HP Web Services for Output Server Delivery pathway management functions The following is an example of a pauseObjects response: 0 success 0 success Resuming objects The resumeObjects API is used to resume HP Output Server objects.
Using HP Web Services for Output Server SAP Print Path devices management functions SAP Print Path devices management functions You can manage SAP Print Path devices with SAP Print Path device management functionality.
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of CREATESAPDEVICE XML contract request: CREATESAPDEVICE hposadm hpom00 16.74.60.
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of DELETESAPDEVICE XML contract request: DELETESAPDEVICE hposadm hpom00 16.74.60.
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of MODIFYSAPDEVICE XML contract request: MODIFYSAPDEVICE hposadm hpom00 16.74.60.
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of LISTSAPDEVICE XML contract request: LISTSAPDEVICE hposadm hpom00 16.74.60.
Using HP Web Services for Output Server SAP Print Path devices management functions Table 1-28. LISTSAPDEVICES attributes (continued) Type Name Value Requirement Operation user-info A character data element with user-info as illustrated in the sample contract. Mandatory Operation device-info A character data element with SAP device info as illustrated in the sample contract.
Using HP Web Services for Output Server SAP Print Path devices management functions List SAP devices with all columns In addition to LISTSAPDEVICES XML contract operations, you can retrieve details of all columns of a SAP device. You must prefix/sufix * to the device name for wild card search. The following table lists the LISTSAPDEVICES_ALLCOL attributes. Table 1-29.
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of LISTSAPDEVICES_ALLCOL XML contract response: 0 success 0 success HPOMADM ... ...
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of LISTSAPLOMS XML contract response: 0 success 0 success Alfa Loms 1 ALFA1 ... ...
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of LISTSAPDEVICETYPES XML contract response: 0 success 0 XNNN ARCHIXOS ... ...
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of LISTSAPPAGEFORMATS XML contract response: 0 success 0 success hpos ... ...
Using HP Web Services for Output Server SAP Print Path devices management functions The following is an example of LISTSAPSPOOLSERVERS XML contract response: 0 success 0 success hpos_1 0 success
Using HP Web Services for Output Server Document transfer functions The following is an example of COUNTSAPDEVICES XML contract request: COUNTSAPDEVICES hposhpos100< /sysNum> 16.74.60.
Using HP Web Services for Output Server SSL http://wiki.jboss.org/wiki/SSLSetup NOTE: You must have signed certificates to configure SSL, which must be deployed on JBoss server. When you have the certificate, you can make changes to the server.xml file located at: DAZEL_HOME/share/server/default/deploy/jboss-web.deployer An example of snippet of server.xml file is as follows: PAGE 47Using HP Web Services for Output Server SSL if (file.isFile() == false) { char SEP = File.separatorChar; File dir = new File(System.getProperty("java.home") + SEP + "lib" + SEP + "security"); System.out.println(dir.getName()); file = new File(dir, "jssecacerts"); if (file.isFile() == false) { file = new File(dir, "cacerts"); } } System.out.println("Loading KeyStore " + file + "..."); InputStream in = new FileInputStream(file); KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); ks.
Using HP Web Services for Output Server SSL return; } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Server sent " + chain.length + " certificate(s):"); MessageDigest sha1 = MessageDigest.getInstance("SHA1"); MessageDigest md5 = MessageDigest.getInstance("MD5"); for (int i = 0; i < chain.length; i++) { X509Certificate cert = chain[i]; System.out.println(" " + (i + 1) + " Subject " + cert.getSubjectDN()); System.out.println(" Issuer " + cert.
Using HP Web Services for Output Server SSL StringBuilder sb = new StringBuilder(bytes.length * 3); for (int b : bytes) { b &= 0xff; sb.append(HEXDIGITS[b >> 4]); sb.append(HEXDIGITS[b & 15]); sb.append(' '); } return sb.toString(); } private static class SavingTrustManager implements X509TrustManager { private final X509TrustManager tm; private X509Certificate[] chain; SavingTrustManager(X509TrustManager tm) { this.
Using HP Web Services for Output Server Sample clients new javax.net.ssl.HostnameVerifier(){ public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) { //specify the hostname to which we want to connect to if(hostname.equals("")){ return true; } return false; } }); System.setProperty("javax.net.ssl.trustStore", TRUSTSTORE_URL) ; System.setProperty("javax.net.ssl.trustStorePassword", TRUSTSTORE_PW); Security.addProvider(new com.sun.net.ssl.internal.ssl.
Using HP Web Services for Output Server JBoss clustering with Apache load balancer on a single machine # Note: Changed from +ForwardURICompat. # See http://tomcat.apache.org/security-jk.html JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat "%w %V %T" # Mount your applications JkMount /HPOSGateway/* loadbalancer # You can use external file for mount points. # It will be checked for updates each 60 seconds.
Using HP Web Services for Output Server JBoss clustering with Apache load balancer on a single machine # worker.node1.connection_pool_size=10 (1) # Define Node2 # modify the host as your host IP or DNS name. worker.node2.port=8305 worker.node2.host= node2.mydomain.com worker.node2.type=ajp13 worker.node2.lbfactor=1 # worker.node1.connection_pool_size=10 (1) # Load-balancing behaviour worker.loadbalancer.type=lb worker.loadbalancer.
Using HP Web Services for Output Server JBoss clustering with Apache load balancer on multiple machines 11. Edit the JBoss_HOME/share/jboss/server/node1/conf/jboss-service.xml file by locating the ServiceBindingManager and add the value ${jboss.server.base.dir}/portBindings.xml to the attribute store URL. 12. Restart the JBoss application server 13. You can use the HP Web Services for Output Server landing page at http://localhost/HPOSGateway.
Using HP Web Services for Output Server JBoss clustering with Apache load balancer on multiple machines # Note: Changed from +ForwardURICompat. # See http://tomcat.apache.org/security-jk.html JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat "%w %V %T" # Mount your applications JkMount /HPOSGateway/* loadbalancer # You can use external file for mount points. # It will be checked for updates each 60 seconds.
Using HP Web Services for Output Server JBoss clustering with Apache load balancer on multiple machines # worker.node1.connection_pool_size=10 (1) # Define Node2 # modify the host as your host IP or DNS name. worker.node2.port=8009 worker.node2.host= node2.mydomain.com or IP address of machine 2 worker.node2.type=ajp13 worker.node2.lbfactor=1 # worker.node1.connection_pool_size=10 (1) # Load-balancing behaviour worker.loadbalancer.type=lb worker.loadbalancer.
Using HP Web Services for Output Server Non-HP Output Management Attributes 13. You can use the HP Web Services for Output Server landing page at http://localhost/HPOSGateway. 14. Access the HP Web Services for Output Server WSDL at http://localhost/HPOSGateway/HPOSGateway?wsdl. 15. Access the status manager at http://localhost/jkstatus. Non-HP Output Management Attributes The following table lists the non-HP Output Management attributes. Table 1-35.
Using HP Web Services for Output Server Automated steps to build WSG client proxies using Integrated Development Environment (IDE) vii. Select JAX Version as JAX-WS. viii. Click Finish. 3. To create jar files for proxies you need to perform the following steps: i. Right-click on the project and select Clean and Build Project. A .jar file will be created in the project (project_home/dist) created in step 1 iv. 4. You can create the Web Services for Output Server client by importing the proxies.
Using HP Web Services for Output Server Automated steps to build WSG client proxies using Integrated Development Environment (IDE) HP Web Services for Output Server 58