Last post Dec 19, 2016 08:41 AM by Chris Zhao
Dec 16, 2016 12:57 PM|narayana karnati|LINK
I am facing the below issue.
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:Attachment. The InnerException message was 'There was an error deserializing the object of type System.String.
End element 'Attachment' from namespace 'http://tempuri.org/' expected. Found element 'a:string' from namespace 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'. Line 1, position 265.'. Please see InnerException for more details.
I am consuming the .asmx web service proxy in WCF service. So in web service the field is string and in WCF it becomes a ArrayOfString. To map the field I made below code. It worked in my local machine But when I hosted the service in QA it did not work
and giving me above exception.
tempuri.org.ArrayOfString strAttachmentArray = new ArrayOfString();
if (Attachment.Length > 0)
Dec 19, 2016 08:41 AM|Chris Zhao|LINK