| Posted on 2011-09-29 10:32:22.03433-07 by russianbear |
| Perl SoapLite Deserialization Problem |
|
I am attempting to consume a SoapLite Envelope.
I successfully make the "roundtrip" - however the problem is occurring when I attempt to deserialize the response from my WebService.
The exact message is such:
<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:InternalServiceFault
</faultcode>
<faultstring xml:lang="en-US">Specified cast is not valid.</faultstring><detail> <Exception
+Detail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.
+org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><Inne
rException i:nil="true"/><Message>Specified cast is not valid.</Message><StackTrace> at ReadCondi
+tionFromXml(XmlReaderDelegator , XmlObjectSerializerRead
Context , XmlDictionaryString[] , XmlDictionaryString[] )
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, Xml
+ObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContrac
+t dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator reader, String name, String ns, Type declaredType,
DataContract& dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator xmlReader, Int32 id, RuntimeTypeHandle declaredTyp
eHandle, String name, String ns)
at ReadArrayOfConditionFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictiona
+ryString , XmlDictionaryString , CollectionDataContract
)
at System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader
+, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContrac
+t dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator reader, String name, String ns, Type declaredType,
DataContract& dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator xmlReader, Int32 id, RuntimeTypeHandle declaredTyp
eHandle, String name, String ns)
at ReadCriteriaFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString
+[] , XmlDictionaryString[] )
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, Xml
+ObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContrac
+t dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator reader, String name, String ns, Type declaredType,
DataContract& dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator xmlReader, Int32 id, RuntimeTypeHandle declaredTyp
eHandle, String name, String ns)
at ReadCollectionJobSettingsFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDic
+tionaryString[] , XmlDictionaryString[] )
at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, Xml
+ObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContrac
+t dataContract, XmlReaderDelegator reader)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator reader, String name, String ns, Type declaredType,
DataContract& dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDele
+gator xmlReader, Type declaredType, DataContract dataCon
tract, String name, String ns)
at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xml
+Reader, Boolean verifyObjectName, DataContractResolver d
ataContractResolver)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegato
+r reader, Boolean verifyObjectName, DataContractResolver
dataContractResolver)
at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlDictionaryReader reader, Bo
+olean verifyObjectName)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterP
+art(XmlDictionaryReader reader, PartInfo part, Boolean i
sRequest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameter(
+XmlDictionaryReader reader, PartInfo part, Boolean isReq
uest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameters
+(XmlDictionaryReader reader, PartInfo[] parts, Object[]
parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeBody(XmlDi
+ctionaryReader reader, MessageVersion version, String ac
tion, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Ob
+ject[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[
+] parameters)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc
+)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)&
+#xD;
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
+
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)&
+#xD;
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
+
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)&
+#xD;
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)&
+#xD;
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
+
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)&
+#xD;
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
+<Type>System.InvalidCastException</Type></ExceptionDetai
l>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
I think the problem is there is a cast that isn't happening upon deserialization, but looking at the garbage above, it's difficult to figure out which of my data members can't make the cast.
Can anybody understand what the above error message is attempting to tell me???
|
| Direct Responses: Write a response |