Search Results

Search found 20 results on 1 pages for 'remoteobject'.

Page 1/1 | 1 

  • Issues with mx:method, mx.rpc.remoting.mxml.RemoteObject, and sub-classing mx.rpc.remoting.mxml.Remo

    - by Ryan Wilson
    I am looking to subclass RemoteObject. Instead of: <mx:RemoteObject ... > <mx:method ... /> <mx:method ... /> </mx:RemoteObject> I want to do something like: <remoting:CustomRemoteObject ...> <mx:method ... /> <mx:method ... /> </remoting:CustomRemoteObject> where CustomRemoteObject extends mx.rpc.remoting.mxml.RemoteObject like so: package remoting { import mx.rpc.remoting.mxml.RemoteObject; public class CustomRemoteObject extends RemoteObject { public function CustomRemoteObject(destination:String=null) { super(destination); } } } However, when doing so and declaring a CustomRemoteObject in MXML as above, the flex compiler shows the error: Could not resolve <mx:method> to a component implementation At first I thought it had something to do with CustomRemoteObject failing to do something, despite that (or since) it had no change except as to the name. So, I copied the source from mx.rpc.remoting.mxml.RemoteObject into CustomRemoteObject and modified it so the only difference was a refactoring of the class and package name. But still, the same error. Unlike many MXML components, I cannot cmd+click <mx:method> in FlashBuilder to open the source. Likewise, I have not found a reference in mx.rpc.remoting.mxml.RemoteObject, mx.rpc.remoting.RemoteObject, or mx.rpc.remoting.AbstractService, and have been unsuccessful in find its source online. Which leads me to the questions in the title: What exactly is <mx:method>? (yes, I know it's a declaration of a RemoteObject method, and I know how to use it, but it's peculiar in regard to other components) Why did my attempt at subclassing RemoteObject fail, despite it effectually being a rename? Perhaps the root, why can mx.rpc.remoting.mxml.RemoteObject as an MXML declaration accept <mx:method> child tags, yet the source of said class cannot when refactored in name only?

    Read the article

  • Flex RemoteObject Intermittently Failing to Invoke CFC

    - by Justin
    I have a Flex app that uses Flash Remoting and the RemoteObject to pull data from a ColdFusion CFC. About 75% of the time it works, but the other times I get a message using Charles (a debugging tool) that says faultString = "Unable to Invoke CFC". FaultCode = "Server.Processing". Here's my RemoteObject: The server set up on our web farm is to use load balancing. I'm not sure if this is causing the problem or not. Probably not, but it's a thought. Any help is appreciated!!

    Read the article

  • Flex: Unexpected leakage with RemoteObject + IExternalizable?

    - by David Wolever
    I've been tinkering with IExternalizable, but I've noticed some unexpected behavior. I've got this class: public function readExternal(input:IDataInput):void { input.readObject(); input.readObject(); input.readObject(); } public function writeExternal(output:IDataOutput):void { output.writeObject("first string"); output.writeObject(424242); output.writeObject("second string"); } But when I try to serialize this class using AMF and send it to a remote server (via RemoteObject), Charles shows me that the request looks like this: But it seems wrong that my serialized object is leaking out into the rest of the request. So, what am I doing wrong? Is there some part of the documentation I've missed?

    Read the article

  • In flex how do I pass data retrieved from a remote object service to a modules interface?

    - by Dan G
    I found at this Adobe tutorial a nice "RemoteService" class that creates a RemoteObject and contains the functions for handling the result and fault events. If I wanted to use this approach, how could I pass the data from the result handler to interfaces that modules from the main application could use? I could put the RemoteService/RemoteObject in the modules, but (in my opinion- and I could be wrong) the best design seems to be using the remote calls in the main app and passing the data along to the modules.

    Read the article

  • Why wouldn't a flex remoteobject be able to work within a custom component?

    - by Gary
    Please enlighten this flex noob. I have a remoteobject within my main.mxml. I can call a function on the service from an init() function on my main.mxml, and my java debugger triggers a breakpoint. When I move the remoteobject declaration and function call into a custom component (that is declared within main.mxml), the remote function on java-side no longer gets called, no breakpoints triggered, no errors, silence. How could this be? No spelling errors, or anything like that. What can I do to figure it out? mxml code: < mx:RemoteObject id="myService" destination="remoteService" endpoint="$(Application.application.home}/messagebroker/amf" > < /mx:RemoteObject > function call is just 'myService.getlist();' when I move it to a custom component, I import mx.core.Application; so the compiler doesn't yell my child component: child.mxml <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" > <mx:Script> <![CDATA[ import mx.core.Application; public function init():void { helloWorld.sayHello(); } ]]> </mx:Script> <mx:RemoteObject id="helloWorld" destination="helloService" endpoint="$(Application.application.home}/messagebroker/amf" /> <mx:Label text="{helloWorld.sayHello.lastResult}" /> </mx:Panel> my main.mxml: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" xmlns:test="main.flex.*" > <mx:Script> <![CDATA[ [Bindable] public var home:String; [Bindable] public var uName:String; public function init():void { //passed in by wrapper html home = Application.application.parameters.appHome; uName = Application.application.parameters.uName; } ]]> </mx:Script> <test:child /> </mx:Application>

    Read the article

  • Why wouldn't a flex remoteobject work within a custom component?

    - by Gary
    Please enlighten this flex noob. I have a remoteobject within my main.mxml. I can call a function on the service from an init() function on my main.mxml, and my java debugger triggers a breakpoint. When I move the remoteobject declaration and function call into a custom component (that is declared within main.mxml), the remote function on java-side no longer gets called, no breakpoints triggered, no errors, silence. How could this be? No spelling errors, or anything like that. mxml code: &ltmx:RemoteObject id="myService" destination="remoteService" endpoint="$(Application.application.home}/messagebroker/amf" &gt &lt/mx:RemoteObject%gt function call is just 'myService.getlist();' when I move it to a custom component, I import mx.core.Application; so the compiler doesn't yell

    Read the article

  • Using Mate's RemoteObjectInvoker with C# classes

    - by FigBug
    I'm using the Mate framework for Flex and communicating with a server running C#. I'm having trouble mapping C# classes to ActopnScript classes. I've got it working fine for simple classes and built in datatypes. If I have a C# method in my API that returns a API.Foo.Result what name do I use for my RemoteClass alias? Do I need to make a separate ActionScript class for each variation of the API.Foo.Result? How do I call C# method that takes a class as a parameter? Making an ActionScript class with members with the same names doesn't seem to work. What is the best way to handle C# classes that contain arrays of objects? The seem to get converted to ArrayCollections of Object. Is there a way to get them converted to an ArrayCollection of my specific class?

    Read the article

  • Receiving generic typed <T> custom objects through remote object in Flex

    - by Aaron
    Is it possible to receive custom generic typed objects through AMF? I'm trying to integrate a flex app with an existing C# service but flex is choking on custom generic typed objects. As far as I can tell Flex doesn't even support generics, but I'd like to be able to even just read in the object and cast its members as necessary. I basically just want flex to ignore the <T>. I'm hopeful that there's a way to do this, since flex doesn't complain about typed collections (a server call returning List works fine and flex converts it to an ArrayCollection just like an un-typed List). Here's a trimmed down example of what's going on for me: The custom C# typed class public class TypeTest<T> { public T value { get; set; } public TypeTest () { } } The server method returning the typeTest public TypeTest<String> doTypeTest() { TypeTest<String> theTester = new TypeTest<String>("grrrr"); return theTester; } The corresponding flex value object: [RemoteClass(alias="API.Model.TypeTest")] public class TypeTest { private var _value:Object; public function get value():Object { return _value; } public function set value(theValue:Object):void { _value = value; } public function TypeTest() { } } and the result handler code: public function doTypeTest(result:TypeTest):void { var theString:String = result.value as String; trace(theString); } When the result handler is called I get the runtime error: TypeError: Error #1034: Type Coercion failed: cannot convert mx.utils::ObjectProxy@11a98041 to com.model.vos.TypeTest. Irritatingly if I change the result handler to take parameter of type Object it works fine. Anyone know how to make this work with the value object? I feel like i'm missing something really obvious.

    Read the article

  • BlazeDS first response is VERY SLOW

    - by chibban
    Hi everyone, I have a very strange an annoying problem: I have an appliaction written in Flex 3, with BlazeDS 3.2 and Java in the backend. I'm actually using a portal (liferay) to display portlets that contain Flex movies. When I hit a refresh button on my page, all the Flex movies send a RemoteObject request to the server (using BlazeDS), which should go to java classes and invoke a method (standard BlazeDS usage I 'm guessing). I'm experiencing VERY slow response (14 minutes) on the first hit, while the following hits are much faster. I've enabled the BlazeDS logging (logging level="All") and I also have debug prints coming from my java classes. I also use the "showBusyCursor" attribute for the RemoteObject - so I can see indication of the request being sent from the flex movie. Here is what I see: I hit the refresh button Each movie invokes a RemoteObject request I see a busy sign - in all the movies I see nothing in the log - no BlazeDS prints and no Java prints Wait 14 minutes or so I see BlazeDS prints followed by Java prints I see data populating my flex movies. The really weird thing is that I have the same "application" installed in 4 different computers (on my laptop and in 3 other unix machines), 3 of these installations work well (good response times) and only 1 has the issue I'm describing. I've tried many things, but everything failed. I'd be really happy to get some advice on this. Thanks

    Read the article

  • ActionScript/Flex ArrayCollection of Number objects to Java Collection<Long> using BlazeDS

    - by Justin
    Hello, I am using Flex 3 and make a call through a RemoteObject to a Java 1.6 method and exposed with BlazeDS and Spring 2.5.5 Integration over a SecureAMFChannel. The ActionScript is as follows (this code is an example of the real thing which is on a separate dev network); import com.adobe.cairngorm.business.ServiceLocator; import mx.collections.ArrayCollection; import mx.rpc.remoting.RemoteObject; import mx.rpc.IResponder; public class MyClass implements IResponder { private var service:RemoteObject = ServiceLocator.getInstance().getRemoteOjbect("mySerivce"); public MyClass() { [ArrayElementType("Number")] private var myArray:ArrayCollection; var id1:Number = 1; var id2:Number = 2; var id3:Number = 3; myArray = new ArrayCollection([id1, id2, id3]); getData(myArray); } public function getData(myArrayParam:ArrayCollection):void { var token:AsyncToken = service.getData(myArrayParam); token.addResponder(this.responder); //Assume responder implementation method exists and works } } This will make a call, once created to the service Java class which is exposed through BlazeDS (assume the mechanics work because they do for all other calls not involving Collection parameters). My Java service class looks like this; public class MySerivce { public Collection<DataObjectPOJO> getData(Collection<Long> myArrayParam) { //The following line is never executed and throws an exception for (Long l : myArrayParam) { System.out.println(l); } } } The exception that is thrown is a ClassCastException saying that a java.lang.Integer cannot be cast to a java.lang.Long. I worked around this issue by looping through the collection using Object instead, checking to see if it is an Integer, cast it to one, then do a .longValue() on it then add it to a temp ArraList. Yuk. The big problem is my application is supposed to handle records in the billions from a DB and the id will overflow the 2.147 billion limit of an integer. I would love to have BlazeDS or the JavaAdapter in it, translate the ActionScript Number to a Long as specified in the method. I hate that even though I use the generic the underlying element type of the collection is an Integer. If this was straight Java, it wouldn't compile. Any ideas are appreciated. Solutions are even better! :)

    Read the article

  • combobox dataprovider

    - by FALCONSEYE
    I have the following: <mx:RemoteObject id="myCFC" destination="ColdFusion" source="components.myCFC" showBusyCursor="true"> <mx:method name="getStuff" result="UserHandler(event);"/> </mx:RemoteObject> ... <mx:ComboBox id="propertyCode" dataProvider="{qry_stuff}" labelField="name" /> Index.as has: [Bindable] public var qry_stuff:ArrayCollection = new ArrayCollection; private function UserHandler(event:ResultEvent):void { qry_stuff= event.result as ArrayCollection; } public function init():void { /* call my remote Object to get my data */ myCFC.getStuff(); } my problem is the combobox displays [object Object] I know there is nothing wrong with the cfc and there is a field called "name" in getStuff. Why does it not display the value of the object? thanks in advance.

    Read the article

  • Flex: How to refresh/repaint a chart?

    - by Rob
    I have a chart for which the data is provided asynchronously via a CallResponder (used with a RemoteObject). However, it does not seem possible to update the chart with the data after it has been initially drawn. Here are the relevant snippets of (simplified) code: // code below is in the application MXML <mx:CallResponder id="result" result="resultHandler(event)" /> private function resultHandler(event:ResultEvent):void { // panel is an instance of ChartPanel this.panel.init(event.result); } // invoked when user clicks a button private function displayChart():void { this.currentState = "ShowChart"; result.token = remoteObject.getUrlStatistics(); } // code below is in ChartPanel <mx:BarChart id="chart" /> public function init(value:Object):void { var xml:XMLList = XMLList(value); var data:ArrayCollection = new ArrayCollection(); for each (var element:XML in xml.children()) { // not shown: extract value out of XML, put in ArrayList data.addItem(...); } this.chart.dataProvider = data; } The result is that it draws an empty chart. the resultHandler function or init function in ChartPanel needs to trigger a repaint or something similar. I have tried: Firing a collection modified event after assigning it to chart.dataProvider calling invalidateDisplayList (tried with all components) binding the chart data provider to a variable, and doing the above. changing the view state on the last line of resultHandler. None of them worked. When I fetch the data and cache it locally, then use it to call init synchronously, the chart displays correctly. What am I missing here?

    Read the article

  • Flex - Increase timeout on a PHP service function call

    - by Travesty3
    I'm using Flash Builder 4 Beta 2. I have it connecting to a PHP service. The way I set this up was using the wizard, so I didn't actually write the code to connect to it. The service looks like this: package services.flash { import mx.rpc.AsyncToken; import com.adobe.fiber.core.model_internal; import mx.rpc.AbstractOperation; import valueObjects.CustomDatatype8; import valueObjects.NewUsageData; import mx.collections.ItemResponder; import mx.rpc.remoting.RemoteObject; import mx.rpc.remoting.Operation; import com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper; import com.adobe.fiber.valueobjects.AvailablePropertyIterator; import com.adobe.serializers.utility.TypeUtility; [ExcludeClass] internal class _Super_FLASH extends RemoteObjectServiceWrapper { // Constructor public function _Super_FLASH() { // initialize service control _serviceControl = new RemoteObject(); var operations:Object = new Object(); var operation:Operation; operation = new Operation(null, "sendCommand"); operation.resultType = Object; operations["sendCommand"] = operation; ... } } One of the functions that I'm calling fetches users from a MySQL database. There are about 30,000 users right now. The service seems to timeout when fetching more than around 22,000 rows, I get the "Channel Disconnected before an acknowledgement was received" error. If I call the PHP script from a browser, it fetches them all with no problems at all, however. I have tried increasing the timeout in the PHP script (which didn't work), but obviously this isn't the problem since the browser is able to pull them up with no problems. Is there a way to increase the timeout of the PHP service in Flash Builder? I'm a bit of a noob when it comes to Flash, so please be descriptive. Thanks in advance!

    Read the article

  • pyamf flex google app engine

    - by mydiscogr
    Hi to all, I've just made a little server amf on gae and pyAmf ( now down?). Well I've also made a client in flex 4 and all works well. Now I'd like to add an authentication method, and I know that there a method in flex to authenticate using RemoteObject.setCredentials(username:String, password:String, charset:String = null):void Now I don't understand how use this in client side and server side, where register user, should I create user tables? there's a book what is the way to use AMF with flex? thanks

    Read the article

  • Protocol Buffers In C#: How Are Boxed Value Types Handled

    - by Greg Dean
    In the following examples: public class RowData { public object[] Values; } public class FieldData { public object Value; } I am curious as how either protobuf-net or dotnet-protobufs would handle such classes. I am more familiar with protobuf-net, so what I actually have is: [ProtoContract] public class RowData { [ProtoMember(1)] public object[] Values; } [ProtoContract] public class FieldData { [ProtoMember(1)] public object Value; } However I get an error saying "No suitable Default Object encoding found". Is there an easy way to treat these classes, that I am just not aware of? To elaborate more on the use case: This is a scaled down version of a data class used in remoting. So essentially it looks like this: FieldData data = new FieldData(); data.Value = 8; remoteObject.DoSomething(data); Note: I've omitted the ISerializable implementation for simplicity, but it is as you'd expect.

    Read the article

  • Get name of property as a string

    - by Jim C
    I'm trying to improve the maintainability of some code involving reflection. The app has a .NET Remoting interface exposing (among other things) a method called Execute for accessing parts of the app not included in its published remote interface. Here is how the app designates properties (a static one in this example) which are meant to be accessible via Execute: RemoteMgr.ExposeProperty("SomeSecret", typeof(SomeClass), "SomeProperty"); So a remote user could call: string response = remoteObject.Execute("SomeSecret"); and the app would use reflection to find SomeClass.SomeProperty and return its value as a string. Unfortunately, if someone renames SomeProperty and forgets to change the 3rd parm of ExposeProperty(), it breaks this mechanism. I need to the equivalent of: SomeClass.SomeProperty.GetTheNameOfThisPropertyAsAString() to use as the 3rd parm in ExposeProperty so refactoring tools would take care of renames. Is there a way to do this? Thanks in advance.

    Read the article

  • How to handle custom Java exception in Flex app.

    - by mico
    Hello, we are using BlazeDS as a proxy between Flex and Java. The approach is the same as in (http://www.flexpasta.com/index.php/2008/05/16/exception-handling-with-blazeds-and-flex/) Java exception declaration: public class FlexException extends RuntimeException { private String name = 'John'; public FlexException(String message) { super(message); } public String getName() { return name; } } Then, we are throwing it: public void testMethod(String str) throws Exception { throw new FlexException("Custom exception"); } Flex part: private function faultHandler(event:FaultEvent):void { var errorMessage:ErrorMessage = event.message as ErrorMessage; trace("error++"); } and remote object is instantiated here: <mx:RemoteObject id="mySample" destination="mySample" channelSet="{cs1}" fault="faultHandler(event)" /> But in event.fault I get "Server.Processing" and event.faultString equals "There was an unhandled failure on the server. Custom exception" How can I receive the data is specified in exception props ? BlazeDS log is similar to the log that was mentioned in the comment [BlazeDS] 11:28:13.906 [DEBUG] Serializing AMF/HTTP response Version: 3 (Message #0 targetURI=/2/onStatus, responseUR|-) (Typed Object #0 ‘flex.messaging.messages.ErrorMessage’) headers = (Object #1) rootCause = null body = null correlationId = “2F1126D7-5658-BE40-E27C-7B43F3C5DCDD” faultDetail = null faultString = “Login required before authorization can proceed.” clientId = “C4F0E77C-3208-ECDD-1497-B8D070884830? timeToLive = 0.0 destination = “books” timestamp = 1.204658893906E12 extendedData = null faultCode = “Client.Authentication” messageId = “C4F0E77C-321E-6FCE-E17D-D9F1C16600A8? So the quesion is why rootClause is null? How can I get that Exception object not just a string 'Custom exception'?

    Read the article

  • Can't Compile Correct Mapping File

    - by NoOne
    Hello, Im now developping one application in C# with Remoting objects and NHibernate. So here is a image explaining how my projects are divided. Views Layer This layer will be responsible for the users interface. This layer will always use the Controls Layer to create and edit objects; Control Layer This is my persistence layer, here Ill have all the NHibernate configuration. This is my critic point, because ListSingleton Project will have only my RemoteObject. (Here I have the App.config file) Models Layer Entity layer. Here I only have the entities classes and their respective mapping. I’ve done a test solution with no remoting and only with the projects of the Control and Model Layers. It was all working ok. Now that I added the Views Layer and set the solution to start with projects Client and Server (Client calls the Control Layer and this would do a try to persist a object) I’m getting a error at : Configuration cfg = new Configuration(); cfg.AddXmlFile("mapping/User.hbm.xml"); InnerException: {"Could not compile the mapping document: mapping/User.hbm.xml"} InnerException.InnerException: {"Could not find the dialect in the configuration"} StackTrace in the InnerException.InnerException " em NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props)\r\n em NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc)" But I know that there is no error in the mapping file because I used in my test application.

    Read the article

  • .NET remoting: System references wrong .NET dll, but how to cure ?

    - by Quandary
    Question: I defined an interface like below. The problem now is, that when I add the dll (API.dll) as reference in an asp.net project, it references a wrong API.dll, though I referenced the correct dll. In turn, it doesn't find GetLDAPlookup, but there is another method that is not in defined here, but in an older version of API.dll... I rebuilt the dll I referenced, so it is definitely the latest version that I added as reference. Do I have to add another GUID, or something ? Imports System.Runtime.InteropServices Namespace RemoteObject ''' <summary> ''' Defines server interface which will be deployed on every client ''' </summary> ''' <GuidAttribute("921DE547-32FA-40BB-961A-EA390B7AE27D")> _ Public Interface IServerMethods ''' <summary> ''' Function to call the server from the client ''' </summary> ''' <param name="strMessage">Some text</param> ''' Sub ServerPrint(ByVal strMessage As String) ''' <summary> ''' Function to call the server from the client ''' </summary> ''' <param name="strMessage">Some text</param> ''' <returns>Some interesting text</returns> ''' Function GetLDAPlookup(ByVal strMessage As String) As System.Data.DataSet End Interface End Namespace

    Read the article

  • Flex+JPA/Hibernate+BlazeDS+MySQL how to debug this monster?!

    - by Zenzen
    Ok so I'm making a "simple" web app using the technologies from the topic, recently I found http://www.adobe.com/devnet/flex/articles/flex_hibernate.html so I'm following it and I try to apply it to my app, the only difference being I'm working on a Mac and I'm using MAMP for the database (so no command line for me). The thing is I'm having some trouble with retrieving/connecting to the database. I have the remoting-config.xml, persistance.xml, a News.java class (my Entity), a NewsService.java class, a News.as class - all just like in the tutorial. I have of course this line in one of my .mxmls: <mx:RemoteObject id="loaderService" destination="newsService" result="handleLoadResult(event)" fault="handleFault(event)" showBusyCursor="true" /> And my remoting-config.xml looks like this (well part of it): <destination id="newsService"> <properties><source>com.gamelist.news.NewsService</source></properties> </destination> NewsService has a method: public List<News> getLatestNews() { EntityManagerFactory emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT); EntityManager em = emf.createEntityManager(); Query findLatestQuery = em.createNamedQuery("news.findLatest"); List<News> news = findLatestQuery.getResultList(); return news; } And the named query is in the News class: @Entity @Table(name="GLT_NEWS") @NamedQueries({ @NamedQuery(name="news.findLatest", query="from GLT_NEWS order by new_date_added limit 5 ") }) The handledLoadResult looks like this: private function handleLoadResult(ev:ResultEvent):void { newsList = ev.result as ArrayCollection; newsRecords = newsList.length; } Where: [Bindable] private var newsList:ArrayCollection = new ArrayCollection(); But when I try to trigger: loaderService.getLatestNews(); nothing happens, newsList is empty. Few things I need to point out: 1) as I said I didn't install mysql manually, but I'm using MAMP (yes, the server's running), could this cause some trouble? 2) I already have a "gladm" database and I have a "GLT_NEWS" table with all the fields, is this bad? Basically the question is how am I suppose to debug this thing so I can find the mistake I'm making? I know that loadData() is executed (did a trace()), but I have no idea what happens with loaderService.getLatestNews()... @EDIT: ok so I see I'm getting an error in the "fault handler" which says "Error: Client.Error.MessageSend - Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/WebContent/messagebroker/amf' - "

    Read the article

1