how to pass domain,port number,username and password from user input to worklight http adapter

和自甴很熟 提交于 2019-11-28 12:28:31

问题


read values from user input

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

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

  1. i am trying to access from process servers running in different pcs.....
  2. if i specify details like above it will become specific to one system only...

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


回答1:


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. Use two adapters with different procedures and on the client-side add some logic that will call the right procedure whenever required.

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



来源:https://stackoverflow.com/questions/15522613/how-to-pass-domain-port-number-username-and-password-from-user-input-to-workligh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!