how to pass domain,port number,username and passwo

2019-01-29 09:15发布

问题:

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.