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

J

jumpinjavabean

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
 
V

VJ

when do this MyRequestSchema request = new MyRequestSchema();
is that returning request as null ? or your object reference error comes in
this line?

VJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top