X
xtl9
Guest
I have a SOAP client, generated by Visual Studio. This is the error message (roughly translated to English):
System.ServiceModel.CommunicationException: An error occurred
during deserialization for operation "getMenu". --->
System.InvalidOperationException: There is an error in XML
document (2, 9408). ---> System.InvalidOperationException:
Validation error: '' is not a valid entry for type viewType.
So I looked into both WSDL and my generated reference and found that viewType is an enum, such as this:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="ApiMenu")]
public enum viewType {
/// <remarks/>
normal,
/// <remarks/>
list,
/// <remarks/>
gallery,
}
That means the XML provided by API is simply invalid. Their documentation seems to be outdated, I tried to contact them but they only said it's an issue on my end and API works properly. It's not the first time such thing happened, but previously I just modified reference accordingly. I have no clue what I should do in this case though.
What should I do? The worst thing is I don't even need half the stuff the response provides, including the error-causing part.
Continue reading...
System.ServiceModel.CommunicationException: An error occurred
during deserialization for operation "getMenu". --->
System.InvalidOperationException: There is an error in XML
document (2, 9408). ---> System.InvalidOperationException:
Validation error: '' is not a valid entry for type viewType.
So I looked into both WSDL and my generated reference and found that viewType is an enum, such as this:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
[System.SerializableAttribute()]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="ApiMenu")]
public enum viewType {
/// <remarks/>
normal,
/// <remarks/>
list,
/// <remarks/>
gallery,
}
That means the XML provided by API is simply invalid. Their documentation seems to be outdated, I tried to contact them but they only said it's an issue on my end and API works properly. It's not the first time such thing happened, but previously I just modified reference accordingly. I have no clue what I should do in this case though.
What should I do? The worst thing is I don't even need half the stuff the response provides, including the error-causing part.
Continue reading...