I am trying to use VB6 and the MS Soap toolkit 3.0 (I know I should use .NET but that is not an option right now.) to connect to the Google AdWords API, I can get my call to getCampaignStats to work successfully when I pass one id as a string but when I try to pass multiple ids (using the method suggested by the MSSoap documentation) I just get a type conversion error.

Here is the bit of the code where the troubles are occurring:
VB Code:
  1. Dim strReturned As IXMLDOMSelection
  2. Dim CurrentDate As Date
  3. Dim Dom2 As New DOMDocument30
  4.  
  5.     Set sc = CreateObject("MSSOAP.SoapClient30")
  6.     Call sc.MSSoapInit("https://adwords.google.com/api/adwords/v2/CampaignService?wsdl", "", "", "")
  7.  
  8.     Set sc.HeaderHandler = New ClientHeaderHandler
  9. CurrentDate = Now()
  10.  
  11. Dom2.LoadXml ("<cam><campaignIds>123456</campaignIds><campaignIds>123457</campaignIds></cam>")
  12.    
  13. Set strReturned = sc.getCampaignStats(Dom2.childNodes.Item(0).childNodes, CurrentDate, CurrentDate)

And here is the error:
Code:
    : Detail : "SoapMapper:Converting data for SoapMapper failed inside the typemapper HRESULT=0x80020005: Type mismatch.
 - SoapMapper:Saving SoapMapper campaignIds failed HRESULT=0x80020005: Type"
And the WSDL for the function:
Code:
<element name="getCampaignStats">
  <complexType>
    <sequence>
      <element maxOccurs="unbounded" name="campaignIds" type="xsd:int"/>
      <element name="start" type="xsd:dateTime"/>
      <element name="end" type="xsd:dateTime"/>
    </sequence>
  </complexType>
</element>
If anybody knows what I am doing wrong (I'm sure it’s probably fairly simple) your suggestions would be greatly appreciated.

Thanks,