Avg. Rating 3.0

Problem

When sending a complex argument via mx.rpc.soap.Operation with Flash Player 10 as the target player, you get an error from server, because of double encoding of special characters. I.e. & = &

Solution

The solution is not very pretty but it works for me. The solution is to set a "dumb" xmlSpecialCharsFilter and to encode params manually. Note: As far as I know in 3.4.0 SDK this issue will be fixed.

Detailed explanation

To set a "dumb" xmlSpecialCharsFilter you just need to write this code before calling Operation.send( ..args );

 

// Operation is your operation getted from the webservice // i.e.    var operation    : Operation = service.getOperation( "myOperation") as Operation; operation.xmlSpecialCharsFilter = function( value:Object ):String { return value.toString() };

Report abuse

Related recipes