WebService Problem

View: New views
1 Messages — Rating Filter:   Alert me  

WebService Problem

by rafael-18 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi, i´m building a game that needs comunication with a webservice.

i´m using de MVC+FrontController pattern that pixLib provides, following this tutorial http://dev.webbymx.net/2007/04/30/pixlib-tut-03-how-to-load-assets-at-runtime/

i´ve created a class WS that manage de webservice connection (through the mx.services.WebService class) and its methods (through mx.services.PendingCall),
that WS class is instantiated in the Model, and the connection to the webservice is made once the assets have been loaded.

the connection to the webservice is succesful, but when i´m trying to call a method of that ws i receive the following error: "Unable to connect to endpoint: http://..."

i have checked the webservice connection and method call outside pixLib framework and there is no problem.

do you have an idea of what can be wrong, or can give me other solution to make the connection to the ws?

i copy here a piece of code of my WS class,
i got the error when calling any method, for example initGame.

class com.numen.services.WS
{
   
    private var service                    :WebService;
   
    private var CONFIG                    :Object;
   
    /**
    * CONSTRUCTOR
    */
    function WS()
    {
        this.CONFIG        =    Config.getInstance();
       
    //=====================================================================================//
        Logger.LOG( "WS :: constructor "+ this.CONFIG.server.wsdl);
    //=====================================================================================//
   
        this.service = new WebService(this.CONFIG.server.wsdl, null, null, this.CONFIG.server.endpoint);
        this.service.onLoad = Delegate.create(this, onWsLoaded);
        this.service.onFault = Delegate.create(this, onWsError);
    }
   
    public function initGame(  ):Void
    {
    //=====================================================================================//   
        Logger.LOG( "WS :: initGame ", LogLevel.DEBUG);
    //=====================================================================================//   
        var pc:PendingCall = this.service.initGame( "<initGame />" );
        pc.onResult = Delegate.create(this, onInitGameResult);
        pc.onFault     = Delegate.create(this, onHandleError);
    }

...

}

thank´s in advance,
rafael

_______________________________________________
Pixlib mailing list
Pixlib@...
http://osflash.org/mailman/listinfo/pixlib_osflash.org