Josh,
I can add the header using the web service's addHeader() method
programmatically and everything seems to work great when i call the back-end
webservice. Even though it is just a couple lines of code, I would like to
overload the send() method on Flex's Webservice class so that it creates the
header (using parameters initialized at the Webservice declaration) and then
adds the header to the Webservice before the send. Basically,
<mx:WebService id="TempConvert"
wsdl="http://localhost/Celsius2Fahrenheit/Celsius2Fahrenheit.asmx?WSDL"
showBusyCursor="true" username={parentApplication.username}
password={parentApplication.password}>
<mx:operation name="FahrenheitToCelsius" result="handleWS()"
fault="Alert.show('there was an error processing request.')">
<mx:request>
<Fahrenheit>{this.TempInput.text}</Fahrenheit>
</mx:request>
</mx:operation>
</mx:WebService>
.....
TempConvert.send() // header is created and added in this call
This is actually sounding pretty crazy right now because I would need to make
a call to a class method that does the header creation. Any ideas if this is
possible?
--Variable
--- In [email protected], Josh McDonald <j...@...> wrote:
>
> There's currently compile-time voodoo that exists to support the MXML
> declaration of web services, so you can't really do this sort of thing
> declaratively.
>
> Programmatically it's pretty easy to add headers to web service calls
> though, what exactly are you trying to do?
>
> -Josh
>
> 2009/4/15 variableop <variabl...@...>
>
> >
> >
> > All,
> > I would like to extend the Flex Webservice class to add a header to the
> > call if custom properties have been set in the webservice declaration (or
> > programmatic instantiation through the constructor). 1) Does anyone have
> > experience extending flex's webservice class? 2) If not, can someone sketch
> > out a path to extending flex's built-in types in such a way? Any help is
> > appreciated.
> >
> > Regards,
> >
> > Variable
> >
> >
> >
>
>
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> Josh 'G-Funk' McDonald
> - j...@...
> - http://twitter.com/sophistifunk
> - http://flex.joshmcdonald.info/
>