>
> Aki, in the code you posted,
>
> for (String path : getDestinationsPaths()) {
> if (address.startsWith(path)
> && path.length() > len) {
> ret = getDestinationForPath(path);
> len = path.length();
> }
> }
>
> It should probably be just
>
> if (path.startsWith(adddress)
>
> That will make sure /soapaddress destinations won't catch
> /soapaddress2 requests but will /soapaddress/1.
>
Sorry, I got confused, the above suggestion is also incorrect :-).
Given /soapaddress2 and destination address /soapaddress,
path.startsWith(adddress) would fix it but we'd get /soapaddress
delivered to /soapaddress2 destinations, so as you suggested, the
address (/soapaddress2 or /soapaddress2/2) has to be split into
segments and the first segment needs to match exactly the endpoint
address, that should probably work, what do you think ?
thanks, Sergey