HPOSSOD 1.0 Technical Note
HP Web Services for Output Server 39
Using HP Web Services for Output Server
Sample clients
*/
package wsgclientexample;
import java.net.URL;
import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.soap.SOAPBinding;
import com.hp.om.hpos.wsg.client.pxoxy.HPOSfor Output Server;
import com.hp.om.hpos.wsg.client.pxoxy.HPOSGatewayService;
import com.hp.om.hpos.wsg.client.pxoxy.DocumentData;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
/**
* WSGClient Example<br>
* Steps for creating HP Web Services for Output Server client<br>
* 1) Identify the WSDL Location<br>
* 2) Create the proxies for HP Web Services for Output Server client using
WSDL.<br>
* 3) Import proxy package into this class (example, com.hp.om.hpos.wsg.cli-
ent.proxy.*)<br>
*/
public class WSGClient {
private HPOSGateway port;//HP Web Services for Output Server Proxy
private BindingProvider bp;
private Map<String,Object> map;
/**
* @param user UserName
* @param psw Password
* @param ip Ip address of the HP Web Services for Output Server
* @param wsgPort Port number of the HP Web Services for Output Server
*/
public WSGClient(String user,String psw,String ip,String wsgPort) throws
Exception{
/* Add IP and Port */
URL endpoint_new = new URL("http://"+ip+":"+wsgPort + "/HPOSGate-
way/HPOSGateway?wsdl");
QName qname = new QName("http://wsg.hpos.om.hp.com/", "HPOSGatewaySer-