Getting Error The SoapListenerExtension class is not loaded. The most possible cause for this error is that you haven't registered Google.Api.Ads.Common.Lib.SoapListenerExtension as a soap extension under

1,127 views
Skip to first unread message

Pramod Patil

unread,
Apr 3, 2012, 1:09:49 AM4/3/12
to adwor...@googlegroups.com
Hi

I am using newer version of  Google.Api.Ads.AdWords.v201109. but I am getting error on red code line . would you please help to resolve this.

Error :

The SoapListenerExtension class is not loaded. The most possible cause for this error is that you haven't registered Google.Api.Ads.Common.Lib.SoapListenerExtension as a soap extension under configuration/system.web/webServices/soapExtensionTypes in your your App.config or Web.config.


Below is my code.

Imports Google.Api.Ads.AdWords.Lib
Imports Google.Api.Ads.AdWords.v13
Imports Google.Api.Ads.AdWords.v201109

        Public Function getUser() As AdWordsUser
            Dim headers As New Dictionary(Of String, String)
            Dim SearchEngineDBObj As New SearchEngineDB(SQLConn)
            Dim SearchEngineObj As SearchEngine
            Dim emailObj As New FusionLibrary.Fusion.Campaign.eMail("192.168.2.205")

            SearchEngineObj = SearchEngineDBObj.populate("Google")
            If SearchEngineObj Is Nothing Then
                SearchID = 0
                Return Nothing
            End If

            SearchID = SearchEngineObj.SearchID
            headers.Add("email", "XXXXX")
            headers.Add("password", "XXXX")
            headers.Add("useragent", "XXXXX")
            headers.Add("developerToken", "XXXXXX")
            headers.Add("applicationToken", "XXXXXX")
            headers.Add("clientCustomerId", "XXXXXX"
            'headers.Add("AuthorizationMethod", "ClientLogin")

            Try
                Dim AdWordsUserObj As New AdWordsUser(headers)
                Return AdWordsUserObj
            Catch ex As Exception
                            Return Nothing
            End Try
        End Function

      Public Function updateCampaigns() As Integer
            Dim user As AdWordsUser
            user = getUser()

            If user Is Nothing Then
                Return 0
            End If

            Dim CampaignServiceObj As CampaignService
            Dim page As CampaignPage
            Dim SearchEngineeCampaignDBObj As New SearchEngineCampaignDB(SQLConn)
            Dim secObj As SearchEngineCampaign
            Dim rtn As String

            CampaignServiceObj = user.GetService(AdWordsService.v201109.CampaignService)

            Try
                Dim selector As New Selector()
                selector.fields = New String() {"Id", "Name", "Status"}

                Dim orderByName As New OrderBy()
                orderByName.field = "Name"
                orderByName.sortOrder = SortOrder.ASCENDING

                Dim emailObj As New FusionLibrary.Fusion.Campaign.eMail("XXXXXX")

                Dim SearchEngineDBObj As New SearchEngineDB(SQLConn)
                Dim SearchEngineObj As SearchEngine

                SearchEngineObj = SearchEngineDBObj.populate("Google")
                If SearchEngineObj Is Nothing Then
                    SearchID = 0
                    Return Nothing
                End If

                selector.ordering = New OrderBy() {orderByName}
                TryCast(user.Config, AdWordsAppConfig).ClientCustomerId = SearchEngineObj.UserName


                page = CampaignServiceObj.get(selector)


               
            Catch ex As Exception
                Return 0
            End Try

            If page Is Nothing Then
                Return 0
            End If
            If page.entries.Length = 0 Then
                Return 0
            End If

            For Each CampaignObj As Google.Api.Ads.AdWords.v201109.Campaign In page.entries
                secObj = New SearchEngineCampaign
                secObj.SearchID = SearchID
                secObj.CampaignName = CampaignObj.name
                secObj.BudgetAmount = CampaignObj.budget.amount.microAmount / 1000000
                secObj.Status = CampaignObj.status.ToString
                secObj.ID = CampaignObj.id
                rtn = SearchEngineeCampaignDBObj.findAdd(secObj)
            Next

            Return page.entries.Length - 1
        End Function


Thanks

David Torres

unread,
Apr 6, 2012, 8:56:41 AM4/6/12
to adwor...@googlegroups.com
Hi,

Make sure you have this line in your App.config or Web.config

<add type="Google.Api.Ads.Common.Lib.SoapListenerExtension, 
    Google.Ads.Common"
priority="1" group="0"/>

Did you just migrated to version >= 14.0.0?

Best,

-David Torres - AdWords API Team

htech

unread,
Apr 9, 2012, 10:05:15 AM4/9/12
to adwor...@googlegroups.com
hi David Torres,
I am facing the same issue, I have made the changes in my app.config.
yes its true we are migrated to 14.0.0. It was working absolutely correct till 29th feb
can you suggest some other solution,
regards

Jonathan Shaltz

unread,
Jul 18, 2013, 7:12:12 PM7/18/13
to adwor...@googlegroups.com
What else might be necessary?  My app runs on my local machine but not on any of several servers, though I have full admin rights there.  The error message turns up little in search results, beyond this very forum and a few nearly-identical versions:

The SoapListenerExtension class is not loaded. The most possible cause for this error is that you haven't registered Google.Api.Ads.Common.Lib.SoapListenerExtension as a soap extension under configuration/system.web/webServices/soapExtensionTypes in your your App.config or Web.config. See the sample App.config for details on how to register soap extensions.

Here's what I have in my app.config:

<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="AdWords.Extractor.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<connectionStrings>...</connectionStrings>
<userSettings>...</userSettings>
<system.web>
<webServices>
<soapExtensionTypes>
<add type="Google.Api.Ads.Common.Lib.SoapListenerExtension, Google.Ads.Common, Version=1.4.0.0, Culture=neutral, PublicKeyToken=52807268f2b614dc" priority="1" group="0"/>
</soapExtensionTypes>
</webServices>
</system.web>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
</configuration>

Anash P. Oommen (AdWords API Team)

unread,
Jul 22, 2013, 10:19:51 AM7/22/13
to adwor...@googlegroups.com
Hi Jonathan,

Most likely this is a assembly binding issue, could you run fuslogvw.exe and see if that's the case? http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.71).aspx

Cheers,
Anash

Jonathan Shaltz

unread,
Jul 24, 2013, 12:26:19 PM7/24/13
to adwor...@googlegroups.com
I think I found the problem: on my dev machine, I'd recently moved some libraries to a specific folder and updated the references, but that relative path did not apply on the server.  The files were still present in the .exe's folder, which has usually worked fine for me, so I'm not sure why this was an issue, but I'm happy as long as it's working.

Thanks for the quick reply.  I'll keep that tool in mind the next time I have a similar issue.

- J

Matt Akers

unread,
Oct 20, 2015, 3:48:11 PM10/20/15
to AdWords API Forum
This worked perfectly!!  Thank you!  

I will note I had to build the tags out inside system.web in my app.config.  <webServices><soapExtensionTypes>$YOURCODE$</soapEtensionTypes></webServices>
Reply all
Reply to author
Forward
0 new messages