title: How to pass 2 parameters in a method in WCF Service using Objective c?
body: <p>My Parameters are</p>
  
  <pre><code>Request1 = &lt;Request&gt; &lt;name&gt;2&lt;/name&gt; &lt;pwd&gt;1&lt;/pwd&gt; &lt;/Request&gt;
  
  Request2 = value1
  </code></pre>
  
  <p>My Code is</p>
  
  <pre><code>-(void)webRequestCommnunication
  {
  //Web Service Call
   NSString *soapMessage = [NSString stringWithFormat:
                           @"&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;&lt;soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"&gt; &lt;soap:Body&gt;&lt;Method1 xmlns=\"http://tempuri.org/\"&gt;&lt;Request1&gt;&lt;Request&gt; &lt;name&gt;2&lt;/name&gt; &lt;pwd&gt;1&lt;/pwd&gt; &lt;/Request&gt;&lt;/Request1&gt;&lt;Request2&gt;value1&lt;/Request2&gt;&lt;/Method1&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;"];
  
  NSURL *url = [NSURL URLWithString:@"http://localIPaddress/servicename1/servicename2/Method1.svc"];
  
  theRequest = [NSMutableURLRequest requestWithURL:url];
  
  
  NSString *msgLength = [NSString stringWithFormat:@"%lu", (unsigned long)[soapMessage length]];
  
  [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
  [theRequest addValue: @"http://tempuri.org/service1/Method1" forHTTPHeaderField:@"Soapaction"];
  [theRequest addValue: msgLength forHTTPHeaderField:@"Content-Length"];
  [theRequest setHTTPMethod:@"POST"];
  [theRequest setHTTPBody: [soapMessage dataUsingEncoding:NSUTF8StringEncoding]];
  theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
  webData = [[NSMutableData alloc]init];
  if(theConnection)
  {
  
      NSLog(@"Connected....");
  }
  else
  {
      NSLog(@"theConnection is NULL");
  }
  }
  </code></pre>
  
  <p>I want to pass Request1, Request2 inside Method1,but it throws exception as The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Method1'. End element 'Request1' from namespace '<a href="http://tempuri.org/" rel="nofollow">http://tempuri.org/</a>' expected. Found element 'Request' from namespace '<a href="http://tempuri.org/" rel="nofollow">http://tempuri.org/</a>'. Line 1, position 276..</p>
  
  <p>Can anyone suggest what i am doing wrong?</p>