1

as you can see, I am relatively new on SO please don't kill me after posting this question :) I will do my best to describe the dilemma I am currently in.

I am creating something like a "Guardian Service" that is hosted on Windows Azure inside a Worker Role. This service has external ports, that can be accessed via HTTPS to allow clients to call it's service methods.

The WCF service is meant to call other services hosted in other Worker Roles that have only internal ports open, and which can be accessed only through the use of the Guardian Service. That's the main idea. Similar to a proxy or something.

I read already an excellent article from Jim O'Neil, what the caveats are when you try to access internal service points from within other WCF Services hosted in worker Roles:

His blog Troubleshooting Endpoints on a WCF Web Role

This is not the point for this question, and totally clear to me how to do that.

I have no idea at the moment, how I could do this, without implementing every contract from every single service I want to make accessible from within the Guardian Service to the outside world.

There must be a better way to decouple those things.

Any tips are appreciated.

Thank you.

4

1 回答 1

1

我不知道您项目的确切要求,但我会说您正在寻找的是 WCF 路由。我过去曾使用它来重定向不同版本的 Workflow 实例的请求。

它的工作方式对于连接到其端点的客户端是完全透明的。路由器实现必须根据请求数据(消息头和正文)决定将请求发送到哪里。

在您的情况下,如果您正确使用 SOAP 和命名空间,您可能能够根据消息肥皂地址做出决定,然后将请求发送到正确的端点。您还可以查看消息的 Action 属性。

一些可能有用的链接:http: //msdn.microsoft.com/en-us/library/ee517423.aspx http://www.codeproject.com/Articles/227699/RoutingService-on-Azure

于 2013-01-13T16:34:44.697 回答