我在 iPad 应用程序中实施 Oracle UCM 是否有任何用于登录身份验证的 Web 服务。现在我正在使用 j_security_check?.. 我无法处理 j_security_check 响应。
NSURL *url = [NSURL URLWithString:@"http://serveripaddress/cs/idcplg/j_security_check?"];
//initialize a request from url
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[url standardizedURL]];
//set http method
[request setHTTPMethod:@"POST"];
//initialize a post data
NSString *postData =[NSString stringWithFormat:@"j_username=%@&j_password=%@",usernameTF.text,passwordTF.text];
NSLog(@"userDetails : %@" ,postData);
//set request content type we MUST set this value.
[request setValue:@"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
//set post data of request
[request setHTTPBody:[postData dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *urlconnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
self.connection = urlconnection;