EventDay / Infusionsoft.net

A C# Wrapper around the Infusionsoft.com API
16 stars 22 forks source link

Response mismatch for CCharge.MerchantId #4

Open MisinformedDNA opened 11 years ago

MisinformedDNA commented 11 years ago

When I call this

var infusionsoftCreditCard = _infusionsoftClient.DataService
    .Query<InfusionSoft.Tables.CCharge>();

I get this:

CookComputing.XmlRpc.XmlRpcTypeMismatchException was unhandled by user code HResult=-2146232832 Message=response contains integer value where string expected [response : array mapped to type CCharge[] : element 0 : struct mapped to type CCharge : member MerchantId mapped to type String] Source=Infusionsoft.Net StackTrace: at InfusionSoft.Serialization.XmlRpcDeserializer.CheckExpectedType(Type expectedType, Type actualType, MappingStack mappingStack) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 672 at InfusionSoft.Serialization.XmlRpcDeserializer.MapInt(String value, Type valType, MappingStack mappingStack, MappingAction mappingAction, Type& mappedType) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 214 at InfusionSoft.Serialization.XmlRpcDeserializer.MapValueNode(IEnumerator1 iter, Type valType, MappingStack mappingStack, MappingAction mappingAction) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 87 at InfusionSoft.Serialization.XmlRpcDeserializer.<>c__DisplayClass22.<MapStruct>b__1f() in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 425 at InfusionSoft.Serialization.XmlRpcDeserializer.OnStack[T](String p, MappingStack mappingStack, Func1 func) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 683 at InfusionSoft.Serialization.XmlRpcDeserializer.MapStruct(IEnumerator1 iter, Type valueType, MappingStack mappingStack, MappingAction mappingAction, Type& mappedType) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 423 at InfusionSoft.Serialization.XmlRpcDeserializer.MapValueNode(IEnumerator1 iter, Type valType, MappingStack mappingStack, MappingAction mappingAction) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 75 at InfusionSoft.Serialization.XmlRpcDeserializer.MapArray(IEnumerator1 iter, Type valType, MappingStack mappingStack, MappingAction mappingAction, Type& mappedType) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 511 at InfusionSoft.Serialization.XmlRpcDeserializer.MapValueNode(IEnumerator1 iter, Type valType, MappingStack mappingStack, MappingAction mappingAction) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcDeserializer.cs:line 70 at InfusionSoft.Serialization.XmlRpcResponseDeserializer.DeserializeResponse(XmlReader rdr, Type returnType) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcResponseDeserializer.cs:line 54 at InfusionSoft.Serialization.XmlRpcResponseDeserializer.DeserializeResponse(Stream stm, Type svcType) in d:\Infusionsoft.net\src\InfusionSoft\Support\Serialization\XmlRpcResponseDeserializer.cs:line 28 at InfusionSoft.InfusionsoftProxy1.<>c__DisplayClass12.b0(Object sender, XmlRpcResponseEventArgs args) in d:\Infusionsoft.net\src\InfusionSoft\InfusionsoftProxy.cs:line 52 at CookComputing.XmlRpc.XmlRpcResponseEventHandler.Invoke(Object sender, XmlRpcResponseEventArgs args) at CookComputing.XmlRpc.XmlRpcClientProtocol.OnResponse(XmlRpcResponseEventArgs e) in :line 0 at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(Object clientObj, MethodInfo mi, Object[] parameters) in :line 0 at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(MethodInfo mi, Object[] Parameters) in :line 0 at XmlRpcProxy759e3f34-405e-4d87-a39e-cc73e46afd75.Query(String apiKey, String table, Int32 limit, Int32 page, IDictionary queryData, String[] selectedFields) at InfusionSoft.DataServiceExtensions.<>cDisplayClass91.<Query>b__8(IDataServiceDefinition d) in d:\Infusionsoft.net\src\InfusionSoft\Extensions\DataServiceExtensions.cs:line 85 at InfusionSoft.InfusionsoftProxy1.Invoke[TDefinitionResponse,TResponse](Func2 method) in d:\Infusionsoft.net\src\InfusionSoft\InfusionsoftProxy.cs:line 58 at InfusionSoft.ServiceBase1.<>cDisplayClass4`2.b3() in d:\Infusionsoft.net\src\InfusionSoft\ServiceBase.cs:line 50 at InfusionSoft.ServiceBase1.TryInvoke[T](Func1 func) in d:\Infusionsoft.net\src\InfusionSoft\ServiceBase.cs:line 57 at InfusionSoft.ServiceBase1.Invoke[TDefinitionResponse,TResponse](Func2 method) in d:\Infusionsoft.net\src\InfusionSoft\ServiceBase.cs:line 50 at InfusionSoft.DataServiceExtensions.Query[T](IDataService service, DataPage page, Action1 queryBuilder, Action1 fieldSelection) in d:\Infusionsoft.net\src\InfusionSoft\Extensions\DataServiceExtensions.cs:line 85 at InfusionSoft.DataServiceExtensions.GetAllPages[T,T1,T2](Func4 func, T1 arg1, T2 arg2) in d:\Infusionsoft.net\src\InfusionSoft\Extensions\DataServiceExtensions.cs:line 194 at InfusionSoft.DataServiceExtensions.Query[T](IDataService service, Action1 queryBuilder, Action`1 projection) in d:\Infusionsoft.net\src\InfusionSoft\Extensions\DataServiceExtensions.cs:line 46 at InfusionSoft.DataServiceExtensions.Query[T](IDataService service) in d:\Infusionsoft.net\src\InfusionSoft\Extensions\DataServiceExtensions.cs:line 26

MisinformedDNA commented 11 years ago

When I tried to ignore MerchantId in the projection, PaymentId came up with the same issue.