OK -- here is the latest cut. Straight inline. Sorry if the format sucks. Once again, I didn't compile it, but it is a moral equivalent of what I am using successfully in a project, so there ya go. I am still interested in monkeying around with the peer-to-peer, federated referral stuff, so I will keep you posted. I am thinking ip multicast wse transport with really tiny messages.
mmm. multicast.
public class AnyRouter:SoapReceiver { public AnyRouter() { Pipeline.IsIntermediary = true; }protected override void Receive(SoapEnvelope envelope)
{
Uri newAddress = ReferralCache.ResolvePath(envelope.Context.Addressing.To.Value);
if( newAddress == null )
{
throw new AddressingFault(
AddressingFault.EndpointUnavailableMessage,
AddressingFault.EndpointUnavailableCode );
}
SoapSender sender = new SoapSender(new EndpointReference(
envelope.Context.Addressing.To.Value,
newAddress));
sender.Pipeline.IsIntermediary=true;
sender.Send(envelope);
}
}
Posted by: Damon Cole | 2004.11.20 at 04:47 PM