Hi experts.
I'm currentrly working on a Flex application that connects to the SAP system to retrieve some data.
This connection is made through the JCo (to be able to use RFC), and thus I'm using LCDS to map the Java results to the Flex application.
I made a Flex/Java project in Eclipse.
I'm properly using the JCo in my Java class (I do retrieve the data I want from SAP).
In ConnexionManager.java, I have a public static JCoTable all() function that returns a table.
Here are my different sources:
Flex_JCo_Test.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
<mx:RemoteObject id="srv" destination="cnxMngr"/>
<mx:DataGrid dataProvider="{srv.results}" width="100%" height="100%"/>
<mx:Button label="Get Data" click="srv.all()"/>
</mx:Application>
remoting-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"
class="flex.messaging.services.RemotingService">
<adapters>
<adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
</adapters>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
<destination id="cnxMngr">
<properties>
<source>connexionJCo.ConnexionManager</source>
<scope>application</scope>
</properties>
<adapter ref="java-object"/>
</destination>
</service>
And this is the error I'm getting:
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost/WebContent/messagebroker/amf'"] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] at mx.messaging::ChannelSet/faultPendingSends()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:1482] at mx.messaging::ChannelSet/channelFaultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:975] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging::Channel/connectFailed()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\Channel.as:997] at mx.messaging.channels::PollingChannel/connectFailed()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\PollingChannel.as:354] at mx.messaging.channels::AMFChannel/statusHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\AMFChannel.as:390]
I'm using the lcds.war provided with the lcds. And I kept the default settings for the channels.
I really don't have a clue on what I'm doing wrong.
Thanks for your help.
Regards,
C.
Edited by: Cristina CHEN MA on Sep 22, 2009 4:35 PM