Hi,
I'm developing a n-tier Repair Managment System application in
VB.NET. (Using Visual Studio 2003)
A) Presentation layer
B) Business Layer
C) Data Access Layer
D) Data Layer
Each of the layers are independent projects in the main solution....
As each layer I teid develeoped I test the functionalities one by one threw my windows.NET application. For example: Store tier layers are tested individually and so forth...
1) Data Access layer for store
In this project I have two classes. One is the base class which MUST BE INHERITED and the second class is the store class where various functionalities are implemented. In my base class all function declaration have the keyword MustOverride So far so good.... when I compile the broject and test it threw my windows application all methods returning a dataset work fine...
2) Now I developed my Store Webservice
In this webservice I have a MustInherit base class and it is inherited by the store class... This service interacts directly with the Data Access Layer.... When I test this layer in my windows.NET application I get an ERROR (See the error in the error section please scroll down) on one of my webmethods where its return type is a dataset...The funny thng is that the webmethd is tryog to convert a string value to a boolean.... The webmethod that is being called from my app is :
* -----------------------------------------------------------------------------------
' ************************************************** ********
' The purpose of this procedure is to return a dataset object
' holding all records from a table
' ************************************************** ********
<WebMethod(Description:="The purpose of this procedure is to return" & _
" a dataset object holding all records from a table", EnableSession:=False)> _
Public Function GetFullData() As System.Data.DataSet Implements ICommon.GetFullData
Try
Return Me._Vendor.GetFullData(Me._Vendor.GetTableName, Me._Vendor.GetSourceTableNameFromclsBase)
Catch ex As SqlException
Throw New Exception(ex.Message)
Catch ex As Exception
Throw New Exception(ex.Message)
End Try
End Function
* -----------------ERROR ERROR ERROR ERROR---------------------------
This is were the error is generated in the web refrence\reference.
vb
'<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("http://RMS/Web Service/Vendors/GetFullData", RequestNamespace:="http://RMS/Web Service/Vendors", ResponseNamespace:="http://RMS/Web Service/Vendors", Use:=System.Web.Services.Description.SoapBindingUs e.Literal, ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)> _
Public Function GetFullData() As System.Data.DataSet
Dim results() As Object = Me.Invoke("GetFullData", New Object(-1) {})
Return CType(results(0),System.Data.DataSet)
End Function
------------THE ACTUAL ERROR:----------------------------------------------
An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.web.services.dll
Additional information: Server was unable to process request. --> Message: Cast from string "" to type 'Boolean' is not valid.
Source: Microsoft.VisualBasic
Method: FromString
Stack Trace: at Microsoft.VisualBasic.CompilerServices.BooleanType .FromString(String Value)
at Microsoft.VisualBasic.CompilerServices.BooleanType .FromObject(Object Value)
at Sql.Connection..ctor() in C:\Documents and Settings\Administrator\My Documents\Projects\Repair Management System\Sql\Connection.
vb:line 215