I've been trying to make xml request using Alamofire
. However, I got <soap:Text xml:lang="en">Server was unable to process request. ---> Root element is missing.</soap:Text>
error. Actually, this is my first experience about xml request in ios. How can I achieve to make this request without issue. Here is my code;
Alamofire.request(.POST, "http://example.com/WS.asmx?op=AuthenticateUser", parameters: nil, encoding: .PropertyList(.XMLFormat_v1_0, 0), headers: ["Username": "username", "Password": "password" , "AuthenticatedToken" : "123123"]) .responsePropertyList { response in let xml = SWXMLHash.parse(response.data!) print(xml) }
What am I doing wrong ? Could you help me please ?
Thank you for your answers
Best regards
No comments:
Post a Comment