sudzc soap client deserialization error

604 Views Asked by At

I'm using sudzc soap client in an iOS app.

Here is soap method declaration

(SoapRequest*) UploadData: (myid <SoapDelegate>) handler myid: (NSString*) myid props: (NSString*) props

For example, if i pass string "<test>" in the second parameter, i get following error:

a:DeserializationFailed The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'UploadData'. End element 'props' from namespace 'http://tempuri.org/' expected. Found element 'test' from namespace 'http://tempuri.org/'. Line 1, position 338.

Why can't sudzc handle "<" or ">" characters in string parameter? Do i have to manually escape these characters?

1

There are 1 best solutions below

4
kovpas On

I don't think this error is related to iOS or sudzc generator. SOAP uses XML for data transfer, so you have to encode any special characters according to XML spec. See the following answer.