Timeline for Http callout Null check error in response
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 17, 2017 at 16:44 | vote | accept | Ricky | ||
Apr 17, 2017 at 16:41 | comment | added | sfdcfox♦ |
@Ricky I used the , operator to declare multiple variables of the same data type; you need to change the ; to a , to continue declaring variables of the same type.
|
|
Apr 17, 2017 at 16:38 | comment | added | Ricky | Hey Great that worked for me. One last question if I want to get city from the same response I believe I just need to add this line "cityNode = zipNode == null? null: zipNode.getChildElement('City',null);" But when I add that I get error saying variable cityNode does not exist.can you explain? | |
Apr 17, 2017 at 16:30 | comment | added | sfdcfox♦ | @Ricky Yeah, it should have been getChildElement instead of get. | |
Apr 17, 2017 at 16:30 | history | edited | sfdcfox♦ | CC BY-SA 3.0 |
added 12 characters in body
|
Apr 17, 2017 at 16:22 | comment | added | Ricky | I am getting this error when I enter your modify answer."Method does not exist or incorrect signature: void get(String, NULL) from the type dom.XmlNode" | |
Apr 17, 2017 at 16:16 | history | edited | sfdcfox♦ | CC BY-SA 3.0 |
added 312 characters in body
|
Apr 17, 2017 at 16:10 | comment | added | sfdcfox♦ | @Ricky state is a child of ZipCode, not the root element. You'll need to get the ZipCode node first. | |
Apr 17, 2017 at 16:07 | comment | added | Ricky | It is not returning Null for state. Look at the response that I get. <CityStateLookupResponse><ZipCode ID="0"><Zip5>08873</Zip5><City>Somerset</City><State>NJ</State></ZipCode></CityStateLookupResponse> | |
Apr 17, 2017 at 16:04 | history | answered | sfdcfox♦ | CC BY-SA 3.0 |