WCF with legacy apps design

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SvenV
    New Member
    • Oct 2008
    • 50

    WCF with legacy apps design

    Hello,

    I'm quite new to WCF and want to use it in a project that I'm currently working on. I need some advice though.

    The legacy application that I currently have created an xml file with data. About 20 elements / line.
    Now this data needs to be transported to a server where it will be inserted in a database.
    Currently the xml is serialized to bytes and sent via tcp/ip raw sockets to a host that is listening. That created back xml of the data and reads it. WIth a big switch the application looks for nodes and tries to make something readable of it and then inserts it in the database. The legacy app can't access the database so the insertion can't happen there.

    Now I wanted to optimize this because I don't really like the setup.
    What I wanted to do is the following.

    - Create a class that represents the data in the xml
    - Annotate the class with XMLElement attributes
    - Create a WCF service that receives the data from the legacy app (via proxy client)
    - Deserialize the XML to objects of the previously created class
    - Save the object via NHibernate

    This purpose of this post is more to get the opinions of others who have had to do something simular.
    Next to that, what would be the best way to bring the data from the legacy app to the WCF service. Just create a string of the xml data and send it as a string? Or..what's the best way to do this?

    What about the transport reliability. What if the connection breaks while the message is being sent?

    Any pointers I should worry about?

    Do you have maybe some good resources when it comes to this subject?
    Can it be seen as SOA in .NET?

    Thanks in advance
Working...