0 Replies Latest reply on Jun 22, 2010 11:00 AM by iamcootis

    Objects returned from wsdl webservice being returned as null if one element is missing

    iamcootis Level 1

      I have a web service that I have created using the web service wizard. The data being passed comes from a database.

       

      For example and simplicity sake, the wsdl method is called getDogs() and it should return a list of Dog objects that looks like this:

       

      <Dog>

           <Name>Rex</Name>

           <Breed>Bulldog</Breed>

           <Age>5</Age>

           <Weight>50 lbs.</Weight>

      </Dog>

       

      My problem arises when one of these items is missing, so it is not passed through the wsdl. For example, if the breed is left blank, my returned data will look like this:

       

      <Dog>

           <Name>Rex</Name>

            <Age>5</Age>

           <Weight>50 lbs.</Weight>

      </Dog>

       

      When I make the call and am returned the dog object, only the name variable is instantiated. Everything after the name is null.

       

      Has anyone else ever had this same problem? I am not making any changes in the FlashBuilder wsdl wizard generated files. I am also using Flex 4.0

       

      Thanks for your help.