Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 28, 2010 08:09 AM by cnranasinghe
Member
2 Points
20 Posts
Jul 27, 2010 07:10 PM|LINK
lxvmesbtest1.ClaimsProxyService ss = new lxvmesbtest1.ClaimsProxyService();lxvmesbtest1.AAA_PolicyGetClaimsRQ user = new lxvmesbtest1.AAA_PolicyGetClaimsRQ();
user.Requestor.TransactionID = "GET_CLAIMS_DATA".ToString();user.Requestor.ConsumerToken = "ICSPWD".ToString();user.Requestor.ConsumerID = "ICSUSER".ToString();
ss.GetClaimsData(user);
Object reference not set to an instance of an object.
Line 16: user.Requestor.TransactionID = "GET_CLAIMS_DATA".ToString();
All-Star
134944 Points
15413 Posts
ASPInsiders
Moderator
MVP
Jul 27, 2010 11:09 PM|LINK
It appears that the Requestor property of your user object is null.
Make sure you create an instance of the Requestor object before you try to set any of its properties.
504 Points
101 Posts
Jul 28, 2010 06:37 AM|LINK
Hi,
It is a common issue. Check the 'user' object, that may be null or the 'Requestor' object inside the 'user' is null( that is not intialized properly.)
Star
8885 Points
1798 Posts
Jul 28, 2010 08:09 AM|LINK
good point, check null, GET_CLAIMS_DATA appears to be a string. you dont need to use toString()
try this
user.Requestor.TransactionID=GET_CLAIMS_DATA !=null ? GET_CLAIMS_DATA : "";
if TransactionID is int, change this;
user.Requestor.TransactionID=int.parse( GET_CLAIMS_DATA !=null ? GET_CLAIMS_DATA : "0");
nealman22
Member
2 Points
20 Posts
Object reference not set to an instance of an object..Help
Jul 27, 2010 07:10 PM|LINK
mbanavige
All-Star
134944 Points
15413 Posts
ASPInsiders
Moderator
MVP
Re: Object reference not set to an instance of an object..Help
Jul 27, 2010 11:09 PM|LINK
It appears that the Requestor property of your user object is null.
Make sure you create an instance of the Requestor object before you try to set any of its properties.
jayaprakash....
Member
504 Points
101 Posts
Re: Object reference not set to an instance of an object..Help
Jul 28, 2010 06:37 AM|LINK
Hi,
It is a common issue. Check the 'user' object, that may be null or the 'Requestor' object inside the 'user' is null( that is not intialized properly.)
Jaya Prakash S
----------------------------------------------------------
Please Mark as Answer if my reply helps you.
cnranasinghe
Star
8885 Points
1798 Posts
Re: Object reference not set to an instance of an object..Help
Jul 28, 2010 08:09 AM|LINK
good point, check null, GET_CLAIMS_DATA appears to be a string. you dont need to use toString()
try this
user.Requestor.TransactionID=GET_CLAIMS_DATA !=null ? GET_CLAIMS_DATA : "";
if TransactionID is int, change this;
user.Requestor.TransactionID=int.parse( GET_CLAIMS_DATA !=null ? GET_CLAIMS_DATA : "0");