Posted by admin on December 17th, 2007
With FluorineFX you need to add the tag [RemotingServiceAttribute]] to our service class to make it accessible. It means you need a hard reference to FluorineFX in your class.
There’s however a configuration setting to make all services accessible at once:
<!– value=”browse|access” –>
<remotingServiceAttribute>access</remotingServiceAttribute>
<
Posted by admin on December 17th, 2007
In Fluorine:
<classMappings>
<classMapping>
<type><![CDATA[System.Collections.Generic.List<T>]]></type>
<customClass>Array</customClass>
</classMapping>
</classMappings>
In FluorineFX:
In services-config.xml
<channels>
<channel-definition id=“my-amf“ class=“mx.messaging.channels.AMFChannel“>
<endpoint uri=“http://{server.name}:{server.port}/context.root}/Gateway.aspx” class=“flex.messaging.endpoints.AMFEndpoint“/>
<properties>
<legacy-collection>true</legacy-collection>
</properties>
</channel-definition>
<!–
<channel-definition id=”my-rtmp” class=”mx.messaging.channels.RTMPChannel”>
<endpoint uri=”rtmp://{server.name}:2037″ class=”flex.messaging.endpoints.RTMPEndpoint”/>
<properties>
<idle-timeout-minutes>20</idle-timeout-minutes>
</properties>
</channel-definition>
–>
</channels>
<
Posted by admin on December 17th, 2007
Finding examples with AS2 to do a Remote Call (Fluorine or WebORB) is easy.
However, finding an example for AS3 is very, very hard.
Here's how you do it (thanks to Ward De Langhe):
Actionscript:
-
private function getGalleryData():void{
-
-
registerClassAlias("logics.BLL.CollectionEntity",GalleryVO);
-
registerClassAlias("logics.BLL.GridRowEntity",GalleryRowVO);
-
registerClassAlias("logics.BLL.PictureEntity",GalleryImageVO);
-
-
galleryService=new NetConnection();
-
galleryService.objectEncoding=ObjectEncoding.AMF0;
-
galleryService.connect(SiteModel.GATEWAY_URL);
-
//SiteModel.GATEWAY_URL is url path to your gateway
-
responder=new Responder(galleryResult, galleryFault);
-
galleryService.call("remoting.service.CollectionService.GetCollection",responder);
-
}
-
-
private function galleryResult(result:Object):void{
-
galleryVO=result as GalleryVO;
-
}
-
-
private function galleryFault(fault:Object):void{
-
}
We haven't been able to figure aout why ObjectEncoding.AMF3 doesn't work.
Well, it works, but in the result the objects are not deserialized, so you just get Objects...
<
Posted by admin on December 5th, 2007
SOLVED WITH FLUORINEFX VERSION 1.0.0.3!
In Fluorine there seems to be a problem with sending a xml object with null as a value.
Next screenshot is taken from Charles. As you can see there's a property Content which has null as a value. The property Content is typed to XML in Flex.

The error I get is:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3XmlDocument()
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(Byte typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Object(Int32 handle, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(Byte typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Array(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(Byte typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Object(Int32 handle, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(Byte typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Array(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(Byte typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Object(Int32 handle, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(Byte typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadAMF3Data(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadData(Int32 typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadData(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadArray(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadData(Int32 typeCode, IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFReader.ReadData(IApplicationContext applicationContext)
at com.TheSilentGroup.Fluorine.AMFDeserializer.ReadBody(IApplicationContext applicationContext)
and
Root element is missing.
Screenshot from Charles:

Apparently Fluorine doesn't check whether the value is null. We've looked into the source code of fluorine and indeed a XMLDocument is created with null as a parameter. This throws an exception... With WebOrb this problem does not occur.
I would have to ask if the problem is fixed with FluorineFX.
<
Recent Comments