• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java XmlRpcClientLite类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.xmlrpc.XmlRpcClientLite的典型用法代码示例。如果您正苦于以下问题:Java XmlRpcClientLite类的具体用法?Java XmlRpcClientLite怎么用?Java XmlRpcClientLite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XmlRpcClientLite类属于org.apache.xmlrpc包,在下文中一共展示了XmlRpcClientLite类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: callWebserviceLite

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
public static Object callWebserviceLite(String procedureName, Vector params){
    log2.debug("#CALLmyDRUGREF-"+procedureName);
    Object object = null;

    String server_url = OscarProperties.getInstance().getProperty("MY_DRUGREF_URL","http://mydrugref.org/backend/api");
    MiscUtils.getLogger().debug("server_url: "+server_url);
    TimingOutCallback callback = new TimingOutCallback(30 * 1000);
    try{
        log2.debug("server_url :"+server_url);
        XmlRpcClientLite server = new XmlRpcClientLite(server_url);
        server.executeAsync(procedureName, params, callback);
        object = callback.waitForResponse();
    } catch (TimeoutException e) {
        log2.debug("No response from server."+server_url);
    }catch(Throwable ethrow){
        log2.debug("Throwing error."+ethrow.getMessage());
    }
    return object;
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:20,代码来源:RxUtil.java


示例2: callWebserviceLite

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
public Object callWebserviceLite(String procedureName, Vector params){
    log2.debug("#CALLmyDRUGREF-"+procedureName);
    Object object = null;

    String server_url = OscarProperties.getInstance().getProperty("MY_DRUGREF_URL","http://mydrugref.org/backend/api");

    TimingOutCallback callback = new TimingOutCallback(10 * 1000);
    try{
        log2.debug("server_url :"+server_url);
        XmlRpcClientLite server = new XmlRpcClientLite(server_url);
        server.executeAsync(procedureName, params, callback);
        object = callback.waitForResponse();
    } catch (TimeoutException e) {
        log2.debug("No response from server."+server_url);
    }catch(Throwable ethrow){
        log2.debug("Throwing error."+ethrow.getMessage());
    }
    return object;
}
 
开发者ID:oscarservice,项目名称:oscar-old,代码行数:20,代码来源:RxMyDrugrefInfoAction.java


示例3: hashExcute

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
public Hashtable hashExcute(String strMethod, Vector<String> params) {
    try {
        XmlRpcClientLite xmlrpc = new XmlRpcClientLite(strXmlRpcUrl);
        Object obj = xmlrpc.execute(strMethod, params);
        if (obj instanceof Hashtable) {
            return (Hashtable) (obj);
        }
        return null;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}
 
开发者ID:zhaoxi1988,项目名称:sjk,代码行数:14,代码来源:BaseXmlRpc.java


示例4: strExcute

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
public String strExcute(String strMethod, Vector<String> params) {
    try {
        XmlRpcClientLite xmlrpc = new XmlRpcClientLite(strXmlRpcUrl);
        Object obj = xmlrpc.execute(strMethod, params);
        if (obj instanceof String) {
            return String.valueOf(obj);
        }
        return "";
    } catch (Exception e) {
        e.printStackTrace();
        return "";
    }
}
 
开发者ID:zhaoxi1988,项目名称:sjk,代码行数:14,代码来源:BaseXmlRpc.java


示例5: remoteExcute

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
public Object remoteExcute(String strMethod, Vector<String> params) {
    try {
        XmlRpcClientLite xmlrpc = new XmlRpcClientLite(strXmlRpcUrl);
        Object obj = xmlrpc.execute(strMethod, params);
        return obj;
    } catch (Exception e) {
        e.printStackTrace();
        return null;
    }
}
 
开发者ID:zhaoxi1988,项目名称:sjk,代码行数:11,代码来源:BaseXmlRpc.java


示例6: getEditorCommand

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
/**
 * Get editor command
 *
 * @return the editor command
 */
@NotNull
public synchronized String getEditorCommand() {
  synchronized (myScriptLock) {
    if (myEditorCommand == null) {
      ScriptGenerator generator = new ScriptGenerator(GIT_REBASE_EDITOR_PREFIX, GitRebaseEditorMain.class);
      generator.addInternal(Integer.toString(BuiltInServerManager.getInstance().getPort()));
      generator.addClasses(XmlRpcClientLite.class, DecoderException.class);
      myEditorCommand = generator.commandLine();
    }
    return myEditorCommand;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:GitRebaseEditorService.java


示例7: getScriptPath

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
/**
 * Get file to the script service
 *
 * @return path to the script
 * @throws IOException if script cannot be generated
 */
@NotNull
public File getScriptPath() throws IOException {
  ScriptGenerator generator = new ScriptGenerator(myScriptTempFilePrefix, myScriptMainClass);
  generator.addClasses(XmlRpcClientLite.class, DecoderException.class, FileUtilRt.class);
  customizeScriptGenerator(generator);

  synchronized (SCRIPT_FILE_LOCK) {
    if (myScriptPath == null || !myScriptPath.exists()) {
      myScriptPath = generator.generate();
    }
    return myScriptPath;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:GitXmlRpcHandlerService.java


示例8: GitAskPassXmlRpcClient

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
GitAskPassXmlRpcClient(int port) throws MalformedURLException {
  myClient = new XmlRpcClientLite("127.0.0.1", port);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GitAskPassXmlRpcClient.java


示例9: main

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
public static void main(String[] args)
		throws Exception
{
	XmlRpcClient rpcClient = new XmlRpcClientLite(URI + RPC_PATH);

	//Hit the projectDao
	Vector projects = (Vector)rpcClient.execute(buildRequest("getAllProjects"), EMPTY);
	System.err.println(projects.toString());

	//Hit the sutDao 
	Vector runners = (Vector)rpcClient.execute(buildRequest("getAllRunners"), EMPTY);
	System.err.println(runners.toString());

	//Hit the repositoryDao
	Vector repositories = (Vector)rpcClient.execute(buildRequest("getAllSpecificationRepositories"), EMPTY);
	System.err.println(repositories.toString());

	//Hit the documentDao
	/* @todo : */
	

	//Hit the old ConfluenceRpc
	Vector params = new Vector(3);
	params.add(USER_NAME);
	params.add(PASSWORD);

	Vector specs = new Vector(2);
	specs.add("GP");
	specs.add("Cell Decoration");
	specs.add(Boolean.TRUE);
	params.add(specs);
	String specification = (String)rpcClient.execute(buildRequest("getRenderedSpecification"), params);
	System.err.println(specification);

	String result = (String)rpcClient.execute(buildRequest("setSpecificationAsImplemented"), params);
	System.err.println(result);

	params.clear();
	params.add(USER_NAME);
	params.add(PASSWORD);

	specs.clear();
	specs.add("GP");
	params.add(specs);
	Vector specifications = (Vector)rpcClient.execute(buildRequest("getSpecificationHierarchy"), params);
	System.err.println(specifications);
}
 
开发者ID:strator-dev,项目名称:greenpepper,代码行数:49,代码来源:GreenPepperServerDebug.java


示例10: main

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
	public static void main(String[] args)
			throws Exception
	{
		XmlRpcClient rpcClient = new XmlRpcClientLite(URI + RPC_PATH);

		//Hit the projectDao
//		Vector projects = (Vector)rpcClient.execute(buildRequest("getAllProjects"), EMPTY);
//		System.err.println(projects.toString());
//
//		//Hit the sutDao 
//		Vector runners = (Vector)rpcClient.execute(buildRequest("getAllRunners"), EMPTY);
//		System.err.println(runners.toString());
//
//		//Hit the repositoryDao
//		Vector repositories = (Vector)rpcClient.execute(buildRequest("getAllSpecificationRepositories"), EMPTY);
//		System.err.println(repositories.toString());

		//Hit the documentDao
		/* @todo : */
		

		//Hit the old ConfluenceRpc
		Vector params = new Vector(3);
		params.add(USER_NAME);
		params.add(PASSWORD);

		Vector specs = new Vector(2);
		specs.add("GREENPEPPERDEMO");
		specs.add("Bank");
		specs.add(Boolean.TRUE);
		params.add(specs);
		String specification = (String)rpcClient.execute(buildRequest("getRenderedSpecification"), params);
		System.err.println(specification);

//		String result = (String)rpcClient.execute(buildRequest("setSpecificationAsImplemented"), params);
//		System.err.println(result);
//
//		params.clear();
//		params.add(USER_NAME);
//		params.add(PASSWORD);
//
//		specs.clear();
//		specs.add("GP");
//		params.add(specs);
//		Vector specifications = (Vector)rpcClient.execute(buildRequest("getSpecificationHierarchy"), params);
//		System.err.println(specifications);
	}
 
开发者ID:strator-dev,项目名称:greenpepper,代码行数:49,代码来源:GreenPepperServerDebug.java


示例11: callLocalServerManager

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
/**
 * Call the server manager on the local system.
 *
 * @param port What port on the local system the server manager is listening.
 * @param user User name to use for authentication.
 * @param password Authenticator for <var>user</var>.
 * @param method What method in the server manager to call.
 * @param params Parameters to pass to the method named by <var>method</var>.
 * @return The return value from the method named by <var>method</var>.
 * @throws Exception If any error occurs.
 */
public Object callLocalServerManager(int port, String user, String password, String method, List params)
	throws IOException, XmlRpcException {
	XmlRpcClientLite local = new XmlRpcClientLite("localhost", port);
	local.setBasicAuthentication(user, password);
	return local.execute(method, new Vector(params));
}
 
开发者ID:apache,项目名称:oodt,代码行数:18,代码来源:ExecServer.java


示例12: GitSSHXmlRpcClient

import org.apache.xmlrpc.XmlRpcClientLite; //导入依赖的package包/类
/**
 * A constructor
 *
 * @param port      port number
 * @param batchMode if true, the client is run in the batch mode, so nothing should be prompted
 * @throws IOException if there is IO problem
 */
GitSSHXmlRpcClient(final int port, final boolean batchMode) throws IOException {
  //noinspection HardCodedStringLiteral
  myClient = batchMode ? null : new XmlRpcClientLite("127.0.0.1", port);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:GitSSHXmlRpcClient.java



注:本文中的org.apache.xmlrpc.XmlRpcClientLite类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Version类代码示例发布时间:2022-05-23
下一篇:
Java NodeReorderEvent类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap