Hi,
I am very new to working with WCF stuff. I am consuming a third party WCF and getting the responses for all the objects properly except one. I checked from fiddler tool to verify the response from the WCF and it is coming fine from their end but when the response is assigned to the object at my end it does not come there.
The piece of code related to that is given below:
WSDL:
<xsd:complexType name="accountIdentifier">
<xsd:choice>
<xsd:element name="accountNumber" type="tns:officeAccountFA"/>
<xsd:element name="keyAccount" type="tns:keyAccountId"/>
</xsd:choice>
</xsd:complexType>
Proxy code:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.2022")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://xml.ms.com/com/ms/banking/lending/services/LendingService/2.0.0")]
public partial class accountIdentifier {
private object itemField;
[System.Xml.Serialization.XmlElementAttribute("accountNumber", typeof(officeAccountFA), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlElementAttribute("keyAccount", typeof(string), Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public object Item {
get {
return this.itemField;
}
set {
this.itemField = value;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.2022")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://xml.ms.com/com/ms/banking/lending/services/LendingService/2.0.0")]
public partial class officeAccountFA {
private string branchField;
private string accountNumberField;
private string faField;
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string branch {
get {
return this.branchField;
}
set {
this.branchField = value;
}
}
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string accountNumber {
get {
return this.accountNumberField;
}
set {
this.accountNumberField = value;
}
}
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string fa {
get {
return this.faField;
}
set {
this.faField = value;
}
}
}
Response from service as I see in Fiddler tool
<facilitationAccount><accountNumber><branch>101</branch><accountNumber>150550</accountNumber></accountNumber><keyAccount>2013-07-31-03.09.58.692118</keyAccount></facilitationAccount>
When I hit the service and get the response from in my object only the data that I get is:
<accountNumber><branch>101</branch><accountNumber>150550</accountNumber></accountNumber>
I am not able to get the below data in my object:
<keyAccount>2013-07-31-03.09.58.692118</keyAccount>
Please help. I am stuck with this problem for so long, please do let me know if I am missing something.
Thanks in Advance.