You need to sign in to do that
Don't have an account?
surbhi narula
My class is throwing error "Invalid type: cc_b_UPSResponseWrapper.UPSSecurity"
Below is the code :-
public class UPSRequestDataSet {
public static cc_b_UPSResponseWrapper UPSWrapperData() {
cc_b_UPSResponseWrapper UPSWrapObj = new cc_b_UPSResponseWrapper();
cc_b_UPSResponseWrapper.UPSSecurity usertoken = new cc_b_UPSResponseWrapper.UPSSecurity();
usertoken.Username = CC_Bee_Services__c.get('cc_b_UPS').Username__c ;
cc_b_UPSResponseWrapper.UPSSecurity upsSec = new cc_b_UPSResponseWrapper.UPSSecurity();
upsSec.UsernameToken = usertoken ;
UPSWrapObj.UPSSecurity = upsSec ;
//String str = Json.serialize(UPSWrapObj);
return UPSWrapObj;
}
}
Here cc_b_UPSResponseWrapper is my wrapper class having inner classes UPSSecurity ..
Please help to resolve the error..!!
public class UPSRequestDataSet {
public static cc_b_UPSResponseWrapper UPSWrapperData() {
cc_b_UPSResponseWrapper UPSWrapObj = new cc_b_UPSResponseWrapper();
cc_b_UPSResponseWrapper.UPSSecurity usertoken = new cc_b_UPSResponseWrapper.UPSSecurity();
usertoken.Username = CC_Bee_Services__c.get('cc_b_UPS').Username__c ;
cc_b_UPSResponseWrapper.UPSSecurity upsSec = new cc_b_UPSResponseWrapper.UPSSecurity();
upsSec.UsernameToken = usertoken ;
UPSWrapObj.UPSSecurity = upsSec ;
//String str = Json.serialize(UPSWrapObj);
return UPSWrapObj;
}
}
Here cc_b_UPSResponseWrapper is my wrapper class having inner classes UPSSecurity ..
Please help to resolve the error..!!
Can you please let us know at which line this error is coming ?
And also at line 7 upsSec and usertoken are both instances of the inner class i.e, instance of cc_b_UPSResponseWrapper.UPSSecurity. Whereas, UsernameToken mightbe a variable in that inner class if I'm not wrong. Not sure how you are assigning inner class instance to a variable...
Best Regards,
BALAJI