pass a string array to web service in iPhone
<p>I have developed an iPhone application where I need to pass a string array to the web service.
Now, I have a <code>NSMutable</code> array, say <code>sendSelectedID</code>.</p>

<p>I know I have values in the array, because when I display in for loop</p>

<pre><code>for(i=0;i&lt;[sendSelectedID count];i++)
{
NSLog(@"%@", [sendSelectedID objectAtindex:i]);
}
</code></pre>

<p>this is the way I pass the <code>NSMutable</code> array to the Soap message:</p>

<pre><code>NSString *soapMessage = [NSString stringWithFormat:
   @"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
   "&lt;S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;\n"
   "&lt;S:Header/\&gt;\n"
   "&lt;S:Body&gt;\n"
   "&lt;ns2:confirmRecallDeposit xmlns:ns2=\"http://services.cbp.syntel.org/\"&gt;\n"
   "&lt;TransactionId&gt;%@&lt;/TransactionId&gt;\n"
   "&lt;/ns2:confirmRecallDeposit&gt;\n"
   "&lt;/S:Body&gt;\n"
   "&lt;/S:Envelope&gt;\n",sendSelectedID ];
</code></pre>

<p>and the soap message is displayed like:</p>

<pre><code>NSString *soapMessage = [NSString stringWithFormat:
  @"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
 "&lt;S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt;\n"
  "&lt;S:Header/\&gt;\n"
  "&lt;S:Body&gt;\n"
  "&lt;ns2:confirmRecallDeposit xmlns:ns2=\"http://services.cbp.syntel.org/\"&gt;\n"
  "&lt;TransactionId&gt;(
        1,
        3
      )&lt;/TransactionId&gt;\n"
  "&lt;/ns2:confirmRecallDeposit&gt;\n"
  "&lt;/S:Body&gt;\n"
  "&lt;/S:Envelope&gt;\n",sendSelectedID ];
</code></pre>

<p>But on the server side, it gives error Number format exception.
How am I to remove this error on the server side? I tried to trim the values recieved, but it did not work.</p>
