Troubleshooting

Retail Consumption Troubleshooting

Errors when Deserializing the message:

  • Error:
    The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/:PingResult. The InnerException message was 'Error in line 1 position 813. 'EndElement' 'PingResult' from namespace 'http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/' is not expected. Expecting element 'RequestID'.'. Please see InnerException for more details.
    Make sure the response has proper prefixes defined. For ex:
    <PingResponse xmlns="http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/"><PingResult xmlns:a="https://partners.greendotcorp.com/GDCPartners/GDCWS_GDNPartnerAPI/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:RequestID>381d3ba9-8cb5-4b90-98bf-c62407456ffc</a:RequestID><a:ResponseCode>00</a:ResponseCode><a:ResponseDateTime>2012-01-17T18:36:19.8366311Z</a:ResponseDateTime><a:ResponseID>1bb37e31-56ea-4d59-ba81-52eecdef6c32</a:ResponseID><a:ResponseText>Success</a:ResponseText><a:Version>2.0.0</a:Version></PingResult></PingResponse>
    

  • Error:
    System.Runtime.Serialization.SerializationException: OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'PingResponse' and namespace 'http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/'. Found node type 'Element' with name 'PingResponse' and namespace 'https://partners.greendotcorp.com/GDCPartners/GDCWS_GDNPartnerAPI/’
    Make sure the service contract has the correct namespace: http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/
  • Error:
    System.Runtime.Serialization.SerializationException: OperationFormatter encountered an invalid Message body. Error in line 1 position 396. 'Element' 'ResponseID' from namespace 'https://partners.greendotcorp.com/GDCPartners/GDCWS_GDNPartnerAPI/' is not expected. Expecting element 'ResponseCode'
    The GDN code is using the DataContractSerializer to serialize/deserialize messages between GDand partners. It orders the elements in a specific way –it’s a combination of the message class hierarchy (base class members are first) , any message elements where anorder is specified (GDN doesn’t specify any order), and then alphabetical.
    • Data members of the base types are always first in the order.
    • Next in order are the current type’s data members that do not have the Order property of the DataMemberAttribute attribute set, in alphabetical order.
    • Next are any data members that have the Order property of the DataMemberAttribute attribute set. These are ordered by the value of the Order property first and then alphabetically if there is more than one member of a certain Order value. Order values may be skipped.
    For reference: https://theburningmonk.com/2010/08/wcf-be-ware-of-the-field-ordering-when-using-datacontractserializer/
    If Partners do not follow the exact order, GD will get a deserialization exception and the transaction is unsuccessful.
    <TransactResponse xmlns="http://greendotcorp.com/WebServices/Corporate/GDNPartnerAPI/"><TransactResult xmlns:a="https://partners.greendotcorp.com/GDCPartners/GDCWS_GDNPartnerAPI/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:RequestID>94ffc1b6275643c58eb99e9e7f24b2e7</a:RequestID><a:ResponseID>10058</a:ResponseID><a:ResponseCode>20</a:ResponseCode><a:ResponseText>Can't get card info for 6011393300000141</a:ResponseText><a:ResponseDateTime>2012-11-13T17:07:38.312Z</a:ResponseDateTime><a:Version>2.0.0</a:Version>