开发者

Creating dual WCF and ASMX services

We have a set of ASMX style web services which were created using the contract first paradigm by having WSDLs and XSDs supplied provided from an outside source.

We want to expose WCF services based on these WSDLs, but in the mean time we are also required to continue to provide ASMX services based on the supplied WSDLs.

I am curious if there is a way to use a shared Interface based on the WSDLs and/or a shared set of data objects that are generated based on the XSDs... Or another option was possibly wrapping the WCF service with an ASMX...

Any suggestions or previous experience with supporting both to mak开发者_开发问答e this transition period easier without entirely reinventing the wheel for both services?


Absolutely, it's totally possible.

The best way to do it is to have your WCF and ASMX services simply pass the request on to an internal class defined in an assembly referenced by both the ASMX and WCF service.

A refactor for your specific case to follow this paradigm would be trivial for nearly all cases.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜