473,480 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Error consuming web service

Hi

I am trying to access a web method which is on my local server from a vb.net
client which is also on the same server. In client I am using the below code
to access the web method. The problem is that I get an 'Object reference not
set to an instance of an object.' error on the indicated line when I run the
code. What am I doing wrong?

Thanks

Regards
Dim ws As localhost.StaffDiary
Dim ds As DataSet = ws.GetStaffDiary ' <=== error on this line
Nov 20 '05 #1
1 908

Hi,

Try this instead.

Dim ws As New localhost.StaffDiary

Ken
------------------
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:O5**************@TK2MSFTNGP11.phx.gbl:
Hi

I am trying to access a web method which is on my local server from a
vb.net
client which is also on the same server. In client I am using the below
code
to access the web method. The problem is that I get an 'Object reference
not
set to an instance of an object.' error on the indicated line when I run
the
code. What am I doing wrong?

Thanks

Regards
Dim ws As localhost.StaffDiary
Dim ds As DataSet = ws.GetStaffDiary ' <=== error on this line


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.6 - Release Date: 6/25/2004
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6464
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
7
3063
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
6
2306
by: kbs | last post by:
Hi, I'm looking for some good examples that illustrate how to code a web service that exposes a custom collection so that the properties of the collection are accessible on the client without...
0
640
by: Chinns Arumugam | last post by:
Hello folks, I'm getting following error message in the reference.vb (created using add web feature of VS.Net) when invoking the our vendor web service which was created using Soap Toolkit 1.0. ...
2
1442
by: Glenn Venzke | last post by:
Is there any way to tell what type of application is consuming a web service? I'm writing a web service that returns a string with 2 carriage returns. What I want to do is replace these carriage...
2
1336
by: s | last post by:
'project with web service <webmethod()> _ public function myws(id as integer) 'do db stuff with id and build document Dim xd As New XmlDataDocument...
0
1545
by: plmanikandan | last post by:
I need to develop a application to consume a webservice. For consuming web service i tried a example in Consuming a Web Service in C# in http://www.csharphelp.com.But i am uanble to use that...
3
6081
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
2
2342
by: =?Utf-8?B?bW9pdGFs?= | last post by:
I have a client application ( web service ) write in vs2005 consuming an external web service with WSE 2.0 (x509). The response is in hebrew ( windows-1255 ). In the Trace files I see the hebrew...
3
4396
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
0
7040
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6905
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6908
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5331
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
561
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
178
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.