I have a similar issue, when I call webservices more than once whit
cairngorm 2.1, that I still haven't solved.


Now you have to manually call webService.loadWSDL(), plus there is
another weird thing happening that didn't happen with version 2.0.

basically it changes the way I'm accessing the results, but not in a
consistent way, for example:

I'm calling the same webservices twice and in order to get the
results I have to change the reference to the return value:

when I call my service for the first time I get:

<soap:Envelope mlns:soap="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd=";
http://www.w3.org/2001/XMLSchema " mlns:xsi="
http://www.w3.org/2001/XMLSchema-instance ">
<soap:Body>
  <CreateTokenResponse xmlns=http://www.xxx.net/schemas/services/sso >
     <CreateTokenResult>*563ee119-802a-47bc-8d37-a5995e576ae6*
</CreateTokenResult>
  </ CreateTokenResponse>
</soap:Body>
</ soap:Envelope>

on the command to access the result I use

public function result( event:Object ) : void
{
  loginModel.tokenSSO = event.result;
  executeNextCommand();
}

then with executeNextCommand() method (I'm using a sequenceCommand) I
call another command that calls the same webservices but this time I assign
the
result to a different variable. this the return value:

<soap:Envelope mlns:soap=" http://schemas.xmlsoap.org/soap/envelope/ "
xmlns:xsd="http://www.w3.org/2001/XMLSchema "
mlns:xsi="http://www.w3.org/2001/XMLSchema-instance ">
<soap:Body>
  <CreateTokenResponse xmlns=http://www.xxx.net/schemas/services/sso >
     <CreateTokenResult>*a6628f61-3f20-4dbe-aa23-e34efa3e3796*
</CreateTokenResult>
  </ CreateTokenResponse>
</soap:Body>
</ soap:Envelope>

This time in order to access the results I need to do this:

public function result( event:Object ) : void
{
  loginModel.tokenApp = event.result.CreateTokenResult;
}

this happens for other services too, where with cairngorm 2.0 I was
able to access the results with "event.result" now I need to specify
the name of the soap tag that contains the result. The real problem
here is that this does not apply to all the services but just some.
And the weirdest case is the sample that I have explained above where
the strategy to access the result of the same service changes
depending on when you call it (first time event.result, second time
event.result.CreateTokenResult), and I don't see any difference in
the soap returned from the service.

I decided to have ServiceLocator extending the UIComponent and
compiling the new Carngorm.swf (2.1) and everything start working as
before.

Someone suggest that this could be the result of calling loadWSDL(); more
than once so I used this:

if( !isWSDLLoaded ) {
    isWSDLLoaded = true;
    WebService( service ).loadWSDL();
   }

but nothing changed

Reply via email to