You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/10/05 12:01:24 UTC

[GitHub] [royale-asjs] cristallium edited a comment on issue #119: Request to AMFPHP fails to return any fault or result event

cristallium edited a comment on issue #119: Request to AMFPHP fails to return any fault or result event
URL: https://github.com/apache/royale-asjs/issues/119#issuecomment-538643795
 
 
   Hi Carlos,
   1- So, I have succed to use` mx:RemoteObject `with AMFPHP V1.9 and V2.0 (for now I have test just one basic argument), but I need to use `<mx:Application>`. Is there a way to use it in a `<j:Application>` ?
   
   2- Unfortunaly, trying using as3 with Netconnection doesn't work.
   
   Here is the way I use it, first make the Netconnection one time (singleton) :
   
   ```
   	    var tempConnection:NetConnection = new NetConnection();
   	    tempConnection.objectEncoding = ObjectEncoding.AMF3;
   	    _netConnection = new NetConnection();
   	    _netConnection.objectEncoding = ObjectEncoding.AMF3;
   	    _netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
               _netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
               _netConnection.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); 
               _netConnection.addEventListener(AsyncErrorEvent.ASYNC_ERROR,ev_AsyncErrorEvent);
               _netConnection.connect(_gatewayURL);
   ```
   
   then when I need to call a service (this is working using Flex) where `name` is the remote function to call
   
   ```
           public function callService(name:String, listener:Function, ...args):void
   	{
   		_netConnection.call.apply(_netConnection, [name, new Responder(listener, statusHandler)].concat(args));
   	}
   ```
   
   Using it, I have this following error 
   
   ```
   	/onStatusA$flex.messaging.messages.ErrorMessage
   correlationId	faultCode@ faultDetailfaultStringÉTrying to get property of non-object . 
   <br>file:  /home/www/myserver.com/amfphpv2/Plugins/AmfphpFlexMessaging/AmfphpFlexMessaging.php 
   <br>line: 113 
   <br>context: Array
   (
       [requestMessage] => Amfphp_Core_Amf_Message Object
           (
               [targetUri] => null
               [responseUri] => /1
               [data] => Array
                   (
                       [0] => 123 
                   )
   
           )
   
       [serviceRouter] => Amfphp_Core_Common_ServiceRouter Object
           (
               [serviceFolders] => Array
                   (
                       [0] => /home/www/myserver.com/amfphpv2/Core/../Services/
                   )
   
               [serviceNames2ClassFindInfo] => Array
                   (
                       [AmfphpMonitorService] => Amfphp_Core_Common_ClassFindInfo Object
                           (
                               [absolutePath] => /home/www/myserver.com/amfphpv2/Plugins/AmfphpMonitor/AmfphpMonitorService.php
                               [className] => AmfphpMonitorService
                           )
   
                       [AmfphpDiscoveryService] => Amfphp_Core_Common_ClassFindInfo Object
                           (
                               [absolutePath] => /home/www/myserver.com/amfphpv2/Plugins/AmfphpDiscovery/AmfphpDiscoveryService.php
                               [className] => AmfphpDiscoveryService
                           )
   
                   )
   
               [checkArgumentCount] => 1
           )
   
       [explicitTypeField] => _explicitType
   )
   	rootCause
   ```
   
   Have you an idea why it isn't working ? I think the issue is that targetUri is null, but I don't see how to set it
   
   Regards
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services