Feeding App domain objects with Data from distant Webservice RRS feed

  • Question

  • Hi,

    I want to consume a WCF Webservice in my application. It is an internal webservice but it could be one from anyone (so I don't have DTO classes source code available).

    What I would like to do is using my own objects, not autogenerated classes from Webservice Reference.

    I've tried to create objects in my application with DataContract annotation and set the Name and Namespace annontation property using those in the autogenerated classes. I've made the same with DataMember.

    It always use autogenerated classes even if I configure the Webservice reference to reuse the objects I've developped in my client project.

    So here is a description of what I don't want and what I want :

    Now :

    ClientApp (using custom classes) -> Service Reference (returning automatically generated classes)-> Distant Webservice

    What I want :

    ClientApp (using custom classes) -> Service Reference (Here I would like it to return custom classes from ClientApp)-> Distant Webservice

    My question is : how to make it work (keeping in mind that I don't have classes code from Webservice) ?


    Monday, June 24, 2013 9:21 AM