473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

"Object reference not set to an instance of an object." after constructor fires

Hello all,

Working on a W2K3 box with Framework version 1.1.4322 here. I've
implemented a Web service in VB.NET by generating a server skeleton off
the WSDL and overriding the abstract class. This Web service operates
correctly. To conform to standards set by our group recently, I reworked
the WSDL to reflect namespace changes and reimplemented the service in
both VB.NET and C# (as neither work now). When compared, the only
syntactic differences between the original and new VB.NET services are
namespace declarations. The other change was the last offered update to
my Framework for W2K3 SP1. In both the new services, I get the subject
error after the constructor successfully fires. No error shows in the
Debug window; I get exit codes of 0.

The original service still operates correctly after the Framework update.
In all three services (working and broken), the last line added to the
Debug window before I stop execution is the loading of a referenced
assembly not part of the Framework.

I deployed the broken C# version to a Windows 2000 Server SP4 box with
Framework version 1.1.4322 with the same result.

Anyone had similar issues?

Thanks,
Vern DeHaven
Nov 23 '05 #1
1 4585
Found the issue. I had left out one very important detail: one of our new
standards is to specify names of elements in Pascal case (e.g.
ElementName). The old, working service had element names in camel case
(e.g. elementName). The wsdl.exe tool names parameters exactly the same
as their types in the generated abstract class, for example:

public abstract ReceiveBuffer
modify([System.Xml.Serialization.XmlElementAttribute(Names pace="http://myuri.com/mod")]
SendBuffer SendBuffer);

The mistake I made was that I had camel-cased the parameter name to
distinguish it as such:

public abstract ReceiveBuffer
modify([System.Xml.Serialization.XmlElementAttribute(Names pace="http://myuri.com/mod")]
SendBuffer sendBuffer);

I did this without adding the ElementName property to the
XmlElementAttribute to correct the serialization. Here's how it should
read:

public abstract ReceiveBuffer
modify([System.Xml.Serialization.XmlElementAttribute(Names pace="http://myuri.com/mod",
ElementName="SendBuffer")] SendBuffer sendBuffer);

Sorry about this post.

Vern
On Mon, 21 Mar 2005 11:45:21 -0500, Vern DeHaven <vernet.dehaven uc [.]
edu> <[@]> wrote:
Hello all,

Working on a W2K3 box with Framework version 1.1.4322 here. I've
implemented a Web service in VB.NET by generating a server skeleton off
the WSDL and overriding the abstract class. This Web service operates
correctly. To conform to standards set by our group recently, I
reworked the WSDL to reflect namespace changes and reimplemented the
service in both VB.NET and C# (as neither work now). When compared, the
only syntactic differences between the original and new VB.NET services
are namespace declarations. The other change was the last offered
update to my Framework for W2K3 SP1. In both the new services, I get
the subject error after the constructor successfully fires. No error
shows in the Debug window; I get exit codes of 0.

The original service still operates correctly after the Framework
update. In all three services (working and broken), the last line added
to the Debug window before I stop execution is the loading of a
referenced assembly not part of the Framework.

I deployed the broken C# version to a Windows 2000 Server SP4 box with
Framework version 1.1.4322 with the same result.

Anyone had similar issues?

Thanks,
Vern DeHaven


Nov 23 '05 #2

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

Similar topics

3
by: Kam | last post by:
Hi! When I am trying to drag user controls or any controls from the Toolbox to a form in some of my projects I get a dialog messages: (Microsoft Deployment Environment) "Object reference not...
1
by: Chris Magoun | last post by:
I suddenly received an unexpected error in my project. I have been working on this project for some time without this issue. Nothing has changed in the form that caused the exception. A little...
18
by: Microsoft | last post by:
When I try this in my code I alwas get an errormessage: "Object reference not set to an instance of an object" Dim g As System.Drawing.Graphics g.DrawString("Test", New Font("Arial", 12,...
2
by: louie.hutzel | last post by:
This JUST started happening, I don't remember changing any code: When I click the submit button on my form, stuff is supposed to happen (which it does correctly) and a result message is posted back...
9
by: axs221 | last post by:
I am trying to move some of our large VBA Access front-end file into ActiveX DLL files. I created two DLL files so far, one was a module that contains code to integrate into the QuickBooks...
35
by: Chris | last post by:
Hi, I tried to create a class which must change the propety 'visible' of a <linktag in the masterpage into 'false' when the user is logged. But i get the error: "Object reference not set to an...
0
by: Tamer Ibrahim | last post by:
Hi, Sometimes, I got the following error message when I use ajax calendar control on some aspx pages : Object reference not set to an instance of an object. Description: An unhandled exception...
4
by: My Pet Programmer | last post by:
Ok guys, I'm really looking for someone to tell me how bad a hack this is, and if I'm close to where I should be with it. The basic situation is that I have a class which creates a basic...
0
by: raghudr | last post by:
Hi all, I am coding for displaying a splash screen until a big job is finished.I am getting an exception:only during the first start of the system.Rest all the time it is working fine. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.