title: Soap web servive access in iphone iOS
body: <p>I need help for access web service in iOS (for below web service code). i try to implement soap web service to access web service but it returns false result. I give username and password directly and try to access, but its required base64 encrypted  string for access this service (for example user name will be give in type of encrypted like  NSString *Username=@"username:password"; ). This Username can convert to base64 encryption and then to access the web service.
          I don't know how set header for AuthHeader and credentials tags for accessing below web service. so any one help me how to immplement bellow web service on iPhone.</p>
  
  <pre><code>SOAP 1.1
  The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
  POST /Test_Express/Service.asmx HTTP/1.1
  Host: external.test.com
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://tempuri.org/LoginValidation"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Header&gt;
      &lt;AuthHeader xmlns="http://tempuri.org/"&gt;
        &lt;credentials&gt;string&lt;/credentials&gt;
      &lt;/AuthHeader&gt;
    &lt;/soap:Header&gt;
    &lt;soap:Body&gt;
      &lt;LoginValidation xmlns="http://tempuri.org/"&gt;
        &lt;username&gt;string&lt;/username&gt;
        &lt;password&gt;string&lt;/password&gt;
      &lt;/LoginValidation&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  HTTP/1.1 200 OK
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Body&gt;
      &lt;LoginValidationResponse xmlns="http://tempuri.org/"&gt;
        &lt;LoginValidationResult&gt;string&lt;/LoginValidationResult&gt;
      &lt;/LoginValidationResponse&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  SOAP 1.2
  The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
  POST /Test_Express/Service.asmx HTTP/1.1
  Host: external.test.com
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap12:Header&gt;
      &lt;AuthHeader xmlns="http://tempuri.org/"&gt;
        &lt;credentials&gt;string&lt;/credentials&gt;
      &lt;/AuthHeader&gt;
    &lt;/soap12:Header&gt;
    &lt;soap12:Body&gt;
      &lt;LoginValidation xmlns="http://tempuri.org/"&gt;
        &lt;username&gt;string&lt;/username&gt;
        &lt;password&gt;string&lt;/password&gt;
      &lt;/LoginValidation&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  HTTP/1.1 200 OK
  Content-Type: application/soap+xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;soap12:Body&gt;
      &lt;LoginValidationResponse xmlns="http://tempuri.org/"&gt;
        &lt;LoginValidationResult&gt;string&lt;/LoginValidationResult&gt;
      &lt;/LoginValidationResponse&gt;
    &lt;/soap12:Body&gt;
  &lt;/soap12:Envelope&gt;
  HTTP GET
  The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
  GET /Test_Express/Service.asmx/LoginValidation?username=string&amp;password=string HTTP/1.1
  Host: external.test.com
  HTTP/1.1 200 OK
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://tempuri.org/"&gt;string&lt;/string&gt;
  HTTP POST
  The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
  POST /Test_Express/Service.asmx/LoginValidation HTTP/1.1
  Host: external.test.com
  Content-Type: application/x-www-form-urlencoded
  Content-Length: length
  
  username=string&amp;password=string
  HTTP/1.1 200 OK
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://tempuri.org/"&gt;string&lt;/string&gt;
  </code></pre>