开发flex+java应用,java采用jbuilder,在编译运行flex文件后报错:Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8083/myapplication/messagebroker/amf'
url是正确的,可以还提示错误。
文件内容如下:
sevice-config.xml:
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
            <endpoint url="http://localhost:8083/myapplication/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
            </properties>
        </channel-definition>
remoting-config:
<?xml version="1.0" encoding="UTF-8"?>
<service id="database-service" 
    class="flex.messaging.services.RemotingService">
     
     <destination id="database">
     <properties>
               <source>beans.data.Searchdata</source>
               <scope>request</scope>
         </properties>
       
     </destination>
    <adapters>
        <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
    </adapters>
    <default-channels>
      <channel ref="my-amf"/>
    </default-channels>
</service>
mxml文件:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
  <![CDATA[
      import mx.rpc.events.ResultEvent;
       import mx.events.MenuEvent;
       import mx.rpc.events.FaultEvent;   
       import mx.controls.Alert;
       import mx.controls.Alert;
       import mx.utils.ArrayUtil;
       import mx.controls.Alert;
        [Bindable]
       private var helloResult:String;
       
       private function menuhandler(event:MenuEvent):void
             {
                if(event.item.@data!="TOP"){
                  
                viewstack1.visible=true; 
                 
                }
             
             }
              private function dataadd():void
             {
                
                 getdatabase.getData("ertwetw");
                 
                viewstack2.visible=true;
              
             }
              private function resultHandler(event:ResultEvent):void
             {
                helloResult = event.result as String;
                Alert.show(helloResult);
              
             }
             public var datas:Object;
             ]]>
     </mx:Script>
     <mx:RemoteObject
       id="getdatabase"
       destination="database"
       fault="Alert.show(event.fault.faultDetail.toString(),'error');" >
       <mx:method name="getData"       result="resultHandler(event);" /> 
     </mx:RemoteObject>
<mx:XMLList id="employees" xmlns="">
<employee>
       <name>张华</name>
       <phone>12345678</phone>
       <email>[email protected]</email>
    </employee>
    <employee>
       <name>李四</name>
       <phone>22345678</phone>
       <email>[email protected]</email>
    </employee>
    <employee>
       <name>冯武</name>
       <phone>62345678</phone>
       <email>[email protected]</email>
    </employee>        
 <employee>
       <name>李丽</name>
       <phone>72345678</phone>
       <email>[email protected]</email>
    </employee> 

</mx:XMLList>
<mx:Model id="myphone">
<states>
    <state label="a" data="a"/>
    <state label="b" data="b"/>
    <state label="c" data="c"/>
    <state label="d" data="d"/>
    <state label="e" data="e"/>
    <state label="f" data="f"/>
 </states>
 </mx:Model>

<mx:Canvas x="10" y="10" width="722" height="604">
<mx:HRule x="28" y="85" width="673" height="1"/>
<mx:MenuBar x="57" y="33"  labelField="@label" itemClick="menuhandler(event);">

<mx:XMLList>
<menuitem label="元数据管理" data="top">
    <menuitem label="元数据定制" data="1A"/>
    <menuitem label=" " data="1B"/>
</menuitem>
<menuitem label=" " data="top">
    <menuitem label=" " type="check" data="2A"/>
    <menuitem type="separator"/>
    <menuitem label=" " data="2B"/>
</menuitem>      
</mx:XMLList>


</mx:MenuBar>

<mx:ViewStack x="10" y="80" id="viewstack1" width="692" height="490" visible="true">
<mx:Canvas label="View 1" width="100%" height="100%">
<mx:DataGrid id="dg" width="100%" height="170" rowCount="5"  >
     <mx:columns>
       <mx:DataGridColumn headerText="序号" dataField="name"  editable="true" editorDataField="text"/>
       <mx:DataGridColumn headerText="字段名" dataField="phone" editable="true" editorDataField="text"/>
       <mx:DataGridColumn headerText="字段类型" dataField="email" editable="true" editorDataField="text"/>
      
            
     </mx:columns>
    </mx:DataGrid>
    <mx:Button x="306" y="178" label="添加" click="dataadd();"/>
    <mx:TextInput width="100" text="{getdatabase.getData.lastResult.info}"/>
    
   </mx:Canvas>
</mx:ViewStack>



    <mx:ViewStack x="10" y="94" id="viewstack2" width="712" height="510" visible="false">
<mx:Canvas label="View 1" width="100%" height="100%">

    <mx:Label x="44" y="228" text="字段名"/>
    <mx:Label x="44" y="267" text="字段类型"/>
   
    <mx:TextInput x="127" y="226"  id="data_name"/>
    
    <mx:ComboBox x="127" y="265" id="data_catagory" dataProvider="{myphone.state}"></mx:ComboBox>
    <mx:Button x="301" y="442" label="提交" click=""/>
    
         </mx:Canvas>
</mx:ViewStack>
</mx:Canvas>
</mx:Application>java文件:
package beans.data;import java.io.*;
import java.sql.*;
import javax.*;
import java.util.*;
import common.database.ConnectionMgr;public class Searchdata{    private static ConnectionMgr connmgr; // = new ConnectionMgr();
      private Connection conn = null;
public String getData(String str){
System.out.println("aaaaaa");
return str;
}}
有哪位高人帮忙看看,是什么问题,多谢了。