本文整理匯總了Java中org.apache.axis.client.Call.setReturnClass方法的典型用法代碼示例。如果您正苦於以下問題:Java Call.setReturnClass方法的具體用法?Java Call.setReturnClass怎麽用?Java Call.setReturnClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.axis.client.Call
的用法示例。
在下文中一共展示了Call.setReturnClass方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: _get
import org.apache.axis.client.Call; //導入方法依賴的package包/類
private CacheEntry _get(String cacheName,String method,String key) throws ServiceException, MalformedURLException, RemoteException {
Service service = new Service();
Call call = (Call) service.createCall();
call.registerTypeMapping(
Element.class,
element,
BeanSerializerFactory.class,
BeanDeserializerFactory.class);
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://soap.server.ehcache.sf.net/", method));
call.addParameter("arg0", Constants.XSD_STRING, String.class, ParameterMode.IN);
call.addParameter("arg1", Constants.XSD_STRING, String.class, ParameterMode.IN);
call.setReturnClass(Element.class);
call.setReturnQName(element);
return new SoapCacheEntry((Element) call.invoke( new Object[] {cacheName,key } ));
}
示例2: _remove
import org.apache.axis.client.Call; //導入方法依賴的package包/類
private boolean _remove(String cacheName,String method,String key) throws ServiceException, MalformedURLException, RemoteException {
Service service = new Service();
Call call = (Call) service.createCall();
call.registerTypeMapping(
Element.class,
element,
BeanSerializerFactory.class,
BeanDeserializerFactory.class);
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://soap.server.ehcache.sf.net/", method));
call.addParameter("arg0", Constants.XSD_STRING, String.class, ParameterMode.IN);
call.addParameter("arg1", Constants.XSD_STRING, String.class, ParameterMode.IN);
call.setReturnClass(boolean.class);
call.setReturnQName(Constants.XSD_BOOLEAN);
return ((Boolean)call.invoke( new Object[] {cacheName,key } )).booleanValue();
}
示例3: main
import org.apache.axis.client.Call; //導入方法依賴的package包/類
public static void main(String[] args) {
try {
// String endpointURL = " http://cbioqa101.nci.nih.gov:49080/caAdapterWS/ws/caAdapterTransformationService";
// String endpointURL = " http://cbiovdev5054.nci.nih.gov/caAdapterWS/ws/caAdapterTransformationService";
// String endpointURL = " http://caadapter-stage.nci.nih.gov/caAdapterWS/ws/caAdapterTransformationService";
// String endpointURL = " http://caadapter.nci.nih.gov/caAdapterWS/ws/caAdapterTransformationService";
if (args.length<3)
{
System.out.println("TestCaadapterWebservice Usage:[scenarioName][cvsString]|[endURL]");
return;
}
System.out.println("TestCaadapterWebservice...scenarioName:"+args[0]);
System.out.println("TestCaadapterWebservice...cvsString:"+args[1]);
System.out.println("TestCaadapterWebservice...endURL:"+args[2]);
//read WS paramters
String scenarioName= args[0];
String cvsFileName=args[1];
String csvString =TestCaadapterWebservice.buildCsvString(cvsFileName);
String endpointURL =args[2];
//build service call
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpointURL));
String methodName = "transformationService";
call.setOperationName(methodName);
call.addParameter("parameter_name", XMLType.XSD_STRING,ParameterMode.IN );
call.addParameter("csvstringname", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnClass(java.util.ArrayList.class);
ArrayList res = (ArrayList)call.invoke(new Object[]{scenarioName,csvString});
System.out.println(res);
}catch(Exception e) {
e.printStackTrace();
}
}
示例4: main
import org.apache.axis.client.Call; //導入方法依賴的package包/類
public static void main(String[] args) {
try {
if (args.length<4)
{
System.out.println("TestCaadapterWebservice Usage:[scenarioName]|[sourceData]|[endURL]|[operationName]");
return;
}
System.out.println("CmtsWebserviceClient.main...scenarioName:"+args[0]);
System.out.println("CmtsWebserviceClient.main...sourceData:"+args[1]);
System.out.println("CmtsWebserviceClient.main...endURL:"+args[2]);
System.out.println("CmtsWebserviceClient.main()...operation:"+args[3]);
//read WS parameters
String scenarioName= args[0];
String sourceDataResource=args[1];
String endpointURL =args[2];
String operationnName=args[3];
//build service call
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpointURL));
call.setOperationName(operationnName);
call.addParameter("arg0", XMLType.XSD_STRING,ParameterMode.IN );
call.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnClass(java.lang.String.class);
Object result;
if(operationnName.equalsIgnoreCase("transferData"))
{
String sourceDataString =CmtsWebserviceClient.buildCsvString(sourceDataResource);
result = call.invoke(new Object[]{scenarioName,sourceDataString});
}
else
result = call.invoke(new Object[]{scenarioName,sourceDataResource});//, sourceType});
// call.addParameter("mappingScenario", XMLType.XSD_STRING,ParameterMode.IN );
// call.addParameter("sourceDataString", XMLType.XSD_STRING, ParameterMode.IN );
// call.addParameter("sourceType", XMLType.XSD_STRING,ParameterMode.IN );
// call.setReturnClass(java.util.ArrayList.class);
// ArrayList<String> res = (ArrayList<String>)call.invoke(new Object[]{scenarioName,sourceDataString});//, sourceType});
System.out.println("CmtsWebserviceClient.main()..\n"+result);
}catch(Exception e) {
e.printStackTrace();
}
}
示例5: getCache
import org.apache.axis.client.Call; //導入方法依賴的package包/類
public Cache getCache(String cacheName) throws Exception {
Service service = new Service();
TypeMapping tm = service.getTypeMappingRegistry().getDefaultTypeMapping();
TypeMappingUtil.registerBeanTypeMapping(tm, CacheConfiguration.class, cacheConfiguration);
TypeMappingUtil.registerBeanTypeMapping(tm, Cache.class, cache);
Call call = (Call) service.createCall();
call.registerTypeMapping(
Cache.class,
cache,
BeanSerializerFactory.class,
BeanDeserializerFactory.class);
call.registerTypeMapping(
CacheConfiguration.class,
cacheConfiguration,
BeanSerializerFactory.class,
BeanDeserializerFactory.class);
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://soap.server.ehcache.sf.net/", "getCache"));
call.addParameter("arg0", Constants.XSD_STRING, String.class, ParameterMode.IN);
call.setReturnClass(Element.class);
call.setReturnQName(cache);
//Object ret = call.invoke( new Object[] { } );
return (Cache) call.invoke( new Object[] {cacheName } );
}