[CSHARP-74] Be able to serialize an Objectid as a member of a WCF data contract decorated with [DataMember] Created: 19/Oct/10 Updated: 20/Mar/14 Resolved: 01/Nov/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 0.5 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Justin Dearing | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
This is the exception I get now when I attempt to do so. I can work aroudn this of course by using a string in the data contract.. <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:DeserializationFailed</faultcode><faultstring xml:lang="en-US">The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:request. The InnerException message was 'Error in line 2 position 277. 'EndElement' 'EventId' from namespace 'http://schemas.datacontract.org/2004/07/Wunderman.EventRSVPSite.Service.RequestContracts' is not expected. Expecting element 'machinePidIncrement'.'. Please see InnerException for more details.</faultstring><detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>Error in line 2 position 277. 'EndElement' 'EventId' from namespace 'http://schemas.datacontract.org/2004/07/Wunderman.EventRSVPSite.Service.RequestContracts' is not expected. Expecting element 'machinePidIncrement'.</Message><StackTrace> at System.Runtime.Serialization.XmlObjectSerializerReadContext.ThrowRequiredMemberMissingException(XmlReaderDelegator xmlReader, Int32 memberIndex, Int32 requiredIndex, XmlDictionaryString[] memberNames)
|
| Comments |
| Comment by Robert Stam [ 01/Nov/10 ] |
|
Appears to be a problem with the data being sent from the client. |
| Comment by Justin Dearing [ 01/Nov/10 ] |
|
Now it serializes kinda funny with webhttp (json) binding but I could fix that on the client. Close and I'll post a demo after my honeymoon. |
| Comment by Robert Stam [ 01/Nov/10 ] |
|
Did you ever figure out which side the problem is on? Can we close this ticket yet? |
| Comment by Justin Dearing [ 20/Oct/10 ] |
|
My service client is PHP, not .NET. I will dig deeper. It might be an issue on your end or it might be an issue on the PHP Soap libraries end. |
| Comment by Robert Stam [ 20/Oct/10 ] |
|
I cannot reproduce this. From the stack trace it looks like the service reference on the client side might be out of sync with the web service definition. Can you refresh the service reference on the client and make sure this is still happening? If so, we will dig deeper. |