Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send a JSON type string as a parameter? #198

Open
GoogleCodeExporter opened this issue Jul 21, 2015 · 4 comments
Open

How to send a JSON type string as a parameter? #198

GoogleCodeExporter opened this issue Jul 21, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Call a webservice with json type string as a parameter.
2. Some characters(like {,[,",: ) were encoded to URL type characters like %7B, 
%5B when the parameter string is added to XML node.
3. Server returns error because parameter type is incorrect.

My question is,

1) Is there a way to send a JSON type string parameter when using wsdl2objc?
2) Is there a way to use XML CDATA section when using wsdl2objc? (to use json 
type string in xml)

thanks.


Original issue reported on code.google.com by [email protected] on 21 Feb 2013 at 11:35

@GoogleCodeExporter
Copy link
Author

for example,
original JSON string is

{"name":"jone","mobile":"010-777-7777" 

like this,

but encoded string is

{"name":"후승","mobile":"010-7777-7777&



Any solution?


Original comment by [email protected] on 21 Feb 2013 at 2:35

@GoogleCodeExporter
Copy link
Author

i have the same issue
..

Original comment by [email protected] on 23 May 2013 at 8:36

@GoogleCodeExporter
Copy link
Author

you can replace the &quot to "
- (NSString *)serializedFormUsingHeaderElements:(NSDictionary *)headerElements 
bodyElements:(NSDictionary *)bodyElements

  return [serializedForm stringByReplacingOccurrencesOfString:@""" withString:@"\""];

}

Original comment by [email protected] on 23 May 2013 at 9:29

@GoogleCodeExporter
Copy link
Author

can u give clear code how to replace it
and were does the "serializedForm" comes from ?

Original comment by [email protected] on 26 Aug 2014 at 6:11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant