Did you try loading your services config at runtime? -services dependency
can be completely removed with this(no need to add -services compiler
option to your project):
private function callRemoteService():void
{
var uri:String = /*this will be your uri which is
there in services-config.xml */;
var channel:AMFChannel = new AMFChannel("my-amf",
uri); //'my-amf' should be same as one used in services-config.xml
var channelSet:ChannelSet = new ChannelSet();
channelSet.addChannel(channel);
ro = new RemoteObject("oframework"); // your
destination name goes here
ro.channelSet = channelSet;
ro.source = /*your source method name*/;
ro.showBusyCursor = true;
ro.SomeRemoteServiceMethodName.addEventListener("result",
resultHandler);
ro.SomeRemoteServiceMethodName.addEventListener("fault",
faultHandler);
ro.SomeRemoteServiceMethodName(/*your method
parameters go here*/);
}
Warm regards,
Deepak
On Mon, Jul 1, 2013 at 3:44 PM, Frank Dahmen <[email protected]> wrote:
> thanks
> i think it's the captive runtime
> when i run on desktop the console does not say that i captive runtime is
> used because the sdk no longer supports the shared runtime
>
> so i think on desktop it is not using the captive runtime and it works
>
> ever used a captive runtime with -services?
>
>
>
>
> ----- Original Message ----- From: "Thiago Maia" <[email protected]>
> To: <[email protected]>
> Sent: Monday, July 01, 2013 11:59 AM
>
> Subject: Re: -services services-config.xml
>
>
> oh.. good,
>> I really dont have anought experience with mobile
>> I think the other day I saw at blazeds documentation how to log in a file.
>> sorry, from now I cant help to much
>>
>>> thanks
>>> i pasted the lines, but as i said its mobile, where shoud the logs go to?
>>> the output of flashdevelop tells the same error
>>>
>>> BUT:
>>> i tried to run the project in the emulator on desktop and it worked
>>> so it has definitly something to do with the "mobile thing"
>>>
>>>
>>>
>>> ----- Original Message ----- From: "Thiago Maia" <[email protected]>
>>> To: <[email protected]>
>>> Sent: Monday, July 01, 2013 10:55 AM
>>> Subject: Re: -services services-config.xml
>>>
>>>
>>> ok, next step, debug -)
>>>> if the problem is in blazeds it shoud show in this logs, this is what I
>>>> do when nothing else works.
>>>> ------------------------------**-------------------
>>>> services-config.xml
>>>>
>>>> <logging level="Debug">
>>>> <target class="flex.messaging.log.**ConsoleTarget"
>>>> level="Debug">
>>>> <properties>
>>>> <includeDate>false</**includeDate>
>>>> <includeTime>false</**includeTime>
>>>> <includeLevel>false</**includeLevel>
>>>> <includeCategory>false</**includeCategory>
>>>> </properties>
>>>> </target>
>>>> </logging>
>>>> ------------------------------**------------------
>>>>
>>>>> Thanks, i tried to adopt...but still get the error
>>>>>
>>>>> So, it is compiled but can't be invoked at runtime.......
>>>>>
>>>>> any further help?
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ----- Original Message ----- From: "Thiago Maia" <[email protected]>
>>>>> To: <[email protected]>
>>>>> Sent: Monday, July 01, 2013 10:04 AM
>>>>> Subject: Re: -services services-config.xml
>>>>>
>>>>>
>>>>> oh... about mobile I cant tell :(
>>>>>> I using eclipse, at project properties -> Flex compiler -> Aditional
>>>>>> compiler arguments I got this
>>>>>> -locale en_US -services "../WebContent/WEB-INF/flex/**
>>>>>> services-config.xml"
>>>>>> but how you say, it seens founding.
>>>>>>
>>>>>> I remember when I moved from adobe to apache I had some issues with
>>>>>> blazeds I just dont remember what it was, it could be even the blazeds
>>>>>> version. Last week I update blazeds and also got more one issue in the
>>>>>> sintaxe.
>>>>>>
>>>>>> Let me show you how I did here:
>>>>>> ------------------------------**------
>>>>>> 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="oframework">
>>>>>> <properties>
>>>>>> <source>evf_framework.**Framework</source>
>>>>>> </properties>
>>>>>> </destination>
>>>>>> </service>
>>>>>>
>>>>>> ------------------------------
>>>>>> services-config.xml
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <services-config>
>>>>>> <services>
>>>>>> <service-include directory-path="../WebContent/**WEB-INF/flex/"
>>>>>> file-path="remoting-config.**xml" />
>>>>>> <service-include directory-path="../WebContent/**WEB-INF/flex/"
>>>>>> file-path="proxy-config.xml" />
>>>>>> <service-include directory-path="../WebContent/**WEB-INF/flex/"
>>>>>> file-path="messaging-config.**xml" />
>>>>>> </services>
>>>>>> <security>
>>>>>> <login-command class="flex.messaging.**
>>>>>> security.TomcatLoginCommand"
>>>>>> server="Tomcat" />
>>>>>> </security>
>>>>>> <channels>
>>>>>> <channel-definition id="my-amf"
>>>>>> class="mx.messaging.channels.**AMFChannel">
>>>>>> <endpoint
>>>>>> url="http://{server.name}:{**server.port}/{context.root}/**
>>>>>> messagebroker/amf"
>>>>>> class="flex.messaging.**endpoints.AMFEndpoint" />
>>>>>> </channel-definition>
>>>>>> </channels>
>>>>>> <system>
>>>>>> <redeploy>
>>>>>> <enabled>false</enabled>
>>>>>> </redeploy>
>>>>>> </system>
>>>>>> </services-config>
>>>>>> ------------------------------**------------------
>>>>>> Inside application
>>>>>> <fx:Declarations>
>>>>>> <s:RemoteObject id="framework" destination="oframework"
>>>>>> requestTimeout="120">
>>>>>> </s:RemoteObject>
>>>>>> </fx:Declarations>
>>>>>>
>>>>>>
>>>>>>
>>>>>> i tried to add the line, same error
>>>>>>> i don't have a WEB-INF folder, it's just a "normal" flashdevelop
>>>>>>> project
>>>>>>> with the file in the root of the project
>>>>>>> but as i said it worked with adobe sdk
>>>>>>>
>>>>>>> i just added your line at the wrong place and i got a compilation
>>>>>>> error, so the file is invoked when compiling
>>>>>>> (the other error "faultCode:InvokeFailed faultString......." was a
>>>>>>> runtime error)
>>>>>>>
>>>>>>> What changed with the switch from adobe to apache is that a captive
>>>>>>> runtime is packaged with the app (it's a mobile project).
>>>>>>>
>>>>>>> Maybe it has something to do with this?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ----- Original Message ----- From: "Thiago Maia" <[email protected]>
>>>>>>> To: <[email protected]>
>>>>>>> Sent: Monday, July 01, 2013 9:01 AM
>>>>>>> Subject: Re: -services services-config.xml
>>>>>>>
>>>>>>>
>>>>>>> Oh.. other thing... maybe it should be inside WEB-INF?
>>>>>>>>
>>>>>>>>> Hi, I'm comparing with mine, try to add after this line:
>>>>>>>>> <service id="amfphp-flashremoting-**service"
>>>>>>>>> class="flex.messaging.**services.RemotingService"
>>>>>>>>> messageTypes="flex.messaging.**messages.RemotingMessage">
>>>>>>>>>
>>>>>>>>> this:
>>>>>>>>> <default-channels>
>>>>>>>>> <channel ref="my-zend"/>
>>>>>>>>> </default-channels>
>>>>>>>>>
>>>>>>>>> Not sure if should be there, mine is in separated files, but have
>>>>>>>>> a try.
>>>>>>>>>
>>>>>>>>> Thiago Maia
>>>>>>>>>
>>>>>>>>>> hi,thanks for answer
>>>>>>>>>> i didn't need a remoting-config.xml when using the adobe sdk
>>>>>>>>>> this is my services-config.xml:
>>>>>>>>>>
>>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>>> <services-config>
>>>>>>>>>> <services>
>>>>>>>>>> <service id="amfphp-flashremoting-**service"
>>>>>>>>>> class="flex.messaging.**services.RemotingService"
>>>>>>>>>> messageTypes="flex.messaging.**messages.RemotingMessage">
>>>>>>>>>> <destination id="zend">
>>>>>>>>>> <channels>
>>>>>>>>>> <channel ref="my-zend"/>
>>>>>>>>>> </channels>
>>>>>>>>>> <properties>
>>>>>>>>>> <source>*</source>
>>>>>>>>>> </properties>
>>>>>>>>>> </destination>
>>>>>>>>>> </service>
>>>>>>>>>> </services>
>>>>>>>>>> <channels>
>>>>>>>>>> <channel-definition id="my-zend"
>>>>>>>>>> class="mx.messaging.channels.**AMFChannel">
>>>>>>>>>> <endpoint uri="###the-uri###" class="flex.messaging.**
>>>>>>>>>> endpoints.AMFEndpoint"/>
>>>>>>>>>> </channel-definition>
>>>>>>>>>> </channels>
>>>>>>>>>> </services-config>
>>>>>>>>>>
>>>>>>>>>> as i said i just put -services services-config.xml in the
>>>>>>>>>> compiler options
>>>>>>>>>> and it worked, the file is in the project root in flashdevelop
>>>>>>>>>>
>>>>>>>>>> I didn't change anything but switchingthe sdk from adobe's 4.6 to
>>>>>>>>>> the apache 4.9.1
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ----- Original Message ----- From: "Thiago Maia" <[email protected]>
>>>>>>>>>> To: <[email protected]>
>>>>>>>>>> Sent: Monday, July 01, 2013 8:13 AM
>>>>>>>>>> Subject: Re: -services services-config.xml
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hello
>>>>>>>>>>>
>>>>>>>>>>> Dont forget the remoting-config.xml -)
>>>>>>>>>>>
>>>>>>>>>>> Thiago Maia
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> i migrated from adobe's sdk to the new apache sdk, I'm using
>>>>>>>>>>>> Flashdevelop.
>>>>>>>>>>>> In my project I'm using Amfphp, so i have a services-config.xml
>>>>>>>>>>>> in the project root.
>>>>>>>>>>>> In the compiler options (flashdevelop) i put "-services
>>>>>>>>>>>> services-config.xml"
>>>>>>>>>>>> this worked with the adobe sdk (same project), but with the
>>>>>>>>>>>> apache sdk i get :
>>>>>>>>>>>>
>>>>>>>>>>>> faultCode:InvokeFailed faultString:'[MessagingError
>>>>>>>>>>>> message='Destination 'zend' either does not exist or the
>>>>>>>>>>>> destination has no
>>>>>>>>>>>> channels defined (and the application does not define any default
>>>>>>>>>>>> channels.)']' faultDetail:'Couldn't establish a connection to
>>>>>>>>>>>> 'zend''
>>>>>>>>>>>>
>>>>>>>>>>>> I downloaded the sdk with the BlazeDS option selected .
>>>>>>>>>>>> What I'm doing wrong?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>
>