ok, I used the wsdl utility to create the vb classes and imported them
to my project. It seems like I am close to getting this to work.
Below is the coded that I am trying to run, but I am erroring out on
the return message portion below. I have tried to translate the
Adword code examples from cs to vb. I am getting a
NullReferenceException... on the "For i = 0 To
Service.getAllAdWordsCampaigns(0).Length" line of code. Don't think
my whole dimming a new campaigns is correct. Any help would be
appreciated.
******************
Dim campaigns As New Campaign() '= {Service.getAllAdWordsCampaigns(0)}
campaigns = New Integer() {Service.getAllAdWordsCampaigns(0)}
'campaigns = New Campaign() {Service.getAllAdWordsCampaigns
(0)}
***************
Imports System
Imports System.Web.Services.Protocols.SoapMessage
Public Class Form1
Private Sub cmdCampaignService_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdAccountService.Click
'https://adwords.google.com/api/adwords/v13/AccountService?
wsdl
Dim i As Int16
Dim semail As String() = {"xxxxxxxxxxxxx"}
Dim password As String() = {"xxxxxxxxxxxxxxx"}
Dim clientEmail As String() = {"xxxxxxxxxxxxxxxx"} '
Dim useragent As String() = {"xxxxx"}
Dim developerToken As String() = {"xxxxxxxxxxxxxxxxxxxxxx"}
Dim applicationToken As String() = {"xxxxxxxxxxxxxxxxxxx"}
Dim Service As New CampaignService()
Service.emailValue = New email()
Service.emailValue.Text = New String() {semail(0)}
Service.passwordValue = New password()
Service.passwordValue.Text = New String() {password(0)}
Service.clientEmailValue = New clientEmail
Service.clientEmailValue.Text = New String() {clientEmail(0)}
Service.useragentValue = New useragent()
Service.useragentValue.Text = New String() {useragent(0)}
Service.developerTokenValue = New developerToken()
Service.developerTokenValue.Text = New String() {developerToken
(0)}
Service.applicationTokenValue = New applicationToken()
Service.applicationTokenValue.Text = New String()
{applicationToken(0)}
Dim campaigns As New Campaign() '=
{Service.getAllAdWordsCampaigns(0)}
campaigns = New Integer() {Service.getAllAdWordsCampaigns(0)}
'campaigns = New Campaign() {Service.getAllAdWordsCampaigns
(0)}
For i = 0 To Service.getAllAdWordsCampaigns(0).Length
MsgBox(campaigns.name, MsgBoxStyle.OkOnly, "Is it
working?")
Next i
'Debug.Print(retCampaign(Campaign))
End Sub
End Class
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---