We've faced weird issue today, working with Flex :

We have a webservice call defined in .mxml -

/<mx:WebService id="recrutidooCVService" wsdl="http://localhost:8080/recrutidoo/services/CVService?wsdl"; useProxy="false" showBusyCursor="true">
 <mx:operation name="getCVById" result="handle_getCVByID(event)">
  <mx:request>
   <id>1</id>
  </mx:request>
 </mx:operation>
</mx:WebService>/

We want to add custom headers to the soap message, so we use, let's say ;

/recrutidooCVService.addSimpleHeader("AuthenticationToken", "http://services.recrutidoo.microplan.pl";, "token","1100_a_generated_token_0011");/

and then we launch the operation call, but here's what we are really sending (or at least, what our endpoint receives) :

/<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <SOAP-ENV:Header>
<ns1:AuthenticationToken xmlns:ns1="http://services.recrutidoo.microplan.pl";>
          <ns1:token>//1100_a_generated_token_0011//</ns1:token>
         </ns1:AuthenticationToken>
<ns0:AuthenticationToken xmlns:ns0="http://services.recrutidoo.microplan.pl";>
          <ns0:token>//1100_a_generated_token_0011//</ns0:token>
         </ns0:AuthenticationToken>
        </SOAP-ENV:Header>
        <SOAP-ENV:Body>
         <getCVById xmlns="http://services.recrutidoo.microplan.pl";>
<ns0:id xmlns:ns0="http://services.recrutidoo.microplan.pl";>1</ns0:id>
         </getCVById>
        </SOAP-ENV:Body>
</SOAP-ENV:Envelope>/

Notice that we have the AuthenticationToken field passed twice in the header, once in ns1 namespace, second ns0 namespace. I believe it shouldn't be that way. Bug in Flex, or we missed something?

--
| Sebastian Zarzycki
| [EMAIL PROTECTED]

Reply via email to