8 Replies Latest reply on Nov 14, 2008 9:05 AM by BenjaminBarker

    Webservice returning null values

    FlexOnNet
      Webservice returning null values when consuming .net webservice and return datatype is string[].

      <mx:WebService id="Content" wsdl=" http://www.paxsonmarketing.com/Content.asmx?WSDL">
      <mx:operation name="Countries" resultFormat="{ObjectProxy}" result="getCountries_result(event);" fault="getCountries_fault(event);" >
      <mx:request>
      <AffiliateID>{AffiliateID}</AffiliateID>
      <Password>{AffiliatePassword}</Password>
      <AvailableOnly>true</AvailableOnly>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      Above is what my webservice looks like. Basically I tried to use the Flex 3 Built in 'Data' > 'Import Web services functionality' however this also returned a null values for type.. 'arrayOfString'. I have tested the webservice and it def returns an 'arrayOfString'. I tried the above code as well and it does the same.

      I tried other methods to the same webservice and they work if I am not returning type of 'arrayOfString'.

      Any Ideas?
        • 1. Re: Webservice returning null values
          Dane_of_Dalrymple
          I am having a similar issue. I will connect to a .NET webservice (basicHTTP binding) and get results, but some of my nested results (i.e. objects, arrays of related objects) are coming back empty/null.

          My classes are generated by the Import WSDL functionality found in the Eclipse plugin for Flex.

          Are there classes, types etc that Flex can't interpret or populate?

          Thanks,
          • 2. Re: Webservice returning null values
            Dane_of_Dalrymple Level 1
            I am getting the same issue with arrayOfString.
            • 3. Re: Webservice returning null values
              biges
              my class can transfer parameters which datatype is String. and when my flex class can receive parameters Correctly,I transfer String to XMLList and bonding to DataGird.
              • 4. Re: Webservice returning null values
                Dane_of_Dalrymple Level 1
                Where I am seeing issue with within a deep class. My WSDL is for a .NET WCF webservice, with multiple WSDL reference files. I wonder if that has anything to do with it?

                Here is an excert of my WSDL describing the two complex classes that are not being serialized:

                Both EntityTypes and PropertyType under Entity are coming back as NULL:
                (these are the two that I am referring to)
                ..
                <xs:element minOccurs="0" name="EntityTypes" nillable="true" type="tns:ArrayOfEntityType" />
                ...
                <xs:element name="ArrayOfEntityType" nillable="true" type="tns:ArrayOfEntityType" />
                ..

                - <xs:complexType name="Entity">
                - <xs:sequence>
                <xs:element minOccurs="0" name="Comment" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="DisplayName" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="Domain" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="EntityTypes" nillable="true" type="tns:ArrayOfEntityType" />
                <xs:element minOccurs="0" name="Identifier" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="Properties" nillable="true" type="tns:ArrayOfProperty" />
                </xs:sequence>
                </xs:complexType>
                <xs:element name="Entity" nillable="true" type="tns:Entity" />
                - <xs:complexType name="ArrayOfEntityType">
                - <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" name="EntityType" nillable="true" type="tns:EntityType" />
                </xs:sequence>
                </xs:complexType>
                <xs:element name="ArrayOfEntityType" nillable="true" type="tns:ArrayOfEntityType" />
                - <xs:complexType name="EntityType">
                - <xs:sequence>
                <xs:element minOccurs="0" name="DisplayName" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="Identifier" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="IsDirect" type="xs:boolean" />
                </xs:sequence>
                </xs:complexType>
                <xs:element name="EntityType" nillable="true" type="tns:EntityType" />
                - <xs:complexType name="ArrayOfProperty">
                - <xs:sequence>
                <xs:element minOccurs="0" maxOccurs="unbounded" name="Property" nillable="true" type="tns:Property" />
                </xs:sequence>
                </xs:complexType>
                <xs:element name="ArrayOfProperty" nillable="true" type="tns:ArrayOfProperty" />
                - <xs:complexType name="Property">
                - <xs:sequence>
                <xs:element minOccurs="0" name="PropertyType" nillable="true" type="tns:PropertyType" />
                <xs:element minOccurs="0" name="PropertyValues" nillable="true" type="tns:ArrayOfPropertyValue" />
                </xs:sequence>
                </xs:complexType>
                <xs:element name="Property" nillable="true" type="tns:Property" />
                - <xs:complexType name="PropertyType">
                - <xs:sequence>
                <xs:element minOccurs="0" name="DisplayName" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="Identifier" nillable="true" type="xs:string" />
                <xs:element minOccurs="0" name="IsMultiValued" type="xs:boolean" />
                <xs:element minOccurs="0" name="ValueType" nillable="true" type="xs:string" />
                </xs:sequence>
                </xs:complexType>
                <xs:element name="PropertyType" nillable="true" type="tns:PropertyType" />
                - <xs:complexType name="ArrayOfPropertyValue">
                - <xs:sequence>
                ... (had to cut is short to fit into post!)
                • 5. Re: Webservice returning null values
                  pulmego Level 1
                  Very nice post that provides us with great insight !!!
                  • 6. Re: Webservice returning null values
                    Dane_of_Dalrymple Level 1
                    Does anyone have a solution to this issue?
                    • 7. Re: Webservice returning null values
                      Karzons Level 1
                      Great post, very interesting to read.
                      • 8. Re: Webservice returning null values
                        BenjaminBarker
                        I'm having the same issue with complex WSDL and FlexBuilder3 Web Services import wizard.

                        I think this is related to this issue on the Adobe bug tracking : http://bugs.adobe.com/jira/browse/FB-12201.

                        I can see the data in the response from the server, but Flex chokes on decoding the SOAP response. Using the suggestion in the link above I tried overriding the soad decoder class , but now I get null value for my event results.

                        Looks like there is a fix from Adobe, but it will only come out as part of Flex 4? :(