我用命令行编译mxml文件,如果不带那个 "-services=E:\.."这个参数就没问题,带了这个参数就报了这个错误.搞过的兄弟给看看.
这个东东在MyEclipse(带Flex插件)的环境下编译没问题,发布之后调用Java方法没有问题.
E:\flexworkspace\tyyz_flex\src>mxmlc -services=E:\flexworkspace\testjava\WebRoot\WEB-INF\flex\services-config.xml flex_t
yyz.mxml
Loading configuration file D:\tools\FlexSDK\3.0.0\frameworks\flex-config.xml
Error: The services configuration includes a channel-definition 'my-amf' that has an endpoint with a context.root token
but a context root has not been defined. Please specify a context-root compiler argument.
flex.messaging.config.ConfigurationException: The services configuration includes a channel-definition 'my-amf' that has
an endpoint with a context.root token but a context root has not been defined. Please specify a context-root compiler a
rgument.
at flex.messaging.config.ChannelSettings.parseClientUri(ChannelSettings.java:170)
at flex.messaging.config.ChannelSettings.getClientParsedUri(ChannelSettings.java:129)
at flex.messaging.config.ServicesDependencies.codegenXmlInit(ServicesDependencies.java:464)
at flex.messaging.config.ServicesDependencies.<init>(ServicesDependencies.java:46)
at flex2.compiler.common.CompilerConfiguration.getServicesDependencies(CompilerConfiguration.java:1201)
at flex2.tools.Compiler.calculateServicesChecksum(Compiler.java:635)
at flex2.tools.Compiler.processConfiguration(Compiler.java:572)
at flex2.tools.Compiler.processConfiguration(Compiler.java:428)
at flex2.tools.Compiler.mxmlc(Compiler.java:82)
at flex2.tools.Compiler.main(Compiler.java:53)
这个东东在MyEclipse(带Flex插件)的环境下编译没问题,发布之后调用Java方法没有问题.
E:\flexworkspace\tyyz_flex\src>mxmlc -services=E:\flexworkspace\testjava\WebRoot\WEB-INF\flex\services-config.xml flex_t
yyz.mxml
Loading configuration file D:\tools\FlexSDK\3.0.0\frameworks\flex-config.xml
Error: The services configuration includes a channel-definition 'my-amf' that has an endpoint with a context.root token
but a context root has not been defined. Please specify a context-root compiler argument.
flex.messaging.config.ConfigurationException: The services configuration includes a channel-definition 'my-amf' that has
an endpoint with a context.root token but a context root has not been defined. Please specify a context-root compiler a
rgument.
at flex.messaging.config.ChannelSettings.parseClientUri(ChannelSettings.java:170)
at flex.messaging.config.ChannelSettings.getClientParsedUri(ChannelSettings.java:129)
at flex.messaging.config.ServicesDependencies.codegenXmlInit(ServicesDependencies.java:464)
at flex.messaging.config.ServicesDependencies.<init>(ServicesDependencies.java:46)
at flex2.compiler.common.CompilerConfiguration.getServicesDependencies(CompilerConfiguration.java:1201)
at flex2.tools.Compiler.calculateServicesChecksum(Compiler.java:635)
at flex2.tools.Compiler.processConfiguration(Compiler.java:572)
at flex2.tools.Compiler.processConfiguration(Compiler.java:428)
at flex2.tools.Compiler.mxmlc(Compiler.java:82)
at flex2.tools.Compiler.main(Compiler.java:53)