3 Replies Latest reply on Jul 3, 2007 2:12 PM by cheftimo

    Publishing Flex application

    dennis_boerger
      I have a weird problem (maybe the solution is simple). I developed a flex application which reads data from a Java Servlet. When I run it in the Flex Builder it works fine and all data can be received. Also when I compile it to any other folder of my harddisk.
      I want to make the application available in the intranet. When I copy it from my local harddrive to the server, no data can be received from the Servlet (the servlet is working fine). Also when I copy the application to another folder on my harddisk the same problem occurs.

      Does anybody has a solution for this matter? I already played around with the use-network parameter in the compiler settings - no success.

      Thanks in advance.
      Dennis
        • 1. Re: Publishing Flex application
          gjastrab Level 1
          Posting your code and compilation command would be useful to answer your question...
          • 2. Re: Publishing Flex application
            dennis_boerger Level 1
            Here is the code:

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute"
            creationComplete="sendRequestInitBBPinList()"
            >

            <mx:Script>
            <![CDATA[
            import mx.controls.Alert;

            //[Bindable] public var servletUrl:String = " http://192.168.31.100:8888/Flex-CCC%20Tools-context-root/ccctools";
            [Bindable] public var servletUrl:String = " http://w2003-ms01.cargobull.com:7778/ccctools/ccctools";

            private function sendRequestInitBBPinList():void {
            // set parameters
            var req:Object = new Object();
            req.action = "initBBPinList";

            dataRequestInitBBPin.send(req);
            }

            private function doBrowserChannelPush(bbPin:String, userId:String, pushType:String):void {
            // set parameters
            var req:Object = new Object();
            req.action = "browserChannelPush";
            req.bbPin = bbPin;
            req.userId = userId;
            req.pushType = pushType;

            dataRequestBrowserPush.send(req);
            }
            ]]>
            </mx:Script>

            <mx:HTTPService
            id="dataRequestInitBBPin"
            url= "{this.servletUrl}"
            method="POST">
            </mx:HTTPService>
            <mx:HTTPService
            id="dataRequestBrowserPush"
            url= "{this.servletUrl}"
            method="POST">
            </mx:HTTPService>

            <mx:Panel title="Browser Channel Push" x="10" y="10" width="300">
            <mx:Form>
            <mx:FormItem label="BB PIN">
            <mx:ComboBox id="bbPin" labelField="tag1" width="150" rowCount="20" dataProvider="{dataRequestInitBBPin.lastResult.root.list.data}">
            </mx:ComboBox>
            </mx:FormItem>

            <mx:FormItem label="Aktion">
            <mx:ComboBox id="pushType">
            <mx:ArrayCollection>
            <mx:Object label="Hinzufügen" data="Browser-Channel"/>
            <mx:Object label="Entfernen" data="Browser-Channel-Delete"/>
            </mx:ArrayCollection>
            </mx:ComboBox>
            </mx:FormItem>

            <mx:FormItem>
            <mx:Button label="Push" click="doBrowserChannelPush(bbPin.selectedItem.tag2, bbPin.selectedItem.tag3, pushType.selectedItem.data)"/>
            </mx:FormItem>
            </mx:Form>
            </mx:Panel>

            </mx:Application>

            I run the application by clicking the run button in the Flex Builder with default arguments.
            • 3. Re: Publishing Flex application
              cheftimo Level 2
              Try 'ccctools.ccctools' for your servlet URL