473,404 Members | 2,178 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,404 software developers and data experts.

Problem calling XML (non-SOAP) web service with C#

I am trying to call an XML (non-SOAP) web service with C#.
I was provided with a request schema by our web services team, and I
generated a CLR class for it using XSD.exe.
When I instantiate this schema class and try to set a property on it,
however, I get the following error:

Object reference not set to an instance of an object.
This is essentially the code that's causing the error:

MyRequestSchema request = new MyRequestSchema();
MyRequestSchema.FirstName = "Jonathan";
Any idea what I'm doing wrong?
Thanks,
Jonathan

Mar 21 '07 #1
1 1740
VJ
when do this MyRequestSchema request = new MyRequestSchema();
is that returning request as null ? or your object reference error comes in
this line?

VJ

"jumpinjavabean" <ju************@hotmail.comwrote in message
news:11**********************@e1g2000hsg.googlegro ups.com...
>I am trying to call an XML (non-SOAP) web service with C#.
I was provided with a request schema by our web services team, and I
generated a CLR class for it using XSD.exe.
When I instantiate this schema class and try to set a property on it,
however, I get the following error:

Object reference not set to an instance of an object.
This is essentially the code that's causing the error:

MyRequestSchema request = new MyRequestSchema();
MyRequestSchema.FirstName = "Jonathan";
Any idea what I'm doing wrong?
Thanks,
Jonathan

Mar 21 '07 #2

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

Similar topics

3
by: Daniel Diehl | last post by:
Good morning! Now I'm sitting over 2 hours on a problem calling a method in the logitech SDK DLL. Everything is working fine, but calling one method I fell in a problem. I'm not that old with C#...
1
by: | last post by:
How can I handle an error while I calling web service asynchronously?
3
by: trialproduct2004 | last post by:
hi all i have one problem in windows service. i have code as following:- DirectoryInfo di = new DirectoryInfo(szfolder); if(di.Exists==true) eventLog1.WriteEntry("exist"); else
0
by: Tako | last post by:
I have a problem calling .NET classes with default properties from VB6. The class has a public member, this public member has a default property, from VB6 I can´t acces the default method without...
0
by: Francois Guerin | last post by:
I have an application calling a web service on a different machine. The application code runs under a local user account on the application server. The account (identical username/password) is...
3
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it...
3
by: Mike | last post by:
Timeout Calling Web Service I am calling a .NET 1.1 web service from an aspx page. The web service can take several minutes to complete its tasks before returning a message to the aspx page. ...
0
by: Louis Yeung | last post by:
Hi, Microsoft stated that ASP.NET calling web service, especially long delayed service, will have performance issue. I just need to confirm that web service hosted by ASP.NET/IIS calling another...
1
by: Manuel Brandao | last post by:
Hi all I would like to now the answer to the following problem, if someone can help. Given a windows application client that's calling a web service (using default credentials) the web...
0
by: bostjanj | last post by:
Hi, I have a problem adding web service to project. I get the following error: There was an error downloading '/service.asmx'. The request failed with the error message: Object moved to...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.