5 Replies Latest reply on Sep 20, 2007 2:22 PM by batmitra

    Error # 1009 Accessing .NET web Service

      I am trying to access a .NET Web service and I keep getting Error # 1009 Null. I tried everything and I can not figure this one out. It seems to happen on a DateTime field which I am passing back '0001-01-01T00:00:00'. Has anyone ran into this issue?
        • 1. Re: Error # 1009 Accessing .NET web Service
          batmitra Level 1
          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.
          • 2. Error # 1009 Accessing .NET web Service
            mrcabrera Level 1
            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:WebService id="byFilter2"
            wsdl=" http://localhost/FilterService.asmx?WSDL"
            concurrency="multiple" >
            <mx:operation name="ListingsFiltered" fault="faulting(event)">
            • 3. Re: Error # 1009 Accessing .NET web Service
              batmitra Level 1
              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.

              • 4. Re: Error # 1009 Accessing .NET web Service
                mrcabrera Level 1
                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>.
                • 5. Re: Error # 1009 Accessing .NET web Service
                  batmitra Level 1
                  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 :