4 Replies Latest reply on Oct 26, 2007 4:34 PM by ntsiii

    HTTPService call resultHandler Question

    Srinivas S.M
      Hi All,

      I make a request to JSP file using HTTPService component which basically generates XML and sends it back.
      In the result handler, i am able to see the result as XML.

      The out of that would look like below:
      <?xml version="1.0" encoding="UTF8" standalone="yes" ?>
      <RespGetCatChildren xmlns=" http://www.vzw.com/namespaces/scmplus">
      <Category seq="1">
      <CatID>4229</CatID>
      <CatName> Pink Floyd </CatName>
      <CatDisplayName> Pink Floyd </CatDisplayName>
      <IsPurchasable>false</IsPurchasable>
      <Position>1</Position>
      <LanguageCode>eng</LanguageCode>
      <DisplayDriver>1</DisplayDriver>
      <Icon>
      <URL> http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
      <Type> image/jpg </Type>
      </Icon>
      </Category>
      <Category seq="2">
      <CatID>4229</CatID>
      <CatName> Pink Floyd 1 </CatName>
      <CatDisplayName> Pink Floyd 1</CatDisplayName>
      <IsPurchasable>false</IsPurchasable>
      <Position>1</Position>
      <LanguageCode>eng</LanguageCode>
      <DisplayDriver>1</DisplayDriver>
      <Icon>
      <URL> http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
      <Type> image/jpg </Type>
      </Icon>
      </Category>
      <Category seq="1">
      <CatID>4229</CatID>
      <CatName> Pink Floyd </CatName>
      <CatDisplayName> Pink Floyd </CatDisplayName>
      <IsPurchasable>false</IsPurchasable>
      <Position>1</Position>
      <LanguageCode>eng</LanguageCode>
      <DisplayDriver>1</DisplayDriver>
      <Icon>
      <URL> http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
      <Type> image/jpg </Type>
      </Icon>
      </Category>
      <Category seq="3">
      <CatID>4229</CatID>
      <CatName> Pink Floyd 2 </CatName>
      <CatDisplayName> Pink Floyd 2</CatDisplayName>
      <IsPurchasable>false</IsPurchasable>
      <Position>1</Position>
      <LanguageCode>eng</LanguageCode>
      <DisplayDriver>1</DisplayDriver>
      <Icon>
      <URL> http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
      <Type> image/jpg </Type>
      </Icon>
      </Category>
      <Item seq="4">
      <CatID>4229</CatID>
      <CatName> Pink Floyd 3 </CatName>
      <CatDisplayName> Pink Floyd 3</CatDisplayName>
      <IsPurchasable>false</IsPurchasable>
      <Position>1</Position>
      <LanguageCode>eng</LanguageCode>
      <DisplayDriver>1</DisplayDriver>
      <Icon>
      <URL> http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
      <Type> image/jpg </Type>
      </Icon>
      </Item>
      <Item seq="5">
      <CatID>4229</CatID>
      <CatName> Pink Floyd 4 </CatName>
      <CatDisplayName> Pink Floyd 4</CatDisplayName>
      <IsPurchasable>false</IsPurchasable>
      <Position>1</Position>
      <LanguageCode>eng</LanguageCode>
      <DisplayDriver>1</DisplayDriver>
      <Icon>
      <URL> http://scmpappwstage.idc.vzwcorp.com:8000/testimages/featured/pinkfloyd_thumbnail.jpg</URL >
      <Type> image/jpg </Type>
      </Icon>
      </Item>
      </RespGetCatChildren>


      Now i want to retreive all "Category" elements in the XML, i tried using the below code it didn't work,

      var temp:XML = XML(event.result);
      var category:* = temp.elements("Category"); // to retrieve Category Elements

      but i don't see any elements in it. What am i doing wrong please let me know.