Jawab How to design WCF service for my scenario

  • Thursday, May 03, 2012 9:30 AM
     
     

    I am going to develop a REST based service.The consumers of this service post xml.each consumer use different type of xml.and i have to respond based on the type of xml posted to a method.i have to parse the xml and need to identify which client send the xml.

    is i need to develop separate services for each client and link it through routing service in wcf 4.0


    http://vivekcek.wordpress.com

All Replies

  • Friday, May 04, 2012 1:14 AM
    Moderator
     
     Answered
    Hello, routing service only works for SOAP. You can't use it for a REST service. In your scenario, you can either create a single service or multiple services. If you use a single service, you can parse the request xml, and send a corresponding response. You don't have to identify which client sends the request. You can use the request xml to determine what response to send. If you use multiple services, you can host them in different addresses, and ask each client to connect to a specific service. Inside the service implementations, you can reuse some common logics if needed.

    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email.