Community mailing list archives

community@mail.odoo.com

Re: odoo development for ios app

by
Serpent Consulting Services Pvt. Ltd., Jay Vora
- 07/17/2015 06:40:05
1)  we have to authenticate on odoo server.

    NSMutableArray *argslogin = [NSMutableArray arrayWithObjects:DATABASE,USERNAME,USERPASSWORD, nil];

    NSString *serverlogin = [NSString stringWithFormat:@"http://%@:%@/xmlrpc/common",HOST,PORT];       

    NSString *methodlogin = @"login";                                        

    XMLRPCRequest *requestlogin = [[XMLRPCRequest alloc] initWithURL:[NSURLURLWithString:serverlogin]];

    [requestlogin  setMethod:methodlogin withParameters:argslogin];

    NSError *myErrorlogin;

    XMLRPCResponse *response = [XMLRPCConnection sendSynchronousXMLRPCRequest:requestlogin error: &myErrorlogin];

    NSString *xmlData = [response body];

    NSLog(@"xmlData   %@",xmlData);



so through the above code you can perform any action on odoo.



On Fri, Jul 17, 2015 at 1:23 PM, <venkatarao.nagendla@browseinfo.in> wrote:
Hello,
Greetings,
I have done coding for connection as following:

[NSURL *URL = [NSURL URLWithString: @"192.162.1.45:8069"];
     XMLRPCRequest *request = [[XMLRPCRequest alloc] initWithURL: URL];
     XMLRPCConnectionManager *manager = [XMLRPCConnectionManager 
sharedManager];

     [request setMethod: @"Echo.echo" withParameter: @"Hello World!"];

     NSLog(@"Request body: %@", [request body]);

     [manager spawnConnectionWithXMLRPCRequest: request delegate: self];]

I tried to connect with odoo with this code,but it gives me connection 
failure.
So i am not sure where i am going wrong.I hope i have explained the 
issue clearly.
Please guide me if i am making any mistake.
Thank you.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
The Splendid journey of 2 years in Numbers
---
Regards,
Jay Vora,
Managing Director,
<img src="cid:part1.09000700.05080805@serpentcs.com" style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Serpent Consulting Services Pvt. Ltd.
Web : http://www.serpentcs.com
Mobile : 91 - 9879354457
Twitter: jaynvora
Skype: jaynvora
Blog : http://jayvora.blogspot.com