We have a class that uses mx.rpc.soap.WebService to call a web service via 
WSDL.  Nothing fancy, the class is really just a wrapper with about 10 lines of 
code.  The code has been in production as a SWF for about a year without drama. 
 When we use the same class under AIR, we are seeing duplicate entity encoding. 
 For example, we sent "11<11" as the password:

Flex app generated:

<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>
    <hhl-User:authenticateRequest 
xmlns:hhl-User="http://www.harte-hanks.com/hhl-User/";>
      <Login>
        <username>yevgen</username>
        <password>11&amp;lt;11</password>
      </Login>
    </hhl-User:authenticateRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

SWF version generates:

<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>
    <hhl-User:authenticateRequest 
xmlns:hhl-User="http://www.harte-hanks.com/hhl-User/";>
      <Login>
        <username>yevgen</username>
        <password>11&lt;11</password>
      </Login>
    </hhl-User:authenticateRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The XSD defines Login as:

        <xsd:complexType name="LoginType">
                <xsd:sequence minOccurs="1" maxOccurs="1">
                        <xsd:element name="username" maxOccurs="1">
                                <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                                <xsd:maxLength value="10" />
                                        </xsd:restriction>
                                </xsd:simpleType>
                        </xsd:element>
                        <xsd:element name="password" maxOccurs="1">
                                <xsd:simpleType>
                                        <xsd:restriction base="xsd:string">
                                                <xsd:maxLength value="15" />
                                        </xsd:restriction>
                                </xsd:simpleType>
                        </xsd:element>
                </xsd:sequence>
        </xsd:complexType>


Has anyone else seen anything similar or had encoding work properly?


Thanks in advance,
-Jeff

Reply via email to