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.
transportUrl address: (':', port printString).
to
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).
^transportUrl
Regards
Thomas