web services - How to add new row to a sharepoint list in objective c? -
i tried using updatelistitems web service of sharepoint. not find how give input data in xml format along soap request.
thanks in advance
since it's integration doing i'd recommend using ado.net adapter sharepoint , connect through wcf service (soap/wsdl). save lot of time , if done correctly integration wont proprietary.
check ready-made wcf service, http://www.bendsoft.com/downloads/camelot-wcf-service/, installation instructions here http://blog.bendsoft.com/category/integrations/wcf-services/.
it's open source ships support camelot xml format, bundles schema along content if query data, check example schema here http://www.bendsoft.com/downloads/sharepoint-web-parts/xml-pusher/.
to insert data sharepoint wcf service can this
$sharepointnonquery = new sharepointnonquery(array( 'sql' => "insert contactform (title,email,company,message) values ('john doe','john.doe@example.com','johns company','a test message!')", 'method' => 'executenonquery', 'connstring' => 'sharepoint_connection', 'sharedkey' => constant("wsdl_shared_key") ));
the example made in php ( http://blog.bendsoft.com/2011/04/camelot-php-tools-1-1-for-sharepoint-released/ ) it's equally easy create class in objective-c , send command sql via soap , execute sql command in wcf service.
hope helps!
----------- edits below line -----------
querying suggested wcf service objective-c result in this
wsmethodinvocationref soapreq = createsoaprequest(url, method, namespace, params, paramorder, reqheaders);
the url location of wcf service, ie. http://yourserver.com/wcf/camelot.wcf
the method method in wcf service want use. camelot wcf service have few default methods. suitable in scenario executenonquery method takes following arguments; sql, connstring , sharedkey.
bool executenonquery(string sql, string connstring, string sharedkey);
the params arguments listed above, should sent associative array (nsdictionary assume).
nsdictionary *params = [nsdictionary dictionarywithobjectsandkeys: @"insert yourlist (title,email,company,message) values ('john doe','john.doe@example.com','johns company','a test message!')", @"sql", @"connstring", @"sharepointconnectionstring", @"sharedkey", @"yourpreferredkey", nil];
the executenonquery bool method return true or false soapreq method in objective-c application.
Comments
Post a Comment