ibm-mobilefirstworklight-adaptersmobilefirst-adapters

giving the host url dynamically in mobilefirst adapter


Hello all I need to pass the host name or url for the adapter dynamically from the client side.i.e when the user login he needs to type the url which will be set to the ${domainname} in the adapter.xml file.help needed pls.Thnks in advance

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wl:adapter xmlns:wl="http://www.ibm.com/mfp/integration" xmlns:http="http://www.ibm.com/mfp/integration/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="SoapAdapter1">
    <displayName>SoapAdapter1</displayName>
    <description></description>
    <connectivity>
        <connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
            <protocol>http</protocol>
            <domain>${domain}</domain>
            <port>8001</port>
			<connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
			<socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
			<maxConcurrentConnectionsPerNode>2</maxConcurrentConnectionsPerNode>
        </connectionPolicy>
    </connectivity>

    <procedure name="userlog"></procedure>
    
  
</wl:adapter>


Solution

  • Those are not changeable values during runtime. You cannot decide dynamically where will the adapter connect to after the adapter has been built and deploy.

    You could try Andrew's suggestion here: IBM Worklight - How to change dynamically domain/hostname to which the adapter connects from the client at launch or runtime?