Hello,
I am trying to extend HTTPService to add some processing of the result
before returning it however I have some problem when I try to compile.
My component is very simple right now:
package bnp.rpc.http.mxml
{
import mx.rpc.http.mxml.HTTPService;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
public class ExtendedHTTPService extends HTTPService
{
public function ExtendedHTTPService(url:String):void
{
this.addEventListener(ResultEvent.RESULT,
this.onInternalResult,
true, 0, true) ;
}
private function onInternalResult(event:ResultEvent):void
{
mx.controls.Alert.show('Hello world!') ;
}
}
}
And the declaration of the HTTPServices in the application looks like:
<mx:HTTPService
id="testservice1"
url="./test.pl"
resultFormat="text"
method="POST"
result="onExternalResult(event) ;"
>
<mx:request xmlns="">
<p1>toto</p1>
</mx:request>
</mx:HTTPService>
<mxml:ExtendedHTTPService
id='testservice2'
url="./test.pl"
resultFormat="text"
method="POST"
result="onExternalResult(event) ;"
>
<mxml:request xmlns="">
<p1>toto</p1>
</mxml:request>
</mxml:ExtendedHTTPService>
The problem is that I can't compile because I get the following error:
Could not resolve <p1> to a component implementation.
for the ExtendedHTTPService declaration. I cannot understand why. I
did not even tried to overload the request property ?!?!
Does anyone have an idea ?
Thanks in advance !!