none
Web service redirection to WCF RRS feed

  • Question

  • Hi,

    We have traditional web service which was written long back.  Now we are creating WCF service which will work exactly like web service. Without disturbing clients , we want to redirect the requests from web service to WCF service. We don't want to disturb any code in web service so thought of writing HTTPModule in webservice to redirect to WCF service. We have both Get and Post requests.

    We have tried to invoke wcf service in application begin request based on request url information, but the client is not receiving any soap response .

    If you have any alternative ideas or code snippets to perform this action please let us know .

    Wednesday, November 27, 2013 10:11 AM

Answers

  • Hi myowntest,

    A simple and straight way is to let your original web service's main code (web method) directly invoke the new WCF service operations and return the WCF operation result to web service front-end client. This will be easier and clear to implement than using http module based approach.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, November 28, 2013 3:41 AM
    Moderator

All replies

  • Hi,

    Maybe you can check the  WCF 4.0's Routing feature which seems to be just about what you're trying to do.

    Above .NET 4.0 and WCF 4.0, there is a new routing service built-in that you can use as a base class for your service implementation. It can be configured declaratively (or in code) using routing tables.

    #Routing Service:
    http://msdn.microsoft.com/en-us/library/ee517421(v=vs.110).aspx .

    #Getting Started with WCF 4.0 Routing Service:
    http://www.codeproject.com/Articles/423064/Getting-Started-with-WCF-4-0-Routing-Service .

    #How to create a Routing Service:
    http://www.dotnetcurry.com/ShowArticle.aspx?ID=470 .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, November 28, 2013 2:43 AM
    Moderator
  • Hi myowntest,

    A simple and straight way is to let your original web service's main code (web method) directly invoke the new WCF service operations and return the WCF operation result to web service front-end client. This will be easier and clear to implement than using http module based approach.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, November 28, 2013 3:41 AM
    Moderator