Creating custom soap object in WCF XML serialization

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Creating custom soap object in WCF XML serialization



I am trying to create a SOAP object from WCF by XML serialization, For that am facing issue like some serialization doesn't met my expected output. I want to create a same WSDL file to support my old clients.



This is what I am getting soap request:


<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<areStatusComplete xmlns="http://tempuri.org/">
<listIds>
<string>12258</string>
<string>478526</string>
</listIds>
</areStatusComplete>
</s:Body>



Expected output is :


<soap:Body>
<ns1:areStatusComplete xmlns:ns1="http://tempuri.org/">
<listIds>88355</listIds>
<listIds>88356</listIds>
</ns1:areStatusComplete>
</soap:Body>



C# code for data contract is:


[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.7.2612.0")]
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "")]
[System.ServiceModel.MessageContractAttribute(WrapperName = "areStatusComplete", WrapperNamespace = "", IsWrapped = true)]
public class areStatusComplete

[System.ServiceModel.MessageBodyMemberAttribute(Namespace = "", Order = 0)]
[System.Xml.Serialization.XmlElementAttribute("listIds", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = true, Order = 1)]
public string listIds get; set;


[System.ServiceModel.MessageBodyMemberAttribute(Namespace = "", Order = 1)]
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string system;

[System.ServiceModel.MessageBodyMemberAttribute(Namespace = "", Order = 2)]
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string user;

public areStatusComplete ()



public areStatusComplete (string listIds, string system, string user)

this.listIds = listIds;
this.system = system;
this.user = user;




Service Contract code:


[OperationContract]
areStatusCompleteResponse areStatusComplete (string listIds, string system, string user);





any solutions ?
– Rajesh
Aug 13 at 8:23









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered