Hi Alain,
thanks for your answer, but it seems as if the NetworkInterface-class
would just be able to give you information about the interfaces.

For me, it is important to tell the program which Interface to use,
because the webserver I'm working on got different IP's in different
sub-networks.

So, I am looking for a method like setHostAdress(foo). Maybe this is
more a part of java than axis, but the Axis-Call-class seems to handle
the whole hardware/network-stuff on it's own.

I can't believe that there is no smart way to handle this.

Carsten


Am Montag, den 15.05.2006, 16:28 +0200 schrieb Pannetier Alain:
> Hi Carsten,
> 
> Here is an example I use to know whether I'm in the office or at
> home :  
> 
> try { 
>         Enumeration myInterfaces =
> NetworkInterface.getNetworkInterfaces(); 
>   interfaceEnum: 
>       while ( myInterfaces.hasMoreElements()) { 
>           NetworkInterface netInterf = (NetworkInterface) 
>           myInterfaces.nextElement(); 
>           Enumeration addresses = netInterf.getInetAddresses() ; 
>           while (addresses.hasMoreElements()) { 
>               InetAddress address = (InetAddress)
> addresses.nextElement(); 
>               if
> ( address.getHostAddress().startsWith( OFFICE_PREFIX ) ) { 
>                   isAtTheOffice = true ; 
>                   break interfaceEnum ; 
>                   } 
>               } 
>           } 
>      } catch (SocketException e) { 
>           e.printStackTrace(); 
>      } 
> ...
> 
> It shows how to loop on all your interfaces and select one (according
> to its address prefix...).
> 
> That's probably close to what your're after.
> 
> Alain
> 
> 
> -----Original Message----- 
> From: Schmidt, Carsten -81.01- [mailto:[EMAIL PROTECTED]  
> Sent: 15 May 2006 16:17 
> To: [email protected] 
> Subject: RE: Select the output-network-interface to call an
> axis-webservice
> 
> Hi, 
> did really no one every had a problem like that? 
> This problem can not be so special, can it?
> 
> But maybe you know another mailinglist or a book, which might be able
> to help me?
> 
> It is really important for me to find a solution for that, and
> meanwhile I ain't got no more idea where to look at.
> 
> Regards,
> 
> Carsten
> 
> >  
> > Hi everybody, 
> > maybe this question has already been answered a thousend times, but
> I 
> > haven't found anything about it. 
> > I got a server with a few different network adapters. Each of them
> with 
> > a different IP. Now I'm searching for a way to call a webservice by 
> > choosing exacly one of those adapters (which is not the default
> one). 
> >  
> > How can I do than? 
> >  
> > java.net.NetworkInterface shows me what is available, but where can
> it 
> > set what to use? org.apache.axis.client.Call? 
> > org.apache.axis.client.Service? 
> >  
> > Can anybody help me? 
> >  
> > Carsten
> 
> 
> 
> 

Reply via email to