Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 5th, 2005, 05:12 PM
Registered User
 
Join Date: Aug 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Hagop Send a message via Yahoo to Hagop
Default Webmethod error while return type is a dataset

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 &quot;&quot; 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

 
Old August 10th, 2005, 05:46 AM
Friend of Wrox
 
Join Date: May 2003
Posts: 229
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do not cross post , if already posted at

http://p2p.wrox.com/topic.asp?TOPIC_ID=33667

as posting it on relevant forum will increase the chances of getting replies

Charul Shukla





Similar Threads
Thread Thread Starter Forum Replies Last Post
Return datatable from a webmethod josemanjusha ASP.NET 2.0 Basics 0 September 21st, 2006 07:52 AM
Return dataset lily611 C# 1 July 2nd, 2006 01:35 PM
WebMethod Error when return type is a dataset Hagop .NET Web Services 2 August 18th, 2005 09:13 AM
error on Webmethod when return type is a dataset Hagop General .NET 1 August 10th, 2005 05:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.