ARTICLE

RIA Services - exposing SOAP endpoint

Posted by Pradeep Chandraker Articles | Silverlight with C# May 26, 2010
This article speaks about how to expose SOAP endpoint in RIA Services.
Reader Level:
Download Files:
 

This article speaks about how to expose SOAP endpoint in RIA Services. Sometime you may want to enable same business logic and data available to client other than Silverlight, this is very useful in that kind of scenario. SOAP service can be consumed by WPF and WinForm application also SOAP is very famous model in other technologies like Java.

To enable SOAP endpoint the domain service don't need any changes, you have to just add SOAP endpoint in Web.config

<domainServices>
      <endpoints>
        <add name="JSON" type="Microsoft.ServiceModel.DomainServices.Hosting.JsonEndpointFactory, Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="OData" type="System.ServiceModel.DomainServices.Hosting.ODataEndpointFactory, System.ServiceModel.DomainServices.Hosting.OData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="Soap" type="Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory, Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </endpoints>
</domainServices>

The URL of SOAP endpoint is combination of namespace and domain service name.

http://localhost:52878/Services/RIASample-Web-StudentDomainService.svc

1.gif
 
Here is the wsdl of SOAP endpoint.

2.gif 

You can add service reference in your application and start using SOAP endpoint.

Login to add your contents and source code to this article
post comment
     
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts