This content has been marked as final. Show 5 replies
there are a lot of issues using .net webservices and flex , how are you calling the ws?
And how are you managing the returned data?
These are 2 important questions, so please show some code and i'll try to help you.
A hint, the best way to link ws with flex is to get objects from one place to the other and vice versa.
Here is the webservice call. I am getting the error # 1009 it seems on the dateTime fields. The response is an object I am binding it to a datagrid as so ArrayUtil.toArray(byFilter2.ListingsFiltered.lastResult.Listings). Please let me know what other code you would like to view.
<mx:operation name="ListingsFiltered" fault="faulting(event)">
i see you are sending your datetime field as text wich means you will have to cast it to date before sending it, or on the .net side cast it to date upon receveing it .
Another thing , the best thing i've discovered to work with .net webservices and flex is to tkae some data and turn it into an array of classes , create the same class on flex side and when data comes fill my class with data, creating an arraycollection that is an array of classes, that way the type of data i'm sending from one place to other is casted correctly.
How do I go about casting from string to date? I created a var but I can not access it from within the webservice <tag>.
i think you are sending data to your webservice that has been entered within a form , right?
if this is the case , you can use databinding expressions and make like this:
instead of having that big request tag you have, you can pass parameters to your webservice for example when a user clicks a button and go like this:
on the click event of button you put:
yourwebservice.send(naples,false, yourdatetime, etc.) and on your webservice side on .net you use the request.querystring , to see if the parameters are coming)
using vars you must make them bindable and then use it like this :