First of all sorry for the late reply, I was in journey from last two
days,
Ok lets come to the point,
This is definetly not with LCDS version,
Second I want to know the code of your FlexProductData.as file from
its package and I want to know about the your java class package
structure.
Did you copied the swf file into JBOSS or you copied the source...
just want to know how you are deploying the application.
Did you copied... the FlexProductData.as file also into JBOSS !!!!
Regards,
Imtiyaz Basha M S
On Sep 26, 1:08 pm, chan <[EMAIL PROTECTED]> wrote:
> Hi Imtiyaz,
>
> Thanks a lot, I could run the application through flexbuilder.
>
> Imtiyaz, I am using flexbuilder( Latest free trial version) as a tool
> to develop the flex program and after program runs succesffully
> through flex builder , I copy it to my jboss applciation and try to
> run it.
>
> First think, the code you have given me in last post is changed to as
> follows in order to run it through flexbuilder.
>
> <mx:Script>
> <![CDATA[
> import mx.controls.Alert;
> import mx.rpc.events.ResultEvent;
> import mx.collections.ArrayCollection;
> private function
> displayPersonDetails(event:ResultEvent):void
> {
> var myAc :ArrayCollection = new ArrayCollection();
> var fpd:FlexProductData = null;
> var list:ArrayCollection = new ArrayCollection();
> list=(ArrayCollection)(event.result);
> var fdata:Object;
> for(var i:int = 0;i< list.length;i++){
> fdata =Object(list.getItemAt(i));
> Alert.show(fdata.name);
> myAc.addItem(fdata);
> }
> Urdg.dataProvider = myAc;
> }
> ]]>
> </mx:Script>
>
> The purpose of type casting the list object to Object(flex object)
> that It was showing me the same error if i type cast to
> FlexProductData object of FlexProductData.as class.
>
> Initially above code will be fine for me now. We can solve that
> problem later on , as I may have place .as file in wrong directory or
> somethink is missing.
>
> Problem is that If I run the same program thorugh jboss application,
> it is giving me the same error i.e.
> RPC Fault faultString="Cannot find type for: FlexProductData"
> faultCode="DecodingError" faultDetail="null"]
> at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/
> internal::processResult()
> at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/
> internal::resultHandler()
> at mx.rpc::Responder/result()
>
> I can run other flex program through jboss but am understanding why
> the same program which runs in flexbuilder is not running in jboss.
>
> My prediction is that, running the flex program thorugh flex builder
> might be using different version of LCDS and the one which is there in
> jboss is different. I do not know how to find out the difference
> between these 2 version.
>
> Could you please guide me where i am doing wrong think? and if
> possible let me know also how to create the flexproduct data and where
> to put it in jboss?
>
> Once again I would thank to you as we are very much closer to solve
> the problem.
>
> Let me know if you need more details on this.
>
> Thanks,
> chandan
>
> On Sep 25, 3:51 pm, imtiyaz <[EMAIL PROTECTED]> wrote:> First Note : Add a
> handler to your webservice result event. in the
> > handler w
>
> > Point 1 : your webservice is returning ArrayList which flex will die
> > to understand :) , So the type cast it using ArrayCollection.
> > Point 2 : your arraylist (result) contains collection FlexProductData,
> > here again flex will die to understand. so Create a similar action
> > script class in Flex, and use it.
>
> > pacakage your.package.name{
>
> > public class FlexProductData {
> > public var productID : int ;
>
> > fproddata.setProductId(10);
> > fproddata.setName("kitkat");
> > fproddata.setPrice(10.25);
> > fproddata.setDescription("nice chocalate");
> > fproddata.setCategory("category");
>
> > }
>
> > On Sep 25, 12:04 pm,chan<[EMAIL PROTECTED]> wrote:
>
> > > Hi Imtiyaz.m.s ,Anubhav
>
> > > Thanks for your response,
>
> > > I am understanding what you are saying. But as I am new to this
> > > technology, I am not understanding of what type of class I should
> > > write so that it can be type casted with FlexProductData. Is it
> > > actionscript class that you were talking about?
>
> > > I will let you know what exactly my webservice returns,
>
> > > See after calling the getData method of the webservice mentioned
> > > above, it goes to getData method of the webservice. Please see the
> > > getData method below.
>
> > > public List getData() throws AuthorizationException,
> > > StartIndexOutOfBoundsException {
> > > ArrayList list = new ArrayList();
> > > FlexProductData fproddata= new FlexProductData();
> > > fproddata.setProductId(10);
> > > fproddata.setName("kitkat");
> > > fproddata.setPrice(10.25);
> > > fproddata.setDescription("nice chocalate");
> > > fproddata.setCategory("category");
> > > list.add(fproddata);
> > > return list;
> > > }
>
> > > This result I want to show on ui using above flex program i.e.
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> > > backgroundColor="#FFFFFF">
> > > <mx:WebService id="srv" wsdl="http://localhost:8080/
> > > tdemandweb/
> > > services/ProductThresholdService?wsdl" showBusyCursor="true" />
> > > <mx:DataGrid dataProvider="{srv.getData.lastResult}"
> > > width="100%"
> > > height="100%">
> > > <mx:columns>
> > > <mx:DataGridColumn dataField="name"
> > > headerText="Name"/>
> > > <mx:DataGridColumn dataField="price"
> > > headerText="Price"/>
> > > <mx:DataGridColumn dataField="productId"
> > > headerText="productId"/>
> > > <mx:DataGridColumn dataField="description"
> > > headerText="description"/>
> > > <mx:DataGridColumn dataField="description"
> > > headerText="description"/>
> > > </mx:columns>
> > > </mx:DataGrid>
> > > <mx:Button label="Get Product Data" click="srv.getData()"/>
> > > </mx:Application>
>
> > > Now, please let me know where to write the compitible FlexProductData
> > > class and if possible how?
>
> > > and how to use that class in my flex program?
>
> > > Please let you know if you need any other information from my side.
>
> > > Regards,
> > > chandan
>
> > > On Sep 24, 10:28 pm, imtiyaz <[EMAIL PROTECTED]> wrote:
>
> > > > Yes anubhav is on right track,
> > > > From the error its clear that you are returning FlexProductData
> > > > object, when it reaches to Flex it tries to type cast it with the type
> > > > you are using, here is the problem. so solution create a similar as
> > > > class and type cast it with that.
> > > > If you already doing that please check property types in both flex and
> > > > java, java should contain as compatible data types, else it will
> > > > throws the TypeCasting error.
>
> > > > Regards,
> > > > Imtiyaz.m.s
>
> > > > On Sep 24, 10:21 am, anubhav_RIA <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi chandan,
>
> > > > > From the error it seems like your call to the wsdl is succeessfull but
> > > > > the problem seems to be somewhere in the type casting the values
> > > > > returned from the wsdl. it says it throws exceptin in the
> > > > > resultHandler function of the AbstractInvoker. try to locate where you
> > > > > are using FlexProductData type object.
>
> > > > > Only then this problem can be nail down.
>
> > > > > Regards,
> > > > > Anubhav
>
> > > > > On Sep 23, 9:10 pm,chan<[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi All,
>
> > > > > > I am using jboss-4.2.2.GA as the application server. I have copied
> > > > > > flex data service i.e. flex folder contianing its jar
> > > > > > file ,configurationf files etc under web-inf folder of my
> > > > > > project.Similary flex related entries are added in web.xml.
>
> > > > > > I am trying to invoke webservice through following code
> > > > > > <?xml version="1.0" encoding="utf-8"?>
> > > > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
> > > > > > backgroundColor="#FFFFFF">
> > > > > > <mx:WebService id="srv"
> > > > > > wsdl="http://localhost:8080/tdemandweb/
> > > > > > services/ProductThresholdService?wsdl" showBusyCursor="true" />
> > > > > > <mx:DataGrid dataProvider="{srv.getData.lastResult}"
> > > > > > width="100%"
> > > > > > height="100%">
> > > > > > <mx:columns>
> > > > > > <mx:DataGridColumn dataField="name"
> > > > > > headerText="Name"/>
> > > > > > <mx:DataGridColumn dataField="price"
> > > > > > headerText="Price"/>
> > > > > > </mx:columns>
> > > > > > </mx:DataGrid>
> > > > > > <mx:Button label="Get Product Data" click="srv.getData()"/>
> > > > > > </mx:Application>
>
> > > > > > After clicking "Get Product Data" button , I am calling getData
> > > > > > method of the webservice. As i have put logger statemetn in the
> > > > > > getData method, I can see that getData method is properly called.
> > > > > > But
> > > > > > after returning from the webservice, it is showing me the following
> > > > > > error on the UI,
>
> > > > > > [RPC Fault faultString="Cannot find type for: FlexProductData"
> > > > > > faultCode="DecodingError" faultDetail="null"]
> > > > > > at mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/
> > > > > > internal::processResult()
> > > > > > at
> > > > > > mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/
> > > > > > internal::resultHandler()
> > > > > > at mx.rpc::Responder/result()
> > > > > > at mx.rpc::AsyncRequest/acknowledge()
> > > > > > at DirectHTTPMessageResponder/completeHandler()
> > > > > > at flash.events::EventDispatcher/dispatchEventFunction()
> > > > > > at flash.events::EventDispatcher/dispatchEvent()
> > > > > > at flash.net::URLLoader/onComplete()
>
> > > > > > If same code i execute through flex builder 3 , it is properly
> > > > > > invoke
> > > > > > the webservice and displays the data. However, if i call that
> > > > > > webservice through flex application which is deployed in jboss, it
> > > > > > is
> > > > > > showing above error.
>
> > > > > > I really new to this technology. I do not understand whether there
> > > > > > is
> > > > > > problem of the version which is used in jboss or what ?
>
> > > > > > Could anybody let me know what would be the problem? how to solve
> > > > > > that
> > > > > > problem?
>
> > > > > > This is urgent requirement and hence early response will be really
> > > > > > appriciated.
>
> > > > > > Thanks,
> > > > > > Chandan- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---