0

I'm working with an API generated with SudzC, I have a method which gets a response in XML and I'm trying to deserialize to an NSMutableDictionary.

This is the method to deserialize: enter image description here

And when I get the value of the Soap response I cast it and try to show the keys in the console log:

enter image description here

The problem is that I'm getting this error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM lowercaseString]: unrecognized selector sent to instance 0x7277680'


I have tried to do the same but deserializing to a NSMutableArray and it works, so the problem must be in the deserialize method but I can't find it.

4

2 に答える 2

0

その getParametersHandler からの出力が NSString または NSDictionary であることを確認する必要があります。

チェックするコード

 if ([resp isKindOfClass:[NSDictionary class]]) {

        //here you can do what you want to do..

    }else{

        //here you need to show the alert(No values)

    }

ハンドラーに値がない場合、出力は NSString になります...

幸せなコーディング...

于 2013-10-02T11:10:00.990 に答える