Alright, I've figured it out. I was trying the property value to
represent the text content of the element, but flex looks for the name
of the element as the text content. Not exactly intuitive, but
reasonable. Some other issues have arisen however. I have a response
that looks like this:
<profiles>
<profile name="Carrots" />
</profiles>
And the profile Element is unbounded, and there can be none at all. I've
noticed that if there are several, like 2-7 (I have not tried more) then
the response objects that flex decodes look fine. But if there is one,
then I get an array for the only element is null, where is the Object?
Any ideas?
Paul
Paul deCoursey wrote:
> Paul deCoursey wrote:
>
>> Ok I have this WSDL:
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wsdl:definitions targetNamespace="http://examples.decoursey.com"
>> xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"
>> xmlns:tns="http://examples.decoursey.com"
>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>> xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
>> <wsdl:types>
>> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:tns="http://examples.decoursey.com"
>> elementFormDefault="qualified"
>> targetNamespace="http://examples.decoursey.com">
>> <xsd:complexType name="metadata">
>> <xsd:simpleContent>
>> <xsd:extension base="xsd:string">
>> <xsd:attribute name="name" type="xsd:string"/>
>> </xsd:extension>
>> </xsd:simpleContent>
>>
>> </xsd:complexType>
>> <xsd:element name="metas">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element maxOccurs="unbounded" minOccurs="0"
>> name="metadata" type="tns:metadata"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> <xsd:element name="storeMetadata">
>>
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element maxOccurs="1" minOccurs="1" ref="tns:metas"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> <xsd:element name="storeMetadataResponse">
>> <xsd:complexType>
>> <xsd:sequence>
>>
>> <xsd:element maxOccurs="1" minOccurs="1" name="out"
>> nillable="true" type="xsd:string"/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>> </xsd:schema> </wsdl:types>
>> <wsdl:message name="storeMetadataRequest">
>> <wsdl:part name="parameters" element="tns:storeMetadata"/>
>> </wsdl:message>
>> <wsdl:message name="storeMetadataResponse">
>>
>> <wsdl:part name="parameters" element="tns:storeMetadataResponse"/>
>> </wsdl:message>
>> <wsdl:portType name="SimpleSoapExamplePortType">
>> <wsdl:operation name="storeMetadata">
>> <wsdl:input name="storeMetadataRequest"
>> message="tns:storeMetadataRequest"/>
>> <wsdl:output name="storeMetadataResponse"
>> message="tns:storeMetadataResponse"/>
>> </wsdl:operation>
>> </wsdl:portType>
>> <wsdl:binding name="SimpleSoapExampleHttpBinding"
>> type="tns:SimpleSoapExamplePortType">
>>
>> <wsdlsoap:binding style="document"
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>> <wsdl:operation name="storeMetadata">
>> <wsdlsoap:operation soapAction=""/>
>> <wsdl:input name="storeMetadataRequest">
>> <wsdlsoap:body use="literal"/>
>> </wsdl:input>
>> <wsdl:output name="storeMetadataResponse">
>> <wsdlsoap:body use="literal"/>
>> </wsdl:output>
>>
>> </wsdl:operation>
>> </wsdl:binding>
>> <wsdl:service name="SimpleSoapExample">
>> <wsdl:port name="SimpleSoapExampleHttpPort"
>> binding="tns:SimpleSoapExampleHttpBinding">
>> <wsdlsoap:address
>> location="http://localhost:8084/Webular/metadata/SimpleSoapExample"/>
>> </wsdl:port>
>> </wsdl:service>
>>
>>
>> </wsdl:definitions>
>>
>>
>>
>> When I try to create the metas object with the metadata objects this is
>> the response Flex is generating:
>>
>>
> Sorry I meant request here, the response is an error, because the SOAP
> service is expecting something altogether different.
>
>
>> <SOAP-ENV:Envelope
>> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> <SOAP-ENV:Body>
>> <tns:storeMetadata xmlns:tns="http://examples.decoursey.com">
>> <tns:metas>
>> <tns:metadata name="test 1">
>> <tns:metadata xsi:nil="true"/>
>> </tns:metadata>
>> <tns:metadata name="test 2">
>> <tns:metadata xsi:nil="true"/>
>> </tns:metadata>
>> <tns:metadata name="test 3">
>> <tns:metadata xsi:nil="true"/>
>> </tns:metadata>
>> <tns:metadata name="test 4">
>> <tns:metadata xsi:nil="true"/>
>> </tns:metadata>
>> </tns:metas>
>> </tns:storeMetadata>
>> </SOAP-ENV:Body>
>> </SOAP-ENV:Envelope>
>>
>> All of the "<tns:metadata xsi:nil="true"/>" should just a a simple
>> string, not and element and certainly not a nil element. Anybody have
>> any ideas?
>>
>> Paul
>>
>>
>>
>>
>>
>
>
>