Wednesday, October 25, 2006

Problem invoking any webservice operation if the API contains a method called 'logout'

Figured out a weird issue with Flex 2.0 / Flash Player 9 . Your comments welcome.


Issue:
When you are calling any webservice where the API contains a method/function/operation named 'logout' your call wont be processed.
and you get the exception mentioned in trace .

Just to confirm the issue I tried writing webservice in Intersystems Cache and .NET 1.0 .
The issue lies with webmethod name 'logout' , if its renamed to something else the life is good.

Trace :
TypeError: Error #1034: Type Coercion failed: cannot convert MC{mx.rpc.soap.mxml::WebService@1393c41 mx.rpc::AbstractService/logout()}@132a7b9 to mx.rpc.soap.Operation.

1 comment:

Unknown said...

Yes, logout is a reserved method that we have on the AbstractService class. If your WebService has a logout method you’ll need to call service.getOperation(“logout”).send(arg1, arg2, …).



Matt

Matt Chotin [mchotin AT adobe.com]

Comment reposted here for reference. - VG