WCF For Matching Legacy SOAP Web Services

New WCF web services: Can you match my older SOAP messages?

When interoperability with vendors means matching existing services, you need to tweak the Data Contracts.

Java_Web_Service_Response_001

Legacy services can have some unique structures that are sometimes hard to match.

Using existing tools to build proxies are often little help because they add their own assumptions on the various DataContract attributes.

Web service programmers should study the element attributes and their behaviors to sculpt a matching SOAP response.

My recommendation is to start fresh with a new class that matches the existing SOAP service.

Begin with the base data classes that model what is already in place (example)

(Example service for an employee calling in to get a message  collection)

[DataContract]
public partial class identify_employee
{
[DataMember]
public string emp_ssn;
[DataMember]
public string emp_dob;
[DataMember]
public string emp_zip;
[DataMember]
public string employee_id;
[DataMember]
public string call_number_id;
}

[DataContract]
public partial class employee_response
{
[DataMember]
public string emp_firstname;
[DataMember]
public string emp_lastname;
[DataMember]
public EmpMessage[]  emp_messages;
}

public class EmpMessage
{
public string msgDateTime ;
public string msgText ;
}

 

 

Proactive technologist.

Posted in WCF Tagged with: ,

What do you think?