Pratik  Patil

Pratik Patil

  • NA
  • 60
  • 19.1k

SOAP Response in WCF

Mar 16 2016 2:32 AM
Hi,

I have created WCF service. It is working fine but our client want response in some specific form. I have shared 2 responses

My Response :

<s:Body>
<GetMyDataResponse xmlns="http://tempuri.org/">
<GetMyDataResult xmlns:a="http://schemas.datacontract.org/2004/07/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:ID>1</a:ID>
<a:Name>Pratik</a:Name>
</GetMyDataResult>
</GetMyDataResponse>
</s:Body>

Client Expectation:

<s:Body>
<GetMyDataResponse xmlns="http://tempuri.org/">
<GetMyDataResult><![CDATA[<Abc>
<xs:schema id="Abc" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="Abc" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Demo">
<xs:complexType>
<xs:attribute name="ID" type="xs:int" />
<xs:attribute name="Name" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<Demo ID="1" Name="Pratik" />
</Abc></GetMyDataResult>
</GetMyDataResponse>
</s:Body>



Please Help

What I have tried:

I have tried with our normal SOAP WCF Service, Also I have tried with changing different bindings

Answers (1)