Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 26th, 2013  |  syntax: None  |  size: 2.44 KB  |  views: 61  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Error de secuencia. URL: http://localhost:8080/root/test"]. URL: http://localhost:8080/root/test
  2.        
  3. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  4.                xmlns:s="library://ns.adobe.com/flex/spark"
  5.                xmlns:mx="library://ns.adobe.com/flex/mx"
  6.                minWidth="955" minHeight="600">
  7.         <fx:Declarations>
  8.             <s:HTTPService
  9.                 id="httpSerciseTest"
  10.                 url="/root/test"
  11.                 method="GET"
  12.                 resultFormat="e4x"
  13.                 useProxy="false"
  14.                 result="resultHandler(event)"
  15.                 fault="Alert.show(event.fault.faultString+
  16.                 'n' + event.fault.faultDetail,
  17.                 'Error: '+event.fault.faultCode)"/>
  18.         </fx:Declarations>
  19.         <fx:Script>
  20.             <![CDATA[
  21.                 import mx.controls.Alert;
  22.                 import mx.rpc.events.FaultEvent;
  23.                 import mx.rpc.events.ResultEvent;
  24.  
  25.                 [Bindable]private var xmlResult:XML;
  26.                 private function creationCompleteHandler():void
  27.                 {
  28.                     httpSerciseTest.send();
  29.                 }
  30.                 private function resultHandler(event:ResultEvent):void
  31.                 {
  32.                     xmlResult=event.result as XML;
  33.                 }
  34.             ]]>
  35.         </fx:Script>
  36. </s:Application>
  37.        
  38. public class Test extends HttpServlet {
  39.     private static final long serialVersionUID = 4484874511692568559L;
  40.     private static final String CONTENT_TYPE = "text/xml; charset=utf-8";
  41.     protected void doGet(HttpServletRequest request, HttpServletResponse response)throws IOException
  42.     {
  43.         response.setContentType(CONTENT_TYPE);
  44.         try{
  45.             PrintWriter writer=response.getWriter();
  46.             writer.println("<?xml version="1.0"?>n");
  47.             writer.println("<root>");
  48.             writer.println("<folder label="Repository"/>");
  49.             writer.println("<folder label="Documentation"/>");
  50.             writer.println("</root>");
  51.         }catch (IOException IOE){
  52.             throw IOE;
  53.         }
  54.     }
  55. }
  56.        
  57. <servlet>
  58.         <servlet-name>test</servlet-name>
  59.         <display-name>test</display-name>
  60.         <servlet-class>java_servlets.Test</servlet-class>
  61.     </servlet>
  62. <servlet-mapping>
  63.         <servlet-name>test</servlet-name>
  64.         <url-pattern>/test</url-pattern>
  65.     </servlet-mapping>
clone this paste RAW Paste Data