Skip to content

Error on .Update = A parameter is of, or contains an instance of, type System.Collections.Generic.Dictionary... which cannot be mapped to an XML-RPC type #52

@hfloyd

Description

@hfloyd

When I pass a Dictionary of field names and field values into the client.ContactService.Update() method, I get an error:

CookComputing.XmlRpc.XmlRpcUnsupportedTypeException: A parameter is of, or contains an instance of, type System.Collections.Generic.Dictionary`2[System.String,System.Object] which cannot be mapped to an XML-RPC type
   at CookComputing.XmlRpc.XmlRpcRequestSerializer.SerializeRequest(Stream stm, XmlRpcRequest request) in :line 0
   at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(Object clientObj, MethodInfo mi, Object[] parameters) in :line 0
   at XmlRpcProxy1cfb8f85-00dd-4b36-a037-50d149b56839.Update(String apiKey, Int32 contactId, IDictionary data)
   at InfusionSoft.ContactServiceWrapper.<>c__DisplayClass28.<Update>b__27(IContactServiceDefinition d) in \InfusionSoft\Wrappers\ContactServiceWrapper.cs:line 105

The code at that line is:
return Invoke(d => d.Update(ApiKey, contactId, data));

Am I misunderstanding how to use the Update method? What sort of format does the IDictionary need to be in for this to work? I have tried
Dictionary<string, object>
and
Dictionary<string, string>
with the same result.
Thanks for any assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions