Calling ServiceStack service from WCF client

I have an old SOAP service developed using WCF and also a number of .NET clients using WCF to call the service.

I have created a new service using the ServiceStack framework that implements the same functionality. Is it possible to call ServiceStack from WCF clients without any code or config changes to the clients?

I am free to make any needed changes to the ServiceStack service.

Edit: A small step forward. After adding the correct namespace to AssemblyInfo.cs and appending "/soap11" to the URL the correct service method is finally invoked but the parameter data is not transferred.

The WCF proxy method called in the client takes one parameter "e" which is a class with some string and int properties. The SOAP body sent over the wire begins with:

<MyMethod xmlns="http://mynamespace">
  <e>
    <PropertyA xmlns="http://schemas.datacontract.org/2004/07/MyProject.Service.Entities">somestring</PropertyA>
    <PropertyB xmlns="http://schemas.datacontract.org/2004/07/MyProject.Service.Entities">123</PropertyB>

The ServiceStack DTO looks like:

[DataContract]
public class MyMethod
{
  [DataMember] public EventData e { get; set; }
}

[DataContract]
public class EventData
{
  [DataMember] public string ProperyA { get; set; }
  [DataMember] public int ProperyB { get; set; }
  ...
}

How do I add the correct property namespace definitions in the service? Should I need to?

Answers


Adding correct namespace to the DataContract attribute in my parameter class solved the problem.

[DataContract(Namespace = "http://schemas.datacontract.org/2004/07/MyProject.Service.Entities")]
public class EventData
{
  [DataMember] public string ProperyA { get; set; }
  [DataMember] public int ProperyB { get; set; }
  ...
}

Need Your Help

Access user control type from a dll?

c# asp.net user-controls

I have a user control (under a website project)

Google Glass remote authentication

google-glass

I am looking at the remote authentication API provided by https://developers.google.com/glass/develop/gdk/authentication.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.