0 Replies Latest reply on Aug 17, 2009 3:10 PM by jherr22

    How does JSP return XML data, using HTTPRequest

    jherr22 Level 1

      I am in an MXML project.

      I am using:

       

       

       

      <mx:HTTPService

      id="xmlService" 

      url="http://www.denverpenguins.com/myApp/emp.xml"

      result="resultHandler(event)"

      fault="faultHandler(event)"

      requestTimeout="30"

       

      />

      I sucessfully returned and displayed data from that XML file (emp.xml).

       

      My web-site is built on  JSP and Java beans.

      I would like to call the JSP, which would call the beans, and return XML data, which then JSP would return to my application.

      And, I suppose that I would use (in my HTTPService tag):

      url="http://www.denverpenguins.com/myApp/xml.jsp"

       

      Here is the skeleton of:   xml.jsp.

      What should it really look like to make this work?

      <!--
      <jsp:directive.page import="myApp.JavaClass" />
      <jsp:useBean id="APP" scope="session" class="myApp.JavaClass" >
      <jsp:setProperty name="APP" property="*" />
      </jsp:useBean >
      -->
      <html>
      <head><title>My Title</title></head>
      <body>
      <form name="myform" method="post">

      <%
        String myXML = APP.getXML();
      %>

      </form>
      </body>
      </html>

       

      So, the string myXML now has the XML data, but how do it get it back to my HTTPRequest result??

      Thanks

      ---- john