Thank you very much it works now. How could I find this alone ?

--- In [email protected], "Laurent Fontvielle"
<[EMAIL PROTECTED]> wrote:
>
> Hello,
> 
> Did you specify a correct 'context-root' when compiling your Flex web
> application. The value for this compiler parameter must be the same as
>  the context-root where you deploy your webapp on your application
server.
> From the project properties window, got to 'Flex compiler' properties,
> add to  'Additional compiler arguments' the parameter:
> -context-root  /myContextRoot
> 
> Regards,
> Laurent.
> 
> --- In [email protected], "jonathan_merey" <mereyj@> wrote:
> >
> > Hi, I have an application with flex 2.0, flex data services and
java and
> > I want to access methods of my JAVA classes. So I use the
remoteObject.
> > 
> > Here is the code :
> > 
> > Test.java
> > 
> > package beans;
> > 
> > public class Test {
> > 
> >      public Test()
> >      {
> >          System.out.println("-= Test start =-");
> >      }
> > 
> >      public String doTest()
> >      {
> >          return "-= This is a test =-";
> >      }
> > 
> > }
> > 
> > remoting-config.xml
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <service id="remoting-service"
> >      class="flex.messaging.services.RemotingService"
> >      messageTypes="flex.messaging.messages.RemotingMessage">
> > 
> >      <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="test">
> >          <properties>
> >              <source>beans.Test</source>
> >              <scope>application</scope>
> >          </properties>
> >      </destination>
> > 
> > </service>
> > 
> > index.mxml
> > 
> > <?xml version="1.0"?>
> > 
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> >      initialize="applicationInit()"
> >      layout="absolute"
> >      backgroundGradientColors="[#ffffff, #808080]"
> >      viewSourceURL="srcview/index.html"
> >      creationComplete="doTest()">
> > 
> >      <mx:Script>
> >      <![CDATA[
> >                       import mx.controls.Alert;
> >                       import mx.rpc.events.FaultEvent;
> >                       import mx.collections.ArrayCollection;
> >                       import flash.events.MouseEvent;
> >                       import mx.rpc.AsyncToken;
> >                       import mx.data.*;
> >                       import mx.managers.*;
> > 
> >                       [Bindable]
> > 
> >                       private function doTest():void
> >                       {
> >                           test.doTest();
> >                       }
> > 
> >                ]]>
> >         </mx:Script>
> > 
> > <mx:RemoteObject id="test" destination="test">
> > <mx:method name="createTest"/>
> > </mx:RemoteObject>
> > 
> > When I launch the server " -= Test start =-" is printed on tomcat
so the
> > remoteObject is good initialized but after there is an error due
to the
> > method createTest.
> > 
> > Here is the final message when i launch the application :
> > 
> > [RPC Fault faultString="Send failed"
> > faultCode="Client.Error.MessageSend"
faultDetail="Channel.Connect.Failed
> > error NetConnection.Call.Failed: HTTP: Failed"]
> >      at
> >
>
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faul\
> > tHandler()
> >      at mx.rpc::Responder/fault()
> >      at mx.rpc::AsyncRequest/fault()
> >      at mx.messaging::ChannelSet/::faultPendingSends()
> >      at mx.messaging::ChannelSet/channelFaultHandler()
> >      at
> >
>
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\
> > tFunction()
> >      at flash.events::EventDispatcher/dispatchEvent()
> >      at mx.messaging::Channel/mx.messaging:Channel::connectFailed()
> >      at
> >
>
mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingChann\
> > el::connectFailed()
> >      at
> >
>
mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::stat\
> > usHandler()
> > 
> > 
> > Please help me.
> >
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to