Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jumpinjavabean - 21 Mar 2007 16:11 GMT
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
Mubashir Khan - 21 Mar 2007 16:43 GMT
my question ... does that webservice follow any standard protocol other than
soap.
secondly ... i guess you may be writing your own http reponse sink and using
xml parser and reflection to create objects out of that ....
if you could provide us the wsdl for the web service ....

>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
[quoted text clipped - 13 lines]
> Thanks,
> Jonathan
jumpinjavabean - 21 Mar 2007 18:54 GMT
> my question ... does that webservice follow any standard protocol other than
> soap.
[quoted text clipped - 21 lines]
>
> - Show quoted text -

Thanks for responding Mubashir; I just figured out the problem :)
I made the foolish mistake of renaming the proxy class that was
generated, and I forgot that I had renamed it.
Once I restored the class name, the exception stopped happening, and
everything is working fine.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.