views:

272

answers:

2

Hi,
We have a web service solution in VB .Net 2005 that we have started getting an error in. We provide an interface like the following:

Public Interface IBatchTrackerService
    Function InsertBatchTracker(ByVal BatchTrackerObject As BatchTracker, ByRef errorNum As Integer, ByRef errorMsg As String) As Integer
End Interface

In our class we implement this interface with the following code.

    Public Class BatchTrackerService
        Implements IBatchTrackerService

        Public Function InsertBatchTracker(ByVal BatchTrackerObject As BusinessObjects.BatchTracker, ByRef errorNum As Integer, ByRef errorMsg As String) As Integer Implements IBatchTrackerService.InsertBatchTracker
           'Some code here'
        End Function
    End Class

This code was working properly but has now started causing errors. The error we receive is:

Class 'BatchTrackerService' must implement 'Function InsertBatchTracker(BatchTrackerObject As BusinessObjects.BatchTracker, ByRef errorNum As Integer, ByRef errorMsg As String) As Integer' for interface 'IBatchTrackerService'.

The odd thing is that the project compiles correctly, but shows many of these errors after the compile is finished.

We recently installed Panda as our virus protection which caused a different error that I found the solution here for.

Any help would be greatly appreciated.

Thank you,

John

Updated 4/21/2009 at 11:50
Both the interface and the implementation are within the same project in the solution.

Updated 4/22/2009 at 08:16
I tried removing the BusinessObjects identifier from in front of the BatchTracker type but I still get the same thing. This is just one example of what has happened throughout the entire solution. Every implementation in this BatchTrackerService is flagged as an error, plus there are several other services that have almost every implementation flagged as an error as well. But somehow the project builds successfully, and yes, it runs properly!
As for BusinessObjects, it contains many of the classes we use as parameters and it is simply another project within this solution. We do not reference any external assemblies to provide these classes to BusinessObjects.

Updated 4/22/2009 at 08:24
The last thing I noticed was that any function/procedure that doesn't use a 'BusinessObjects' class as a parameter, but simply uses strings, integers, etc is not flagged as an error.

Updated 4/22/2009 at 09:50
I tried reverting back to a previous version and I was able to compile and the error count stayed at zero. I narrowed it down to a check-in of one of the project files where the reference to BusinessObjects was slightly changed. I reverted just this project file and everything compiles fine now. Thanks to everyone for leading me in the right direction.

A: 

It sounds like you're loading up a different version of the assembly that contains your interface in the web service and in the client, causing the client to reject the signature implemented by the web interface. Ensure that the versions are the same and, if necessary, strong-sign the assembly.

Adam Robinson
A: 

Your interface specifies that the "BatchTrackerObject" parameter be of type "BatchTracker" but your implementation uses type "BusinessObjects.BatchTracker". Try removing the "BusinessObjects." qualifier from your implementation.

Do multiple assemblies provide classes within the BusinessObjects namespace?

STW