1 19 package org.openharmonise.him.reports; 20 21 import java.net.*; 22 23 import org.apache.axis.client.Call; 24 import org.apache.axis.client.Service; 25 26 import javax.xml.namespace.QName ; 27 import javax.xml.rpc.ServiceException ; 28 29 36 public class ReportServiceClient { 37 public static final String SIMULACRA_WEBSERVICE_NAMESPACE_URI = 38 "http://webservices.simulacra.thebritishmuseum.ac.uk"; 39 40 43 public ReportServiceClient() { 44 super(); 45 } 46 47 58 public static String executeQuery( 59 URL endpoint, 60 String sPath, 61 String sUserName, 62 String sPassword) 63 throws java.rmi.RemoteException , ServiceException { 64 65 Service service = new Service(); 66 Call call = (Call) service.createCall(); 67 68 call.setTargetEndpointAddress(endpoint); 69 call.setOperationName( 70 new QName (SIMULACRA_WEBSERVICE_NAMESPACE_URI, "executeQuery")); 71 72 call.addParameter( 73 "sPath", 74 org.apache.axis.Constants.XSD_STRING, 75 javax.xml.rpc.ParameterMode.IN); 76 call.addParameter( 77 "sUserName", 78 org.apache.axis.Constants.XSD_STRING, 79 javax.xml.rpc.ParameterMode.IN); 80 81 call.addParameter( 82 "sPassword", 83 org.apache.axis.Constants.XSD_STRING, 84 javax.xml.rpc.ParameterMode.IN); 85 86 call.setReturnType(org.apache.axis.Constants.XSD_STRING); 87 call.setReturnClass(String .class); 88 89 String ret = 90 (String ) call.invoke( 91 new Object [] { 92 sPath, 93 sUserName, 94 sPassword}); 95 96 return ret; 97 } 98 } 99
| Popular Tags
|