[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: DI and annotations not working
irinac
do-not-reply at jboss.com
Thu Sep 11 11:06:09 EDT 2008
The client side code needed to invoke the web service (TestService.as and others) were generated from a wsdl url using tools in Flex Builder 3.
I am invoking the web service from my main application mxml file
|
| /**
| * TestService.as
| * This file was auto-generated from WSDL by the Apache Axis2 generator modified by Adobe
| * Any change made to this file will be overwritten when the code is re-generated.
| */
| package RPortal.atl{
| import mx.rpc.AsyncToken;
| import flash.events.EventDispatcher;
| import mx.rpc.events.ResultEvent;
| import mx.rpc.events.FaultEvent;
| import flash.utils.ByteArray;
| import mx.rpc.soap.types.*;
|
| /**
| * Dispatches when a call to the operation sayHello completes with success
| * and returns some data
| * @eventType SayHelloResultEvent
| */
| [Event(name="SayHello_result", type="RPortal.atl.SayHelloResultEvent")]
|
| /**
| * Dispatches when the operation that has been called fails. The fault event is common for all operations
| * of the WSDL
| * @eventType mx.rpc.events.FaultEvent
| */
| [Event(name="fault", type="mx.rpc.events.FaultEvent")]
|
| public class TestService extends EventDispatcher implements ITestService
| {
| private var _baseService:BaseTestService;
|
| /**
| * Constructor for the facade; sets the destination and create a baseService instance
| * @param The LCDS destination (if any) associated with the imported WSDL
| */
| public function TestService(destination:String=null,rootURL:String=null)
| {
| _baseService = new BaseTestService(destination,rootURL);
| }
|
| //stub functions for the sayHello operation
|
|
| /**
| * @see ITestService#sayHello()
| */
| public function sayHello():AsyncToken
| {
| var _internal_token:AsyncToken = _baseService.sayHello();
| _internal_token.addEventListener("result",_sayHello_populate_results);
| _internal_token.addEventListener("fault",throwFault);
| return _internal_token;
| }
| /**
| * @see ITestService#sayHello_send()
| */
| public function sayHello_send():AsyncToken
| {
| return sayHello();
| }
|
| /**
| * @see ITestService#addsayHello()
| */
| public function addsayHelloEventListener(listener:Function):void
| {
| addEventListener(SayHelloResultEvent.SayHello_RESULT,listener);
| }
|
|
|
|
|
|
|
|
| RPortal.mxml
|
| <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" borderStyle="none">
| <mx:Script>
| <![CDATA[
| import RPortal.atl.*;
|
| [Bindable]
| private var testService:TestService = new TestService();
|
| private function testWebService():void
| {
| // Attach the event handler
| testService.addsayHelloEventListener(handleWebServiceResult);
| // Invoke the service call
| testService.sayHello();
| }
|
| private function handleWebServiceResult(event:SayHelloResultEvent):void
| {
| trace(event.result);
| }
| ]]>
| </mx:Script>
|
|
please let me know if this level of detail is enough or if I need to post anything else.
I feel like I'm making a silly mistake somewhere in deployment but don't know where to look ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175889#4175889
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175889
More information about the jboss-user
mailing list