如何将用户输入的域名,端口号,用户名和密码传递给worklight http adapter [英] how to pass domain,port number,username and password from user input to worklight http adapter

查看:192
本文介绍了如何将用户输入的域名,端口号,用户名和密码传递给worklight http adapter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从用户输入读取值

XML:
  `<protocol>http</protocol>
  <domain>192.168.1.10</domain>  
  <port>9080</port>
  <username>user</username>
   <password>pwd</password>`

ok ....我会简要解释........

ok....i will explain briefly........


  1. 我试图从运行在不同
    pcs的进程服务器访问.. ...

  2. 如果我指定上述详细信息,它将仅限于一个
    系统......

所以我想从我想要连接的应用程序传递详细信息

So i want to pass details from my app to which i want to connect

推荐答案

基于问题的补充,答案仍然是 - 这是不可能的。您无法在运行时从应用程序(或从服务器)动态设置适配器的连接设置。

Based on the additions to the question, the answer is still - it is not possible. You cannot dynamically set the connectivity settings of an adapter from the application (or from the server) during runtime.

您没有解释连接到这些设备的必要性不同的数据源,所以我将给出两种不同场景的选择:

You didn't explain what is the need to connect to these different data sources, so I will give two options of different scenarios:


  1. 使用两个不同程序的适配器并在客户端上 - 方添加一些逻辑,可以在需要时调用正确的程序。

  1. Use two adapters with different procedures and on the client-side add some logic that will call the right procedure whenever required.

也许这个培训模块可以帮助你:高级适配器使用情况和混搭,如果这是您的方案。仔细阅读。

Perhaps this training module will help you: Advanced adapter usage and mashup, if this is your scenario. Read through it.

这篇关于如何将用户输入的域名,端口号,用户名和密码传递给worklight http adapter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆