Well, in an extremely questionable decision, Adobe put a completely new Web
Services implementation in hotfix 2 -- and then decided not to mention it
anywhere in the release notes. Granted, the implementation is supposed to be
more standards compliant, but one could make a strong argument that a hotifx
with several other important fixes (including memory leaks) was not the time
to be introducing a core change like this.

Matt, Pete, Randy, or whoever else at Adobe can get this done, you guys
*really* need to update the Release Notes at
http://www.adobe.com/go/kb401825 to make people aware of this change. I know
you guys did your best to be backwards-compatible, but it's clear that there
are some holes and it's tripping people up.

Regards,
Dave.
Cynergy Systems, Inc.


On 6/7/07, paulwelling <[EMAIL PROTECTED]> wrote:

  Hello List,

Under 2.0, 2.0.1, and 2.0.1 HF1 my simple header was being Encoded
correctly:

ws.addSimpleHeader("UsernameToken", "", "username", username);
ws.addSimpleHeader("UsernameToken", "", "password", password);

creates...

<SOAP-ENV:Header>
<UsernameToken>
<username>
paul
</username>
</UsernameToken>
<UsernameToken>
<password>
123450
</password>
</UsernameToken>
</SOAP-ENV:Header>

There was no reference in the WSDL to UsernameToken, and all was good
and happy and Flex encoded the WS requests...

---

I needed to move to HF2 to use/test a fix to ArrayCollections.

Now running the same code & WSDL on HF2 I get:
[FaultEvent fault=[RPC Fault faultString="Cannot resolve element
definition for name 'UsernameToken'" faultCode="EncodingError"
faultDetail="null"]

---

Someone off list was nice enough to suggest that I add the following
complexType to my WSDL, to aid Flex in the encoding:

<wsdl:definitions targetNamespace="http://service.abcd.com";>
<wsdl:types>
<xsd:schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://model.abcd.com";>

<xsd:complexType name="UsernameToken">
<xsd:sequence>
<xsd:element name="username" maxOccurs="1"
minOccurs="0" type="xsd:string"/>
<xsd:element name="password" maxOccurs="1"
minOccurs="0" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

...

And adding the enclosing namespace to the method call:

ws.addSimpleHeader("UsernameToken", "http://model.abcd.com";,
"username", username);
ws.addSimpleHeader("UsernameToken", "http://model.abcd.com";,
"password", password);

The only difference that has made was to change the fault message:
[FaultEvent fault=[RPC Fault faultString="Cannot resolve element
definition for name 'http://model.abcd.com::UsernameToken'"
faultCode="EncodingError" faultDetail="null"]

---

I am really stuck. I need the fix to HF2 for ArrayCollections, but
can't run it because it breaks the WS requests, because they can't get
Encoded and out on the wire.

Does anyone know how to get Flex to encode this correctly on HF2...?
Has anyone else run into WS encoding issues on HF2..?

Many thanks,
Paul

Reply via email to