Sorry, I mean use --context-root=/flex

This argument would go on the command line just as --services=[path to
flex-enterprise-services.xml] does if you're compiling using mxmlc
directly (which I prefer), or if you're using Flex Builder, in the
properties for your project the Flex Compiler section has an "Additional
compiler arguments" field.

To explain this a little more if you're not familiar with the Flex 2
SDK, there is a tool called mxmlc that compiles .mxml files to .swf
files. It has a configuration file called flex-config.xml. You can
override or supply additional settings on the command line as arguments
when launching mxmlc.exe. A Flex Builder project's setting panel hides
much of this from you to simplify the options required to compile most
applications.


Advanced Note: the reason the command line argument is "context-root"
(and not context.root) is because that's what the XML tag name would be
in flex-config.xml as the Flex SDK convention is to separate words with
a hyphen instead of a dot (as a dot has meaning for collapsing
parent-child XML node structures into command line arguments). So
actually the full setting would be
--compiler.context-root=/flex but you can use short-hand syntax to
specify unique flex-config.xml config XML nodes as command line
arguments for mxmlc.

Technically, FDS will allow you to use {context.root} or {context-root}
in a channel endpoint URL, but the {context.root} token is preferred in
the docs and examples as it is the FDS convention for tokens.

Finally, I use -- syntax instead of - syntax out of habit. To learn more
about mxmlc, try running these commands:

mxmlc -help syntax
mxmlc -help advanced



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of jrjazzman23
Sent: Thursday, June 01, 2006 12:25 AM
To: [email protected]
Subject: [flexcoders] Re: RemoteObject calls failing

I tried replacing {context.root} with "flex" once more and it worked.
I think I didn't recompile properly the first time I made this
change.   Still curious, where would I pass a --context.root parameter?

thanks so much for the help.

Jeremy

--- In [email protected], "Peter Farland" <[EMAIL PROTECTED]> wrote:
>
> Have you got a {context.root} token in the channel-definition endpoint

> for the "my-amf" channel? If so, can you try removing it to hard code
> the context root, or if you want it to remain in the config, you must
> specify --context.root as a command line parameter.
>
> Next, how did you load the SWF? Using an HTTP url or the file system?
> If the latter, try either replacing the {server.name} and
> {server.port} tokens with the real values of the tomcat server or try
> hosting the SWF on the web app and browsing to it.
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
> On Behalf Of jrjazzman23
> Sent: Wednesday, May 31, 2006 7:54 PM
> To: [email protected]
> Subject: [flexcoders] RemoteObject calls failing
>
> Hi.  I'm having trouble getting a simple RemoteObject call to work.
> Running tomcat 5.5  Here are some pertinent snippets.  The call
> generates this:
>
> fault
> [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::fa
> ul
>
tHandler()[C:\dev\enterprise_beta3\frameworks\mx\rpc\AbstractInvoker.as:
> 191]
>       at
> mx.rpc::Responder/fault()[C:\dev\enterprise_beta3\frameworks\mx\rpc\Re
> sp
> onder.as:56]
>       at
> mx.rpc::AsyncRequest/fault()[C:\dev\enterprise_beta3\frameworks\mx\rpc
> \A
> syncRequest.as:107]
>       at
>
mx.messaging::ChannelSet/mx.messaging:ChannelSet::faultPendingSends()[C:
> \dev\enterprise_beta3\frameworks\mx\messaging\ChannelSet.as:946]
>       at
> mx.messaging::ChannelSet/channelFaultHandler()[C:\dev\enterprise_beta3
> \f rameworks\mx\messaging\ChannelSet.as:679]
>       at flash.events::EventDispatcher/dispatchEvent()
>       at
> mx.messaging::Channel/mx.messaging:Channel::connectFailed()[C:\dev\ent
> er prise_beta3\frameworks\mx\messaging\Channel.as:658]
>       at
> mx.messaging.channels::PollingChannel/mx.messaging.channels:PollingCha
> nn
> el::connectFailed()[C:\dev\enterprise_beta3\frameworks\mx\messaging\ch
> an
> nels\PollingChannel.as:111]
>       at
> mx.messaging.channels::AMFChannel/mx.messaging.channels:AMFChannel::st
> at
> usHandler()[C:\dev\enterprise_beta3\frameworks\mx\messaging\channels\A
> MF
> Channel.as:285]
> [object Object]
>
>
> Here are some pertinent snippets:
>
> <destination id="DataTest">
>           <adapter ref="java-object" />
>           <channels>
>                 <channel ref="my-amf" />
>           </channels>
>          
>           <properties>
>                 <source>com.test.Account</source>
>           </properties>
>
>     </destination>
>
>
> Action Script:
>
> var dataTest:mx.rpc.remoting.RemoteObject = new RemoteObject();
>                         dataTest.destination = "DataTest";
>      
> dataTest.getName.addEventListener("result", handleResult);
>                         dataTest.addEventListener("fault",
> handleFault);
>                         dataTest.bla();
>
>
> remote object:
>
> package com.test
>
> public class Account {
>
>       public String Name = null;
>      
>       public Account() {
>             Name = "My Company";
>       }
>      
>       public String bla() {
>             return Name;
>       }
>
> }
>
>
> I appreciate any help.
>
> Jeremy
>
>
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> Get to your groups with one click. Know
> instantly when new email arrives
> http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/nhFolB/TM
> --------------------------------------------------------------------~-
> >
>
> --
> 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
>







------------------------ Yahoo! Groups Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology.
It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->

--
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








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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to