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

  • Thread starter Thread starter jumpinjavabean
  • Start date Start date
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
 
when do this MyRequestSchema request = new MyRequestSchema();
is that returning request as null ? or your object reference error comes in
this line?

VJ
 
Back
Top