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
 
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 ....
 
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 ....











- 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.
 
Back
Top