Jayson

Jayson

  • NA
  • 7
  • 0

Object reference not set to an instance of an object

Dec 18 2007 4:31 PM

I'm getting a NullReferenceException in this block of code when I try to set the value for responseStatusCode (4th line down).  I've declared strings this way many times before and I'm confused as to why it's throwing an error here.  Any suggestions?  Thanks!

Here's the block of code that's throwing the exception.

private bool voidLabelAndProcessResults(string shipper, string sc, string msn)

{

XmlDocument doc = ConnectShipUPS.VoidRequest(shipper, sc, msn);

string responseStatusCode = doc.SelectSingleNode("VOIDRESPONSE/RESPONSESTATUSCODE").Value;

return responseStatusCode == "0";

}


Answers (5)