We are in the process of designing a simple service-oriented architecture using WCF as the implementation framework. There are a handful of services that a few applications
It seems it is sufficient to build an interface as follows:
[OperationContract(Action="*", ReplyAction="*")]
Message CallThis(Message msg);
I also found this post useful for implementing the CallThis method by "fiddling" with Message objects. A basic implementation of the CallThis method follows:
public Message CallThis(Message message) {
MessageBuffer buffer = message.CreateBufferedCopy(524288);
Message output = buffer.CreateMessage();
output.Headers.To = ;
BasicHttpBinding binding = new BasicHttpBinding();
IChannelFactory factory = binding.BuildChannelFactory();
factory.Open();
IRequestChannel channel = factory.CreateChannel(new EndpointAddress());
channel.Open();
Message result = channel.Request(output);
message.Close();
output.Close();
factory.Close();
channel.Close();
return result;
}
Adding authentication and authorization should be quite straightforward.