WebService on Server with multiple network cards

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

WebService on Server with multiple network cards

Postby tstalzer » Tue May 22, 2007 12:47 am


we had a little problem to get a WebService working on a Server with multiple network cards. The WebService should not open a port on all the cards but just on one distinct IP address for one network card.

In the transport definition for the http server, we were using the "http://hostname:portno" definition, however in the method SstWSNetworkTransportStrategy>>transportUrlFor:from: during the copy of the SstUrl, the host got ignored.

We changed the following line in the method to the following code and everything seems to work now.

Code: Select all
   transportUrl address: (':', port printString).


Code: Select all
   transportUrl address: (anSstUrl host, ':', port printString).

So the method looks like this:
Code: Select all
SstWSNetworkTransportStrategy>>transportUrlFor: anSstUrl from: aContainer
   " Check the transport mappings in @aContainer.  If a mapping occurs, derive a URL from the mapping
   that can be used to determine the correct transport configuration for @anSstUrl "

   | transportScheme transportUrl port |
   transportUrl := anSstUrl copy path: '/'.
   ( transportScheme := aContainer configuration transportSchemeFor: anSstUrl ) notNil
      ifTrue: [
         transportUrl transport: transportScheme ;
            scheme: transportScheme ].
   port := anSstUrl port ifNil: [ anSstUrl class defaultPort ].
   transportUrl address: (anSstUrl host, ':', port printString).


Posts: 65
Joined: Mon Oct 16, 2006 12:07 am
Location: Palma de Mallorca - Spain

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest