Is your webservice returning a String or an XML document?  If it’s returning a string you might want to try your binding as:

{mx.utils.XMLUtil.createXML(contentws.GetXMLDocumentString.result)}

 

Definitely make sure that the return value is what you expect it to be.

 

Matt

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of prasad
Sent: Monday, May 02, 2005 1:19 AM
To: [email protected]
Subject: [flexcoders] dynamic menu

 

hi,

 

 i am trying to create a menu dynamically using a xml file obtained from a web service.  my code snippet looks some thing like this.   

<mx:WebService id="contentws" wsdl="http://chn-atg31/cmsex/contentws.asmx?WSDL">
 <mx:operation name="GetXMLDocumentString"/>
 </mx:WebService>

 

    <mx:Button label="Get Content" click="contentws.GetXMLDocumentString.send();"/>

 <mx:MenuBar dataProvider="{xmldata2}" labelField="Title"></mx:MenuBar>


  <mx:XML id="xmldata3" >
  {contentws.GetXMLDocumentString.result}
  </mx:XML>
  <mx:Model  id="xmldata2">
  <mx:dataProvider>{xmldata3}</mx:dataProvider>
  </mx:Model>

//GetXMLDocumentString function returns the xml file as a string. the xml file format is something like this

 

<Products>
  <Name>Test</Name>
  <Category>
    <CatId>1</CatId>
    <CatName>Books</CatName>
    <CatDesc>Books Description....</CatDesc>
    <Product>
      <ContentId>24</ContentId>
      <Title>ASP.NET Unleashed</Title>
      <Comments>
      </Comments>

</Product>

</Category>
</Products>
 

my menu does not display does not display the menu items but -undefined. the same menu works fine with a dataprovider whose source is a local xml file. can some one help me with the exact code

 

                                         Regards

                        Prasad

 



Yahoo! Groups Links

Reply via email to