Hi, There is no way to get the hostname/ip address automatically for a multi-homed machine. The url you see is informational. You can customize it by specifying the baseURIs in node.xml or the NodeConfiguration API. For example,
<?xml version="1.0" encoding="UTF-8"?> <node xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns="http://tuscany.apache.org/xmlns/sca/1.1" xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1" uri="mynode" domainRegistry="vm:default" domain="default"> <!-- Configure the base URIs for a given binding --> <!-- Each base URI is for a protocol supported by the binding --> <binding name="sca:binding.ws" baseURIs="http://localhost" /> <binding name="tuscany:binding.http" baseURIs="http://localhost" /> <binding name="tuscany:binding.rest" baseURIs="http://localhost" /> <binding name="tuscany:binding.jsonrpc" baseURIs="http://localhost" /> </node> On Sep 20, 2012, at 5:33 AM, rgc wrote: > for example, i write the binding uri in my composite file like this: > > <service name="DBService" > > <tuscany:binding.jsonrpc uri="/DBComponent/DBService" /> > </service> > > after i have launched the app, i will print the endpoint as the following: > > Endpoint: URI = DBComponent#service-binding(DBService/DBService): > component=DBComponent > service=DBService > isRemote=false > isAsyncInvocation=false > requiredIntents=[] > policySets=[] > > binding=org.apache.tuscany.sca.binding.jsonrpc.impl.JSONRPCBindingImpl@176eeb9 > > deployedUri=http://127.0.1.1:8080/cn.edu.nju.moon.version-consistency/DBComponent/DBService/ > > > what should i do to change 127.0.1.1 to my eth0 ip address if i do not change > binding uri in my composite file? > > in windows, when i launch my app, i can get my ethernet ip in deployedUri, > like this: > > deployedUri=http://114.212.84.235:8080/cn.edu.nju.moon.version-consistency/DBComponent/DBService/ > > 114.212.84.235 is my ethernet ip address in windows, i want get this ip in > ubuntu also, not 127.0.0.1 > > yours.
