0 Replies Latest reply on Nov 11, 2010 8:44 AM by praetor1985

    Adding SOAP headers to a web service call

    praetor1985

      I am trying to use a web service in my Flex app. Until recently I was using Flex Builder 3 which created classes for my headers and created methods on the service object for each method that used them. Now I am using Flash Builder 4 it doesn't appear to have generated classes for the headers or methods to add them.

       

      The only way I can find to do it is like this:

                          var q:QName = new QName("http://www.namespace.com/","UserInfoHeader");
                          
                          var obj:Object = new Object();
                          obj["Name1"] = "Value1";
                          obj["Name2"] = value2;
                          
                          var header:SOAPHeader = new SOAPHeader(q,obj);
                          
                          
                          ServiceInstance.operations["OppName"].addHeader(header);
      

       

      Is this right? It seems be a very poor implementation and a huge step back on adobe's part if this is the case. I use headers on pretty much all of methods, some with several and this is going to increase my workload a lot if I have to change to this implementation.