none
WCF reply/request design pattern for two way xml communication RRS feed

  • Question

  • Hi,

    I am trying to create wcf library for creating xml request and response for that request to client.

    My client application will request with xml in which they will send us username/password and other details to get something from server.

    Server will check the username and password in database for that client,if find match then reply with the third criteria.

    Request - 
    
    <?xml version="1.0" encoding="utf-8" ?>
    <Request>
    <SessionId>testetsetset343</SessionId>
    <Username>cd1</Username>
    <Password>cd1</Password>
    <ChannelId>118</ChannelId>
    <Request>
    
    Response -
    <?xml version="1.0"?>
    <Response>
    <ChannelId>118</ChannelId>
    <Status>Success</Status>
    <PropertyId>172</HotelId>
    <PropertyName>test1</HotelName>
    <PropertyId>173</HotelId>
    <PropertyName>test2</HotelName>
    </Response>
    
    
    

    As far as I know I have to create WCF Server which will have method that will accept this xml request.Check against the database for authentication, reply with PropertyId and PropertyName that is asoociated to channelId.

    Thanks

    Friday, July 30, 2010 3:28 PM

All replies

  • Hello there,

     

    Why you need to xml communication. You can simple opeartion contract method for example

     

    [ServiceContract]

    public interface ILogin

    {

       [OperationContract]

       bool login(string username , string password);

    }

     

    Please do recheck you functional requirement with respect to user lo gin.

     

    Hope this helps

     

    Regards,

    Phijo Mathew Philip.


    PHIJO MP
    Thursday, September 23, 2010 12:55 PM