0 Replies Latest reply on Jun 24, 2011 7:23 AM by Serih

    WebService with wizard & adding a SOAPheader to the message:Help


      I have used data services for connecting to a web service, which auto-populated the service and value objects.

      Needing to use a SOAP header within the SOAP message to authenticate - I don't know how to do this.

      Using Flash Builder 4.5, and the wizard populating the code - it appears to append the SOAP message to the operations of the web service

      in :AsyncToken


      Where to I tell the SOAP message to include the SOAP header?

      The examples I found on the forums state to define as follows - however when I do this in the main application mxml code -

      it doesn't find the addHeader() method, since the web service in not defined in the main application mxml.

      So HOW & WHERE I add a defined SOAP header?


      import valueobject.LoginRequest;

      private var header1.SOAPHeader;

      private var header2:SOAPHeader


      public function headers(): void


      //Create QName & SOAP header Objects:

      var qname:QName=new QName(http://blah blah, header1);

      header1=new SOAPHeader(qname, {string:servicereturnedsessionID});

      //header2=new SOAPHeader(qname, {string:servicereturnedsessionID});


      //Add header1 (SOAP Header) to all the web service request method definition should include the mx.rpx.SOAPHeader and/or mx.rpc.WebService


      //Where in the auto-populated code for the service connection should this code, doesn't find the addHeader(header1) as the service is defined in a superclass

      //and it doesn't work in the preInitialization() of the subclass


      //Add header2 (SOAP header) to the web service operation





      Any suggestions/ideas/thoughts?  Been working on for 3 days! and now have tunnel vision ;(


      Thank you,