Error 30002: Type 'Microsoft.Vsa.VsaModule' is not defined When Using Web Service





    I'm receiving the following error when executing a Visual Basic Script Task in SQL Server Integration Services.  I've cross posted the same question there and have not received a solution regarding the error.  I've also posted the message to the Visual Basic forum becuase multiple products are involved and I'm unsure where it is best suited.   


    The error occurs on multiple machines.  I'm using Visual Studio 2005 and Reporting Services 2005. Has anyone encountered this error before?


    Error: 0x7 at Generate Snapshot: Error 30002: Type 'Microsoft.Vsa.VsaModule' is not defined.

    Line 4 Columns 12-34

    Line Text: Microsoft.Vsa.VsaModule(True)>


    I'm creating the task to interact with our reporting server as prescribed in a separate thread.  I'm trying to generate a report snapshot using a web service for SQL Reporting Services.  The actual code snippet is listed below.   ReportingService2005 is a proxy class created by WSDL.EXE to provide an interface to the report services webservice.


    Interestingly, the error does not occur when the proxy class is removed.  I have added a reference to System.Web.Services and System.XML.


    Code Snippet

    ' Microsoft SQL Server Integration Services Script Task

    ' Write scripts using Microsoft Visual Basic

    ' The ScriptMain class is the entry point of the Script Task.

    Imports System

    Imports System.Data

    Imports System.Math

    Imports System.Xml

    Imports System.Web.Services

    Imports Microsoft.SqlServer.Dts.Runtime

    Public Class ScriptMain

    ' The execution engine calls this method when the task executes.

    ' To access the object model, use the Dts object. Connections, variables, events,

    ' and logging features are available as static members of the Dts class.

    ' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.


    ' To open Code and Text Editor Help, press F1.

    ' To open Object Browser, press Ctrl+Alt+J.

    Public Sub Main()

    Dim rs As New Microsoft.SqlServer.ReportingServices2005.ReportingService2005

    ' Set the credentials

    rs.Credentials = System.Net.CredentialCache.DefaultCredentials


    ' Retrieve package variable information

    Dim reportName As String = Dts.variables("reportName").value.tostring()

    Dim reportStatusID As Long = Dts.variables("reportStatusID").value

    Dim environmentName As String = Dts.variables("environmentName").value.tostring()

    ' Define report location

    Dim parentFolder As String = "ODRReports"

    Dim parentPath As String = "/" & parentFolder

    Dim reportPath As String = parentFolder & "/" & reportName

    ' Define report history parameters.

    Dim EnableManualSnapshotCreation As Boolean = True

    Dim KeepExecutionSnapshots As Boolean = False

    Dim schedule As Microsoft.SqlServer.ReportingServices2005.NoSchedule

    ' Set the report history options.

    rs.SetReportHistoryOptions(reportPath, EnableManualSnapshotCreation, _

    KeepExecutionSnapshots, schedule)

    ' Update the report snapshot


    Dts.log("The execution snapshot for " & reportPath & " was created successfully", 0, x)

    Catch ex As Exception

    Dts.Log("Error: " & ex.Message & " " & ex.StackTrace, 0, x)

    End Try

    Dts.TaskResult = Dts.Results.Success

    End Sub

    End Class



    Here is a snippet of the ReportingServices2005 class created by WSDL.EXE and is being referenced by the above code.


    Code Snippet


    ' <auto-generated>

    ' This code was generated by a tool.

    ' Runtime Version:2.0.50727.832


    ' Changes to this file may cause incorrect behavior and will be lost if

    ' the code is regenerated.

    ' </auto-generated>


    Option Strict Off

    Option Explicit On

    Imports System

    Imports System.ComponentModel

    Imports System.Diagnostics

    Imports System.Web.Services

    Imports System.Web.Services.Protocols

    Imports System.Xml.Serialization


    'This source code was auto-generated by wsdl, Version=2.0.50727.42.


    Namespace Microsoft.SqlServer.ReportingServices2005


    <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42"), _

    System.Diagnostics.DebuggerStepThroughAttribute(), _

    System.ComponentModel.DesignerCategoryAttribute("code"), _

    System.Web.Services.WebServiceBindingAttribute(Name:="ReportingService2005Soap", [Namespace]:=""), _

    System.Xml.Serialization.XmlIncludeAttribute(GetType(DataSourceDefinitionOrReference)), _

    System.Xml.Serialization.XmlIncludeAttribute(GetType(ExpirationDefinition)), _

    System.Xml.Serialization.XmlIncludeAttribute(GetType(RecurrencePattern)), _

    System.Xml.Serialization.XmlIncludeAttribute(GetType(ScheduleDefinitionOrReference))> _

    Partial Public Class ReportingService2005

    Inherits System.Web.Services.Protocols.SoapHttpClientProtocol




    Public Sub New()


    ' Define the report server URL based on the environment name.

    Select Case envName

    Case Is = "Dev"

    Me.Url = "http://m1waca0021/Reports$ODRDEV/ReportService2005.asmx"

    Case Is = "QA"

    Me.Url = "http://m1waca0020/ReportServer$ODRQA/ReportService2005.asmx"

    Case Is = "PROD"

    Me.Url = "http://msilsa0161/ReportsODR/ReportService2005.asmx"

    Case Is = "LOCALDEV"

    Me.Url = "http://localhost/ReportServer"

    Case Is = Nothing

    Me.Url = Nothing

    End Select

    End Sub




    Kind regards,


    Thursday, May 01, 2008 12:58 PM

All replies

  • after 4 days of struggling with this error, i think i find a solution:

    1. if your SSRS server version is 2005, use ReportService endpoint instead of ReportService2005 endpoint.
    2. if your SSRS server version is 2008, then you cant use ReportService endpoint so you need to use the ReportService2005 endpoint and in case of this error, must use a workaround.

    the workaround: its seems that the ReportingService2005.vb which created by the Wsdl.exe is working fine with regular windows application but not working inside a SSIS 2005 script task.
    in SSIS 2008, there is an option to create a web reference. using this option, you can create a Reference.vb file (located in the "web references" folder) and use it in the SSIS 2005 script task instead of the ReportingService2005.vb.
    you will need to modify it a bit, in order to make it run (i think its only one change: change the script name inside the code)


    Wednesday, April 14, 2010 1:35 PM