views:

49

answers:

1

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/'&gt;" + 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

+2  A: 

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/'&gt;%@%@", soapStart, soapAction, body, soapEnd];
Alex Reynolds
@talktobijju : don't forget the @ for String declaration in Objective-C
David
a milliom $ thanx to u Alex....u won't believe....for last 2 hours i was stucking wid this code..(i am a new comer)...ny way thanx once again
talktobijju
sorry Alex ,I just come to know abt acceptance rate...ny way thanx again
talktobijju
plz accept my questions plz coz whenever i ask any question regarding iPhone this msz appear on the screen "Sorry, we are no longer accepting questions from this account. "
talktobijju