0

I am using thid code in android,I need the same code in iPhone..with appropriate syntex

NSString *soap = soapStart + "<" + soapAction + " xmlns:m='http://www.aras-corp.com/'>" + body + "</"+ soapAction + ">" + soapEnd;

error appers on screen "invalid operands in binary +(have struct 'Struct NSString*' ans 'char *' I am first time trying to use soap in my application alternate code woukd b appreciated

Thankx in advance

Brad Larson
  • 169,393
  • 45
  • 393
  • 567
Talktobijju
  • 460
  • 1
  • 5
  • 13
  • possible duplicate of [How to Concatenate String in Objective-C (iPhone) ?](http://stackoverflow.com/questions/1158860/how-to-concatenate-string-in-objective-c-iphone) – Brad Larson Jul 29 '10 at 17:17

1 Answers1

2

You can't concatenate a larger NSString from smaller strings using the "+" operator, like you do in Java.

Instead, you create a new NSString from other NSString strings, using a method called +stringWithFormat::

NSString *soap = [NSString stringWithFormat:@"%@ <%@ xmlns:m='http://www.aras-corp.com/'>%@%@", soapStart, soapAction, body, soapEnd];
Alex Reynolds
  • 94,180
  • 52
  • 233
  • 338