title: Swift and web service with SOAP
body: <p>I'm just starting with swift to program for IOS. I'm already did an app for Android that consume some web services. I need to do the same app, but now for IOS.
  I already could call the web service correctly and print the response, but I need to access to the properties that the web service return. Ahh, I have various web service and some of them return string arrays. This is the code I'm using to call the services</p>
  
  <pre><code>var lobj_Request = NSMutableURLRequest(URL: NSURL(string: URLString)!)
      var session = NSURLSession.sharedSession()
      var err: NSError?
      var user = nameTextField.text
      var pass = passTextField.text
      lobj_Request.HTTPMethod = "POST"
      lobj_Request.HTTPBody = soapMessage.dataUsingEncoding(NSUTF8StringEncoding)
      lobj_Request.addValue(hostString, forHTTPHeaderField: "Host")
      lobj_Request.addValue("application/soap+xml; charset=utf-8", forHTTPHeaderField: "Content-Type")
      lobj_Request.addValue(String(soapMessage.characters.count), forHTTPHeaderField: "Content-Length")
      lobj_Request.addValue(SOAP_ACTION, forHTTPHeaderField: "SOAPAction")
      var task = session.dataTaskWithRequest(lobj_Request, completionHandler: {data, response, error -&gt; Void in
          print("Response: \(response)")
          var strData = NSString(data: data!, encoding: NSUTF8StringEncoding)
          print("Body: \(strData)")
  
          if error != nil
          {
              print("Error: " + error!.description)
          }
  
      })
      task.resume()
  </code></pre>
  
  <p>I know the properties are in data (obviously), but I don't know how to access to them.</p>