<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>David&#039;s IT Blog</title>
	<atom:link href="http://davidsit.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidsit.wordpress.com</link>
	<description>Interoperability and Integration Experiments</description>
	<lastBuildDate>Wed, 25 Jan 2012 03:54:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='davidsit.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>David&#039;s IT Blog</title>
		<link>http://davidsit.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://davidsit.wordpress.com/osd.xml" title="David&#039;s IT Blog" />
	<atom:link rel='hub' href='http://davidsit.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Blog status</title>
		<link>http://davidsit.wordpress.com/2010/10/11/blog-update/</link>
		<comments>http://davidsit.wordpress.com/2010/10/11/blog-update/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 09:28:26 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[General IT]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=222</guid>
		<description><![CDATA[Just to give you a heads up, I won&#8217;t be updating the blog in the short to mid term. Unfortunately I don&#8217;t have enough time to dedicate to this blog anymore because of various engagements. So, instead of bringing it offline I will keep it here as is, especially since the SharePoint tutorials interestingly seem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=222&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just to give you a heads up, I won&#8217;t be updating the blog in the short to mid term.</p>
<p>Unfortunately I don&#8217;t have enough time to dedicate to this blog anymore because of various engagements. So, instead of bringing it offline I will keep it here as is, especially since the SharePoint tutorials interestingly seem to attract more and more interest over time.</p>
<p>Thank you all for visiting my blog and enjoy the posts.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=222&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/10/11/blog-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>
	</item>
		<item>
		<title>Improve Document Management in SharePoint with jQuery</title>
		<link>http://davidsit.wordpress.com/2010/05/16/improve-document-management-in-sharepoint-with-jquery/</link>
		<comments>http://davidsit.wordpress.com/2010/05/16/improve-document-management-in-sharepoint-with-jquery/#comments</comments>
		<pubDate>Sun, 16 May 2010 12:56:48 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[business process]]></category>
		<category><![CDATA[dms]]></category>
		<category><![CDATA[document management system]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[Swiss SharePoint Club]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=194</guid>
		<description><![CDATA[Today I will present a project I did with a Human Ressources consulting company, ISMAT, for who I integrated a document management process in SharePoint Online. This post covers the context and describes how the developed artifact &#8211; a copy operation plugin for SharePoint Online &#8211; works. The innovative part of this plugin is that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=194&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Today I will present a project I did with a Human Ressources consulting company, <a title="ISMAT Consulting SA Homepage" href="http://www.ismat.ch">ISMAT</a>, for who I integrated a document management process in SharePoint Online. This post covers the context and describes how the developed artifact &#8211; a copy operation plugin for SharePoint Online &#8211; works. The innovative part of this plugin is that it combines the use  of multiple data sources (SharePoint Web Services and HTML source code) while offering end-user controls that are integrated inside the SharePoint GUI. It was developed with the <a title="jQuery library homepage" href="http://jquery.com">jQuery </a>JavaScript library. The project described here was also part of a report published by the SharePoint Competency Center, and can be downloaded here: <em><a title="PDF Report: Microsoft SharePoint: on-premise or online?" href="http://www.cc-sharepoint.ch/Documents/BPOS%20Study%20FinalV2.pdf">Microsoft SharePoint : on-premise or online?</a>.</em></div>
<div><em><br />
</em></div>
<div>While implementing a SharePoint document management system for ISMAT, I had to customize it to meet the business needs. Indeed, in order to sustain an internal business process, an extension was written in JavaScript and jQuery which worked with the SharePoint Online Web Services. This extension allowed ISMAT to copy multiple documents to clients&#8217; folders, while adding business metadata along the way. This allowed collaborators to get copies of generic teaching material ready to be personalized for each customer. It was entirely integrated into the user interface of SharePoint Online, which proved the extensibility of the service and its ability to sustain ISMATs&#8217; particular business needs (see Picture 1: Screen capture of the Documents Copy Plugin in action).</div>
<p></p>
<div></div>
<div id="_mcePaste"></div>
<div><strong><a href="http://davidsit.files.wordpress.com/2010/05/capture-d_ecran-2010-05-16-a-14-23-12.png"><img class="size-full wp-image-201" title="jQuery plugin for SharePoint screenshot" src="http://davidsit.files.wordpress.com/2010/05/capture-d_ecran-2010-05-16-a-14-23-12.png?w=600&#038;h=138" alt="" width="600" height="138" /></a></strong></div>
<div><strong><br />
</strong></div>
<div>The objective was to automate a part of the clients&#8217; document management process that was entirely manual before. Indeed, it was the source of classification problems like duplicates or lost information. The implementation of this plugin had four main advantages for ISMAT:</div>
<div></div>
<div id="_mcePaste">
</p>
<div id="_mcePaste">
<ul>
<li><strong>Increase of productivity</strong> by reducing the number of manual actions to perform by the user to customize teaching materials for a customer.</li>
<li><strong>Decreased risks</strong> linked to misfiled documents, like information loss or duplicates, thanks to the automatic mapping of customers&#8217; metadata.</li>
<li><strong>Less training</strong> necessary for the end user, as the process is fully integrated into SharePoint Onlines&#8217; user interface.</li>
<li><strong>Minimized maintenance</strong>: the plugin was designed to be easily installable, configurable and portable. Indeed, just a line in a content editor web part is necessary to enable it, and the plugin requires almost no configuration. Furthermore, it is entirely cross browser compatible and can&#8217;t possibly crash SharePoint Onlines&#8217; servers as the code is executed on the client side.</li>
</ul>
</div>
</div>
<div id="_mcePaste"></div>
<div>The plugin works like this: Checkboxes are added near the documents displayed in a Document Library WebPart. They use HTML structural patterns that are in Document Library WebParts to detect the place where to insert the UI elements (see schema below: How UI elements are injected).</div>
<div><a href="http://davidsit.files.wordpress.com/2010/05/html_structural_pattern.png"><img class="aligncenter size-full wp-image-204" title="jQuery plugin for SharePoint: How UI Elements are injected" src="http://davidsit.files.wordpress.com/2010/05/html_structural_pattern.png?w=600&#038;h=337" alt="" width="600" height="337" /></a></div>
<div>Clicking on any of those checkboxes generates a new &#8220;Copy to&#8221; button that appears in the Web Part&#8217;s toolbar. When the user moves his mouse over this new button, a list of clients is revealed in a drop down menu. These clients all come from a list of clients that resides in the same SharePoint Site collection. Each time the page is loaded, the plugin fetches the updated list of clients.</div>
<div>Once the user clicks on a client name in the menu, the selected documents are copied to a clients&#8217; library that resides on another site. These documents are updated with business metadata along the way. Another particularity of this plugin is that it uses SharePoint Onlines&#8217; Web Services as well as structural HTML patterns as data sources (see picture below: jQuery plugin for SharePoint bidirectional interactions).</div>
<div id="_mcePaste"><strong><a href="http://davidsit.files.wordpress.com/2010/05/capture-d_ecran-2010-05-16-a-14-18-42.png"><img class="size-full wp-image-199" title="jQuery plugin for SharePoint - interactions schema" src="http://davidsit.files.wordpress.com/2010/05/capture-d_ecran-2010-05-16-a-14-18-42.png?w=600&#038;h=383" alt="" width="600" height="383" /></a><br />
</strong></div>
<div id="_mcePaste">This alternative way of extending SharePoint Onlines&#8217; Standard functionalities proves to be particularly interesting for small companies like ISMAT, who do not have enough employees to be able to benefit from the dedicated variant of the service which allows custom code deployment.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=194&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/05/16/improve-document-management-in-sharepoint-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/05/capture-d_ecran-2010-05-16-a-14-23-12.png" medium="image">
			<media:title type="html">jQuery plugin for SharePoint screenshot</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/05/html_structural_pattern.png" medium="image">
			<media:title type="html">jQuery plugin for SharePoint: How UI Elements are injected</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/05/capture-d_ecran-2010-05-16-a-14-18-42.png" medium="image">
			<media:title type="html">jQuery plugin for SharePoint - interactions schema</media:title>
		</media:content>
	</item>
		<item>
		<title>Swiss SharePoint Club Meeting #16</title>
		<link>http://davidsit.wordpress.com/2010/03/22/swiss-sharepoint-club-meeting-16/</link>
		<comments>http://davidsit.wordpress.com/2010/03/22/swiss-sharepoint-club-meeting-16/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 20:41:00 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[HEIG-VD]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[Swiss SharePoint Club]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=181</guid>
		<description><![CDATA[Updated March 27, 2010: PowerPoint presentation added I will be speaking Wednesday March 24 at the 16th Swiss SharePoint Club meeting at the St-Roch center, in Yverdon-les-Bains (the agenda of the meeting, which includes SharePoint technology and user experience sessions, is available here). Mr Seydoux of the SharePoint Competence Center kindly invited me to this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=181&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-182 alignnone" title="Swiss SharePoint club logo" src="http://davidsit.files.wordpress.com/2010/03/ssplogo.png?w=210&#038;h=60" alt="" width="210" height="60" /></p>
<p><strong>Updated March 27, 2010: <span style="font-weight:normal;">PowerPoint presentation added</span></strong></p>
<p>I will be speaking Wednesday March 24 at the <a href="http://clubsps.wordpress.com/2010/02/19/club-meeting-16-yverdon/">16th Swiss SharePoint Club meeting</a> at the <a href="http://www.heig-vd.ch/Default.aspx?tabid=222">St-Roch center</a>, in Yverdon-les-Bains (the agenda of the meeting, which includes SharePoint technology and user experience sessions, is available <a href="http://clubsps.wordpress.com/2010/02/19/club-meeting-16-yverdon/">here</a>).</p>
<p>Mr Seydoux of the <a href="http://www.cc-sharepoint.ch">SharePoint Competence Center</a> kindly invited me to this event, so I can explain <strong>the advantages of using SharePoint Online in a deskless company</strong>, based on my recent thesis experience.</p>
<p>Here are the main topics that I will cover:</p>
<ul>
<li>SharePoint Online as a Document Management System</li>
<li>Interoperability with a custom made CRM</li>
<li>Extending SharePoint&#8217;s functionality with jQuery</li>
</ul>
<p>Sounds interesting to you? I hope to see you there then, but if you can&#8217;t make it, you might still want to grab my presentation (here: <a href="http://davidsit.files.wordpress.com/2010/03/swiss-sharepoint-club-presentation.ppt">Swiss SharePoint Club &#8211; presentation</a>). And hey, that doesn&#8217;t mean I&#8217;ve given up posting on my blog, as I will elaborate on the jQuery and SharePoint topic in my following posts!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=181&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/03/22/swiss-sharepoint-club-meeting-16/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/03/ssplogo.png?w=300" medium="image">
			<media:title type="html">Swiss SharePoint club logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating SharePoint list items with PHP</title>
		<link>http://davidsit.wordpress.com/2010/03/03/creating-sharepoint-list-items-with-php/</link>
		<comments>http://davidsit.wordpress.com/2010/03/03/creating-sharepoint-list-items-with-php/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 23:06:02 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[msdn]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=162</guid>
		<description><![CDATA[As requested, here&#8217;s an example of creating a SharePoint list item with PHP. If you read my previous post (Reading a SharePoint list with PHP) you&#8217;ll notice that the code is very similar. In fact, only the CAML query (which is contained in the SOAP request) and the Lists method has changed. Once again, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=162&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;"><img class="alignnone size-thumbnail wp-image-142" title="PHP logo" src="http://davidsit.files.wordpress.com/2010/02/php.png?w=63&#038;h=33" alt="" width="63" height="33" /><img class="alignnone size-medium wp-image-143" title="SharePoint Logo" src="http://davidsit.files.wordpress.com/2010/02/microsoft-office-sharepoint-logo.jpg?w=168&#038;h=36" alt="" width="168" height="36" /></p>
<p>As requested, here&#8217;s an example of creating a SharePoint list item with PHP. If you read my previous post (<a href="http://davidsit.wordpress.com/2010/02/23/reading-a-sharepoint-list-with-php">Reading a SharePoint list with PHP</a>) you&#8217;ll notice that the code is very similar. In fact, only the CAML query (which is contained in the SOAP request) and the Lists method has changed. Once again, I recommend following this simple guideline when coding a SharePoint application from PHP or Java :</p>
<ul>
<li><strong>Use a local copy of your SharePoints Lists WSDL file</strong> (or any other SharePoint Web Service WSDL file you&#8217;ll be using).  You&#8217;ll avoid the painful task of having to deal with Microsoft&#8217;s NTLM authentication protocol. By doing this you&#8217;ll be using basic authentication, unless your server has a special security configuration. This means less code, less maintenance, and quicker deployment. Your Lists WSDL file must be downloaded from your own SharePoint server (at the URL: sharepointdomain.com/subsite/_vti_bin/Lists.asmx?WSDL).</li>
</ul>
<p>Here are resources that will help you construct your CAML query:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/dd926627.aspx">Microsoft SharePoint Open Specification &#8211; Lists Web Service examples</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd926627.aspx"></a><a href="http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx">MSDN SharePoint Developer Center &#8211; Lists.UpdateListsItems method</a></li>
</ul>
<p>To get the code to work, you&#8217;ll need the <a href="http://sourceforge.net/projects/nusoap/">NuSOAP</a> library, your own local Lists WSDL file,  and of course your own personalized authentication/list variables in the code below. This code has been tested with SharePoint Online and PHP 5.3, but should work with MOSS 2007.</p>
<p><pre class="brush: php;">
&lt;?php

// Requires the NuSOAP library
require_once('lib/nusoap.php');

$username = 'yourUsername';
$password = 'yourPassword';
$rowLimit = '150';

/* A string that contains either the display name or the GUID for the list.
 * It is recommended that you use the GUID, which must be surrounded by curly
 * braces ({}).
 */
$listName = &quot;TempList&quot;;

/*
 * Example field (aka columns) names and values, that will be used in the
 * CAML query. The values are the attributes of a single list item here.
 * If the field name contains a space in SharePoint, replace it
 * here with _x0020_ (including underscores).
 */
$field1Name = &quot;Title&quot;;
$field2Name = &quot;Address&quot;;
$field3Name = &quot;Premium_x0020_customer&quot;;

$field1Value = &quot;John Smith&quot;;
$field2Value = &quot;USA&quot;;
$field3Value = &quot;1&quot;;

/* Local path to the Lists.asmx WSDL file (localhost). You must first download
 * it manually from your SharePoint site (which should be available at
 * yoursharepointsite.com/subsite/_vti_bin/Lists.asmx?WSDL)
 */
$wsdl = &quot;http://localhost/phpsp/Lists.wsdl&quot;;

//Basic authentication is normally used when using a local copy a the WSDL. Using UTF-8 to allow special characters.
$client = new nusoap_client($wsdl, true);
$client-&gt;setCredentials($username,$password);
$client-&gt;soap_defencoding='UTF-8';

//CAML query (request), add extra Fields as necessary
$xml =&quot;
 &lt;UpdateListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'&gt;
 &lt;listName&gt;$listName&lt;/listName&gt;
 &lt;updates&gt;
 &lt;Batch ListVersion='1' OnError='Continue'&gt;
 &lt;Method Cmd='New' ID='1'&gt;
 &lt;Field Name='$field1Name'&gt;$field1Value&lt;/Field&gt;
 &lt;Field Name='$field2Name'&gt;$field2Value&lt;/Field&gt;
 &lt;Field Name='$field3Name'&gt;$field3Value&lt;/Field&gt;
 &lt;/Method&gt;
 &lt;/Batch&gt;
 &lt;/updates&gt;
 &lt;/UpdateListItems&gt;
&quot;;

//Invoke the Web Service
$result = $client-&gt;call('UpdateListItems', $xml);

//Error check
if(isset($fault)) {
 echo(&quot;&lt;h2&gt;Error&lt;/h2&gt;&quot;. $fault);
}

//extracting the XML data from the SOAP response
$responseContent = utf8_decode(htmlspecialchars(substr($client-&gt;response,strpos($client-&gt;response, &quot;&lt;&quot;),strlen($client-&gt;response)-1), ENT_QUOTES));

echo &quot;&lt;h2&gt;Request&lt;/h2&gt;&lt;pre&gt;&quot; . utf8_decode(htmlspecialchars($client-&gt;request, ENT_QUOTES)) . &quot;&lt;/pre&gt;&quot;;
echo &quot;&lt;h2&gt;Response header&lt;/h2&gt;&lt;pre&gt;&quot; . utf8_decode(htmlspecialchars(substr($client-&gt;response,0,strpos($client-&gt;response, &quot;&lt;&quot;)))) . &quot;&lt;/pre&gt;&quot;;
echo &quot;&lt;h2&gt;Response content&lt;/h2&gt;&lt;pre&gt;&quot;.$responseContent.&quot;&lt;/pre&gt;&quot;;

//Debugging info:
//echo(&quot;&lt;h2&gt;Debug&lt;/h2&gt;&lt;pre&gt;&quot; . htmlspecialchars($client-&gt;debug_str, ENT_QUOTES) . &quot;&lt;/pre&gt;&quot;);
unset($client);
?&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/162/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/162/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/162/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=162&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/03/03/creating-sharepoint-list-items-with-php/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/02/php.png?w=150" medium="image">
			<media:title type="html">PHP logo</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/02/microsoft-office-sharepoint-logo.jpg?w=300" medium="image">
			<media:title type="html">SharePoint Logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Reading a SharePoint list with PHP (updated)</title>
		<link>http://davidsit.wordpress.com/2010/02/23/reading-a-sharepoint-list-with-php/</link>
		<comments>http://davidsit.wordpress.com/2010/02/23/reading-a-sharepoint-list-with-php/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 22:44:19 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=140</guid>
		<description><![CDATA[Updated (March 4, 2010): Added an example that uses the PHP5 built-in SOAP support instead of the NuSOAP library. In my previous posts I showed a way to interact with SharePoint’s Lists Web Service through a Java application. Today I’d like to show how to do similar basic tricks with PHP. Once again, toying with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=140&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;"><strong><span style="color:#000000;"><span style="color:#000000;">Updated </span>(March 4, 2010)</span></strong>: <strong>Added an example that uses the PHP5 built-in SOAP support instead of the NuSOAP library.</strong></p>
<p style="text-align:left;"><img class="alignnone size-thumbnail wp-image-142" title="PHP logo" src="http://davidsit.files.wordpress.com/2010/02/php.png?w=63&#038;h=33" alt="" width="63" height="33" /><img class="alignnone size-medium wp-image-143" title="SharePoint Logo" src="http://davidsit.files.wordpress.com/2010/02/microsoft-office-sharepoint-logo.jpg?w=168&#038;h=36" alt="" width="168" height="36" /></p>
<p>In my previous posts I showed a way to interact with SharePoint’s Lists Web Service through a Java application. Today I’d like to show how to do similar basic tricks with PHP. Once again, toying with SharePoint Web Services from a non-Microsoft language isn’t exactly a<a title="SharePoint Web Services: 3 things to consider before coding in Java" href="http://davidsit.wordpress.com/2010/02/03/sharepoint-web-services-3-things-to-consider-before-coding-in-java"> walk in the park</a>.</p>
<p style="text-align:center;"><a href="http://davidsit.files.wordpress.com/2010/02/sharepointphp.jpg"><img class="size-medium wp-image-153  aligncenter" title="Accessing SharePoint from PHP screenshot" src="http://davidsit.files.wordpress.com/2010/02/sharepointphp.jpg?w=203&#038;h=210" alt="" width="203" height="210" /></a></p>
<p>I tried to do some experiments lately: I managed to read a SharePoint Online List from PHP, thanks to the <a href="http://sourceforge.net/projects/nusoap">nusoap library</a> and a <a href="http://www.craiget.com/2009/01/sharepoint-meet-php">blog post</a> written by Craige Thomas. As usual, a lot of trouble comes from the consumption of a WSDL that lies behind an NTLM/SSL server (in the case of SharePoint Online anyways). Once again, the easiest way to avoid such problems is to download and parse the WSDL file locally (Lists.asmx). Using basic authentication is the way to go when building a simple lists reading application in PHP, solving the NTLM issue implies too many <a href="http://rabaix.net/en/articles/2008/03/13/using-soap-php-with-ntlm-authentication">intricacies</a> in my opinion. If you manage to do it with a simple and straightforward solution, please let me know.</p>
<p>The code sample below will basically display the Lists Web Service request and response (see the screenshot above). Before running the code, you&#8217;ll have to set the username, password, and the local path to your Lists WSDL file. The logical next step, if you want to manipulate the results, would be to cast the response into a DOM document and parse it for the information you&#8217;re looking for.</p>
<p><pre class="brush: php;">
&lt;?php

//Requires the NuSOAP library
require_once('lib/nusoap.php');

$username = 'yourLogin';
$password = 'yourPassword';
$rowLimit = '150';

/* A string that contains either the display name or the GUID for the list.
 * It is recommended that you use the GUID, which must be between curly
 * braces ({}).
 */
$listName = &quot;yourSharePointListName&quot;;

/* Local path to the Lists.asmx WSDL file (localhost). You must first download
 * it manually from your SharePoint site (which should be available at
 * yoursharepointsite.com/subsite/_vti_bin/Lists.asmx?WSDL)
 */
$wsdl = &quot;http://localhost/phpsp/Lists.wsdl&quot;;

//Basic authentication. Using UTF-8 to allow special characters.
$client = new nusoap_client($wsdl, true);
$client-&gt;setCredentials($username,$password);
$client-&gt;soap_defencoding='UTF-8';

//XML for the request. Add extra fields as necessary
$xml ='
&lt;GetListItems xmlns=&quot;http://schemas.microsoft.com/sharepoint/soap/&quot;&gt;
&lt;listName&gt;'.$listName.'&lt;/listName&gt;
&lt;rowLimit&gt;'.$rowLimit.'&lt;/rowLimit&gt;
&lt;/GetListItems&gt;
';

//Invoke the Web Service
$result = $client-&gt;call('GetListItems', $xml);

//Error check
if(isset($fault)) {
  echo(&quot;&lt;h2&gt;Error&lt;/h2&gt;&quot;. $fault);
}

//Extracting and preparing the Web Service response for display
$responseContent = utf8_decode(htmlspecialchars(substr($client-&gt;response,strpos($client-&gt;response, &quot;&lt;&quot;),strlen($client-&gt;response)-1)));

//Displaying the request and the response, broken down by header and XML content
echo &quot;&lt;h2&gt;Request&lt;/h2&gt;&lt;pre&gt;&quot; . utf8_decode(htmlspecialchars($client-&gt;request, ENT_QUOTES)) . &quot;&lt;/pre&gt;&quot;;
echo &quot;&lt;h2&gt;Response header&lt;/h2&gt;&lt;pre&gt;&quot; . utf8_decode(htmlspecialchars(substr($client-&gt;response,0,strpos($client-&gt;response, &quot;&lt;&quot;)))) . &quot;&lt;/pre&gt;&quot;;
echo &quot;&lt;h2&gt;Response content&lt;/h2&gt;&lt;pre&gt;&quot;.$responseContent.&quot;&lt;/pre&gt;&quot;;

//Uncomment for debugging info:
//echo(&quot;&lt;h2&gt;Debug&lt;/h2&gt;&lt;pre&gt;&quot; . htmlspecialchars($client-&gt;debug_str, ENT_QUOTES) . &quot;&lt;/pre&gt;&quot;);
unset($client);
?&gt;
</pre></p>
<p><span id="more-140"></span></p>
<p><strong>And here&#8217;s the faster and cleaner version that uses the PHP5 built-in SOAP support:</strong></p>
<p><pre class="brush: php;">
&lt;?php

//Authentication details
$authParams = array('login' =&gt; 'yourUsername',
					'password' =&gt; 'yourPassword');

/* A string that contains either the display name or the GUID for the list.
 * It is recommended that you use the GUID, which must be surrounded by curly
 * braces ({}).
 */
$listName = &quot;TempList&quot;;
$rowLimit = '150';

/* Local path to the Lists.asmx WSDL file (localhost). You must first download
 * it manually from your SharePoint site (which should be available at
 * yoursharepointsite.com/subsite/_vti_bin/Lists.asmx?WSDL)
 */
$wsdl = &quot;http://localhost/phpsp/Lists.wsdl&quot;;

//Creating the SOAP client and initializing the GetListItems method parameters
$soapClient = new SoapClient($wsdl, $authParams);
$params = array('listName' =&gt; $listName,
				'rowLimit' =&gt; $rowLimit);

//Calling the GetListItems Web Service
$rawXMLresponse = null;
try{
	$rawXMLresponse = $soapClient-&gt;GetListItems($params)-&gt;GetListItemsResult-&gt;any;
}
catch(SoapFault $fault){
	echo 'Fault code: '.$fault-&gt;faultcode;
	echo 'Fault string: '.$fault-&gt;faultstring;
}
echo '&lt;pre&gt;' . $rawXMLresponse . '&lt;/pre&gt;';

//Loading the XML result into parsable DOM elements
$dom = new DOMDocument();
$dom-&gt;loadXML($rawXMLresponse);
$results = $dom-&gt;getElementsByTagNameNS(&quot;#RowsetSchema&quot;, &quot;*&quot;);

//Fetching the elements values. Specify more attributes as necessary
foreach($results as $result){
	echo $result-&gt;getAttribute(&quot;ows_LinkTitle&quot;).&quot;&lt;br/&gt;&quot;;
}
unset($soapClient);
?&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=140&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/02/23/reading-a-sharepoint-list-with-php/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/02/php.png?w=150" medium="image">
			<media:title type="html">PHP logo</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/02/microsoft-office-sharepoint-logo.jpg?w=300" medium="image">
			<media:title type="html">SharePoint Logo</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/02/sharepointphp.jpg?w=290" medium="image">
			<media:title type="html">Accessing SharePoint from PHP screenshot</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating SharePoint list items with java: tutorial</title>
		<link>http://davidsit.wordpress.com/2010/02/15/creating-sharepoint-list-items-with-java-tutorial/</link>
		<comments>http://davidsit.wordpress.com/2010/02/15/creating-sharepoint-list-items-with-java-tutorial/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 12:48:17 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[connector]]></category>
		<category><![CDATA[external data]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[msdn]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=123</guid>
		<description><![CDATA[This post completes the 2nd part of my series of &#8220;Using external business data with SharePoint&#8221;: SharePoint Web Services and Java When I first tried to experiment with Java and SharePoint I really wondered why Microsoft didn’t invest a bit more into interoperability concerning their SharePoint platform. The potential is here: they have a market-leading [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=123&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>This post completes the 2nd part of my series of &#8220;Using external business data with SharePoint&#8221;: SharePoint Web Services and Java</strong></p>
<p>When I first tried to experiment with Java and SharePoint I really wondered why Microsoft didn’t invest a bit more into interoperability concerning their SharePoint platform. The potential is here: they have a market-leading product with rich Web Services. So why only support Microsoft languages? Why is there barely any Java documentation, support or examples? Or even (god forbid) a SharePoint Java library with some helper classes? I bet it would certainly attract new segments and stimulate the usage of SharePoint (or SharePoint Online) in heterogeneous IT ecosystems, what I’ve often seen in smaller companies… That would be a win-win situation for Microsoft and its customers in my opinion.</p>
<p><strong><a href="http://davidsit.files.wordpress.com/2010/02/sharepointapp_full.jpg"><img class="aligncenter size-medium wp-image-132" title="SharePoint Java Application - Lists Web Service" src="http://davidsit.files.wordpress.com/2010/02/sharepointapp_full.jpg?w=300&#038;h=168" alt="SharePoint Java Application screenshot" width="300" height="168" /></a></strong></p>
<p><strong>Tutorial introduction</strong></p>
<p>In this post I will show a way to <strong>insert, update and delete SharePoint list items from Java</strong>. In case you want to build such an app from scratch, I invite you to read the three first steps of my <a title="Reading a SharePoint list with Java: tutorial" href="http://davidsit.wordpress.com/2010/02/10/reading-a-sharepoint-list-with-java-tutorial">previous tutorial</a> that describe how to generate the Lists Web Service stub classes and how to authenticate to the Web Service. As usual, I’ve tested it with NetBeans and SharePoint Online, but it should work with MOSS 2007 and other Java IDEs. Please keep in mind that this is my take at Java and SharePoint and that there might be more efficient ways to do it, but hey, it works for me!</p>
<p>The challenge here will be to create a Lists request “wrapper” that will be able to do construct a basic CAML query skeleton. To better understand the structure of the request, the first stop is of course <a title="Lists.UpdateListItems Method (Lists)" href="http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx">MSDN&#8217;s UpdateListItems doc</a>. The problem is that MSDN often points fractions of the required CAML structure in their examples, but that’s not always enough, as we need to have a full SOAP sample for our Java app. What I found to be the most helpful was to fire up my browser and go to the URL of my Web Service method I was interested in. In this case, it will be UpdateListsItem, that can usually be found at sharepointsite/Lists/_vti_bin/Lists.asmx?op=UpdateListItems.</p>
<p><strong>Tutorial: <strong> Creating list items from Java</strong></strong></p>
<p><em>In a hurry? You can download the full source code of what’s been covered until now <a title="SharePoint Java Application Source Code - Lists Web Service" href="http://www.megaupload.com/?d=WQKPMBH9">here</a></em><em> (GPLv2 license). Enjoy!</em></p>
<p>Here we go:</p>
<ol>
<li><strong>Code the Lists request wrapper class</strong>. Basically this class will contain the XML SOAP request with the correct structure for the Lists Web Service. I included the imports below to avoid any ambiguity when fixing imports.<br />
<pre class="brush: java;">
import java.util.HashMap;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Text;

/**
 *   @author David Dudok de Wit
 *   @version 13 Feb. 2010
 */
public class ListsRequest {

    private Document rootDocument;
    private Element rootDocContent;

    /**
     * @return the rootDocument
     */
    public Document getRootDocument() {
        return rootDocument;
    }

    /**
     * @return the rootDocContent
     */
    public Element getRootDocContent() {
        return rootDocContent;
    }
}

</pre></p>
<p>&nbsp;</li>
<li><strong>Code the ListsRequest constructor. </strong>This will construct a generic “New”, “Update” or “Delete” CAML request. <strong> </strong>In order to avoid errors I’ve added some requestType control checks. Moreover, to keep the constructor signature simple, I made it initialize less relevant parameters automatically (like try to insert each item of the batch operation, even if one fails).<pre class="brush: java;">
    /**
     * This class creates a generic XML SOAP request pre-formatted for SharePoint
     * Lists web services requests (aka CAML query). What remains to be added are
     * the specific parameters (XML Elements with attributes).
     * For an example of a CAML Doc http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx
     * @param requestType Either New, Update or Delete
     * @throws Exception
     */
    public ListsRequest(String requestType) throws Exception {
        if (requestType != null) {
            if (requestType.equals(&quot;New&quot;) || requestType.equals(&quot;Update&quot;) || requestType.equals(&quot;Delete&quot;)) {
                try {
                    Element rootElement = null;
                    DocumentBuilder docBuilder = null;
                    DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
                    docBuilder = dbfac.newDocumentBuilder();
                    rootDocument = docBuilder.newDocument();

                    //Creates the root element
                    rootElement = rootDocument.createElement(&quot;Batch&quot;);
                    rootDocument.appendChild(rootElement);

                    //Creates the batch attributes
                    rootElement.setAttribute(&quot;ListVersion&quot;, &quot;1&quot;);
                    rootElement.setAttribute(&quot;OnError&quot;, &quot;Continue&quot;);
                    rootDocContent = rootDocument.createElement(&quot;Method&quot;);
                    rootDocContent.setAttribute(&quot;Cmd&quot;, requestType);
                    rootDocContent.setAttribute(&quot;ID&quot;, &quot;1&quot;);
                    rootDocument.getElementsByTagName(&quot;Batch&quot;).item(0).appendChild(rootDocContent);
                } catch (ParserConfigurationException ex) {
                    ex.printStackTrace();
                    throw (new Exception(ex.toString()));
                }
            } else {
                String err = &quot;Unsupported request type&quot;;
                throw (new Exception(err));
            }
        } else {
            String err = &quot;Null parameters&quot;;
            throw (new Exception(err));
        }
    }
</pre></li>
<li><strong>Code the createListItem function.</strong> This function will inject a HashMap of attributes and their values into the ListsRequest CAML query, under an XML syntax.<br />
<pre class="brush: java;">
    /**
     * Creates a SharePoint list item in the CAML format, and adds it to the rootRequest.
     * In SharePoint, this corresponds to a line in a list. The parameters given
     * here would correspond respectively to the name of the column where to
     * insert the info, and then the info itself.
     * The requestTypeElement should already be initialized before calling this
     * method.
     * XML example output:
     * &lt; Field Name=&quot;ID&quot; &gt;4&lt; Field &gt;
     * &lt; Field Name=&quot;Field_Name&quot; &gt;Value&lt; /Field &gt;
     * @param fields Contains a HashMap with attribute names as keys, and attributes
     * values as content
     * @return true if the item has been successfully added to the caml request
     */
    public boolean createListItem(HashMap&lt;String, String&gt; fields) {
        //params check
        if (fields != null &amp;&amp; getRootDocContent() != null &amp;&amp; this.getRootDocument() != null &amp;&amp; !fields.isEmpty()) {
            Element createdElement = null;
            //Adds attribute by attribute to fields
            for (Map.Entry&lt;String, String&gt; aField : fields.entrySet()) {
                createdElement = this.getRootDocument().createElement(&quot;Field&quot;);
                createdElement.setAttribute(&quot;Name&quot;, aField.getKey());
                Text attributeValue = getRootDocument().createTextNode(&quot;&quot; + aField.getValue());
                createdElement.appendChild(attributeValue);
                this.getRootDocContent().appendChild(createdElement);
            }
            return true;
        }
        return false;
    }
</pre></p>
<p>&nbsp;</li>
<li><strong>Code a higher level manager function. </strong>That’s from where we’ll authenticate, as well as decipher the error messages, and more importantly apply the business logic. This can be added in the Manager.java file. The example below is pretty basic doesn&#8217;t do basic existence checks, which means that the item will be inserted regardless if there&#8217;s already an item with the same attributes. It will however print the request in the console for debugging purposes (see the step 4 of my previous tutorial for the xmlToString function).<br />
<pre class="brush: java;">
    /**
     * This function will insert the given item in the SharePoint that corresponds
     * to the list name given (or list GUID).
     * @param port an already authentificated SharePoint SOAP port
     * @param listName SharePoint list name or list GUID (guid must be enclosed in braces)
     * @param itemAttributes This represents the content of the item that need to be inserted.
     * The key represents the type of attribute (SharePoint column name) and the
     * value corresponds to the item attribute value.
     */
    public static void insertListItem(ListsSoap port, String listName, HashMap&lt;String, String&gt; itemAttributes) {

        //Parameters validity check
        if (port != null &amp;&amp; listName != null &amp;&amp; itemAttributes != null &amp;&amp; !itemAttributes.isEmpty()) {
            try {

                //Building the CAML query with one item to add, and printing request
                ListsRequest newCompanyRequest = new ListsRequest(&quot;New&quot;);
                newCompanyRequest.createListItem(itemAttributes);
                System.out.println(&quot;REQUEST:&quot;
                        + xmlToString(newCompanyRequest.getRootDocument()));

                //initializing the Web Service operation here
                Updates updates = new UpdateListItems.Updates();

                //Preparing the request for the update
                Object docObj = (Object) newCompanyRequest.getRootDocument().getDocumentElement();
                updates.getContent().add(0, docObj);

                //Sending the insert request to the Lists.UpdateListItems Web Service
                UpdateListItemsResult result = port.updateListItems(listName, updates);

                /*
                 *Printing the response in the console.
                 *If successful, the inserted item will be returned
                 */
                System.out.println(&quot;RESPONSE : &quot;
                        + xmlToString((org.w3c.dom.Document) (((ElementNSImpl) result.getContent().get(0)).getOwnerDocument())));
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
</pre></p>
<p>&nbsp;</li>
<li><strong>Testing the code. </strong>Just put a few lines in main to test the whole thing. Note that if you have a column name that contains a space, you&#8217;ll have to replace the space character with _x0020_ in your attributes.<br />
<pre class="brush: java;">
             //Authentication parameters
            String userName = &quot;yourusername&quot;;
            String password = &quot;yourpassword&quot;;
            String sharePointListsWebServiceUrl = &quot;https://yoursharepointsite.com/_vti_bin/Lists.asmx&quot;;

            //Opening the SOAP port of the Lists Web Service
            ListsSoap port = Manager.sharePointListsAuth(userName, password, sharePointListsWebServiceUrl);

            //Name or GUID (with braces) of the list
            String listName = &quot;TempList&quot;;

           //Create the attributes with the format &quot;Column name&quot; =&gt; &quot;value&quot;
            HashMap&lt;String, String&gt; item = new HashMap&lt;String,String&gt;();
            item.put(&quot;Title&quot;, &quot;Michael Drummond&quot;);
            item.put(&quot;Address&quot;, &quot;USA&quot;);

            //If your column name has a space in it, replace the space with _x0020_
            item.put(&quot;Premium_x0020_customer&quot;, &quot;1&quot;);
            Manager.insertListItem(port, listName, item);
</pre></li>
<li><strong>Updating or deleting an item is very similar</strong>; you just have to specify the “ID” of the List item (which can be extracted by reading the list first), just like we did in the previous step with the attributes.<br />
<strong> </strong></li>
</ol>
<p>&nbsp;</p>
<p>That’s it!<br />
Keep in mind that this is a simple example that’s not guaranteed to be appropriate for a production environment. For example, It would be interesting to tweak the code to do allow batch inserts/deletes as well as a transaction system that would be able to cache the requests in case of failure. I hope you found this post helpful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=123&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/02/15/creating-sharepoint-list-items-with-java-tutorial/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/02/sharepointapp_full.jpg?w=300" medium="image">
			<media:title type="html">SharePoint Java Application - Lists Web Service</media:title>
		</media:content>
	</item>
		<item>
		<title>Reading a SharePoint list with Java: tutorial</title>
		<link>http://davidsit.wordpress.com/2010/02/10/reading-a-sharepoint-list-with-java-tutorial/</link>
		<comments>http://davidsit.wordpress.com/2010/02/10/reading-a-sharepoint-list-with-java-tutorial/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 10:15:39 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=88</guid>
		<description><![CDATA[Using external business data with SharePoint part 2: SharePoint Web Services and Java In this tutorial I will show how to consume and use a SharePoint Lists Web Service from java with Netbeans. The objective will be to read the items of a SharePoint list from a java application. The functions coded in this tutorial will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=88&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><strong>Using external business data with SharePoint part 2: </strong>SharePoint Web Services and Java</strong></p>
<p>In this tutorial I will show how to consume and use a SharePoint Lists Web Service from java with Netbeans. The objective will be to read the items of a SharePoint list from a java application. The functions coded in this tutorial will be needed later on if you&#8217;re trying to use external business data with SharePoint (my next post will describe how to the create/update/delete items in a list). Sounds pretty basic? Well, I haven&#8217;t found any other tutorials of this kind for Java, so enjoy!</p>
<p><a href="http://davidsit.files.wordpress.com/2010/02/sharepointapp_capture1.jpg"><img class="aligncenter size-medium wp-image-89" title="SharePoint Java Application (Lists reader)" src="http://davidsit.files.wordpress.com/2010/02/sharepointapp_capture1.jpg?w=300&#038;h=259" alt="SharePoint Java Application Netbeans Screenshot" width="300" height="259" /></a></p>
<p><strong>Tutorial: reading a list</strong></p>
<p>This tutorial has been tested Netbeans 6.8 and SharePoint Online, however any other Java IDE should be suitable. It should work with MOSS 2007 too (please let me know if it doesn&#8217;t). First of all, I’d recommend reading my <a href="http://davidsit.wordpress.com/2010/02/03/sharepoint-web-services-3-things-to-consider-before-coding-in-java/">previous post</a> about the challenges to expect while coding such an application in Java. Before you begin, make sure you have a Sharepoint list that&#8217;s populated with a few items.</p>
<ol>
<li><strong>Get the WSDL</strong>. Before launching Netbeans, you’ll need to download the Lists web service WSDL file with your browser to a local directory. The URL to your WSDL should look like: <a href="https://yoursharepointsite.com/_vti_bin/Lists.asmx?WSDL">sharepointsite.com/_vti_bin/Lists.asmx?WSDL</a>. The reason why you’ll download the WSDL instead of parsing it remotely from your Netbeans project is because you’ll want to avoid errors at build or run time. I tried with Netbeans 6.5, 6.7, 6.8, and encountered a variety of problems when I tried to access and parse the WSDL remotely (NTLM authentication errors, jaxb parsing errors, WSDL not found errors, etc)… Parsing it locally seems to be the simplest workaround to those Netbeans <span style="text-decoration:line-through;">bugs</span> complexities.</li>
<p></p>
<li><strong>Parse the WSDL. <span style="font-weight:normal;">In order to use Sharepoints Web Services with Java, you will need to generate its stub classes with its WSDLs.</span></strong></li>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong></p>
<ul>
<li><span style="font-weight:normal;"><strong><span style="font-weight:normal;"><strong>From Netbeans (easy):</strong> Open Netbeans and create a new Java       Application. Right-click on your project and create a new Web Service       Client, and choose your Lists WSDL file. Choose JAX-WS as Client Style.       Click finish and that’s it. To make sure everything’s fine, clean and       build your project.</span></strong></span></li>
<li><span style="font-weight:normal;"><strong><span style="font-weight:normal;"><strong>F</strong><strong>rom the console :</strong> If you’re not using Netbeans, you can generate the stub classes       manually from the console, thanks to the JDK wsimport tool. Open the console (cmd.exe) and open the directory where your Lists.wsdl file is located. Run the following command to generate the classes in the directory (change the paths if necessary) <em>&#8220;C:\Program Files\Java\jdk1.6.0_12\bin\wsimport.exe&#8221; -p com.microsoft.schemas.sharepoint.soap -keep -extension Lists.wsdl. <span style="font-style:normal;">Import those classes in your IDE.</span></em></span></strong></span></li>
</ul>
<div><span style="font-weight:normal;"><br />
</span></div>
<p></strong><strong> </strong></p>
<li><strong>Code the SOAP authentication function</strong>. The first coding we’ll do is to create a Manager      class that will take care of the Lists Web Service authentication and      manipulation. If successful, it will return an open lists port (ListsSoap object)      that will offer all the functions we need to use the Lists Web Service. Here’s the authentication function:</li>
<p><pre class="brush: java;">
    /**
     * Creates a port connected to the SharePoint Web Service given.
     * Authentication is done here. It also prints the authentication details
     * in the console.
     * @param userName SharePoint username
     * @param password SharePoint password
     * @return port ListsSoap port, connected with SharePoint
     * @throws Exception in case of invalid parameters or connection error.
     */
    public static ListsSoap sharePointListsAuth(String userName, String password) throws Exception {
        ListsSoap port = null;
        if (userName != null &amp;&amp; password != null) {
            try {
                Lists service = new Lists();
                port = service.getListsSoap();
                System.out.println(&quot;Web Service Auth Username: &quot; + userName);
                ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, userName);
                ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
            } catch (Exception e) {
                throw new Exception(&quot;Error: &quot; + e.toString());
            }
        } else {
            throw new Exception(&quot;Couldn't authenticate: Invalid connection details given.&quot;);
        }
        return port;
    }
</pre></p>
<p>Now that the auth code is made, you may call it from your main class to make sure the connection went fine. This code will display some information in the console in case of error.</p>
<li><strong>Code a function that’ll display XML docs in your console. </strong>Most of the time, SharePoint Web Services will return you a huge chunk of information in Microsoft’s own XML / CAML format. This is precisely what we’ll be interested in, as we’ll parse these Web Service responses later to display the lists items for instance. It’s very helpful to have such a function for debugging purposes. We’ll use the old school XML parsing tools embedded in the JDK for that job (javax.xml.transform).</li>
<p><pre class="brush: java;">
    /**
     * Creates a string from an XML file with start and end indicators
     * @param docToString document to convert
     * @return string of the xml document
     */
    public static String xmlToString(Document docToString) {
        String returnString = &quot;\n-------------- XML START --------------\n&quot;;
        try {
            //create string from xml tree
            //Output the XML
            //set up a transformer
            TransformerFactory transfac = TransformerFactory.newInstance();
            Transformer trans;
            trans = transfac.newTransformer();
            trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, &quot;yes&quot;);
            trans.setOutputProperty(OutputKeys.INDENT, &quot;yes&quot;);
            StringWriter sw = new StringWriter();
            StreamResult streamResult = new StreamResult(sw);
            DOMSource source = new DOMSource(docToString);
            trans.transform(source, streamResult);
            String xmlString = sw.toString();
            //print the XML
            returnString = returnString + xmlString;
        } catch (TransformerException ex) {
            Logger.getLogger(Manager.class.getName()).log(Level.SEVERE, null, ex);
        }
        returnString = returnString + &quot;-------------- XML END --------------&quot;;
        return returnString;
    }
</pre></p>
<li><strong>Code a function that’ll read your lists items. </strong>This function will send a getListItems request to      the lists web service using the open ListsSoap port we created before. That’s the easy part! The challenging part is interpreting the dense Soap response, which has that infamous CAML structure. Basically, you have to cast the Web Service response into a classic XML document. That way, you can parse it with your favorite XML reader once you know what you’re looking      for.</li>
<p><pre class="brush: java;">
    /**
     * Connects to a SharePoint Lists Web Service through the given open port,
     * and reads all the elements of the given list. Only the ID and the given
     * attributes (column names) are displayed, as well as a dump of the SOAP
     * response from the Web Service (for debugging purposes).
     * @param port an already authentificated SharePoint Online SOAP port
     * @param listName original name of the Sharepoint list that is going to be read
     * @param listColumnNames arraylist containing the various names of the Columns
     * of the SharePoint list that are going to be read. If the column name isn't
     * found, then an exception will be thrown
     * @param rowLimit limits the number of rows (list items) that are going to
     * be returned
     * @throws Exception
     */
    public static void displaySharePointList(ListsSoap port, String listName, ArrayList&lt;String&gt; listColumnNames, String rowLimit) throws Exception {
        if (port != null &amp;&amp; listName != null &amp;&amp; listColumnNames != null &amp;&amp; rowLimit != null) {
            try {

                //Here are additional parameters that may be set
                String viewName = &quot;&quot;;
                GetListItems.ViewFields viewFields = null;
                GetListItems.Query query = null;
                GetListItems.QueryOptions queryOptions = null;
                String webID = &quot;&quot;;

                //Calling the List Web Service
                GetListItemsResponse.GetListItemsResult result = port.getListItems(listName, viewName, query, viewFields, rowLimit, queryOptions, webID);
                Object listResult = result.getContent().get(0);
                if ((listResult != null) &amp;&amp; (listResult instanceof ElementNSImpl)) {
                    ElementNSImpl node = (ElementNSImpl) listResult;

                    //Dumps the retrieved info in the console
                    Document document = node.getOwnerDocument();
                    System.out.println(&quot;SharePoint Online Lists Web Service Response:&quot; + Manager.xmlToString(document));

                    //selects a list of nodes which have z:row elements
                    NodeList list = node.getElementsByTagName(&quot;z:row&quot;);
                    System.out.println(&quot;=&gt; &quot; + list.getLength() + &quot; results from SharePoint Online&quot;);

                    //Displaying every result received from SharePoint, with its ID
                    for (int i = 0; i &lt; list.getLength(); i++) {

                        //Gets the attributes of the current row/element
                        NamedNodeMap attributes = list.item(i).getAttributes();
                        System.out.println(&quot;******** Item ID: &quot; + attributes.getNamedItem(&quot;ows_ID&quot;).getNodeValue()+&quot; ********&quot;);

                        //Displays all the attributes of the list item that correspond to the column names given
                        for (String columnName : listColumnNames) {
                            String internalColumnName = &quot;ows_&quot; + columnName;
                            if (attributes.getNamedItem(internalColumnName) != null) {
                                System.out.println(columnName + &quot;: &quot; + attributes.getNamedItem(internalColumnName).getNodeValue());
                            } else {
                                throw new Exception(&quot;Couldn't find the '&quot; + columnName + &quot;' column in the '&quot; + listName + &quot;' list in SharePoint.\n&quot;);
                            }
                        }
                    }
                } else {
                    throw new Exception(listName + &quot; list response from SharePoint is either null or corrupt\n&quot;);
                }
            } catch (Exception ex) {
                throw new Exception(&quot;Exception. See stacktrace.&quot; + ex.toString() + &quot;\n&quot;);
            }
        }
    }
</pre></p>
<li><strong>Test the whole thing!</strong></li>
<p>Everything should be ready. Let’s test it from main (of course replace the necessary values with your own).</p>
<p><pre class="brush: java;">
    public static void main(String[] args) {
        try {

            //Authentication parameters
            String userName = &quot;yourUsername&quot;;
            String password = &quot;yourPassword&quot;;

            //Opening the SOAP port of the Lists Web Service
            ListsSoap port = Manager.sharePointListsAuth(userName, password);

            /*
             * Lists Web service parameters
             * The list names below must be the *original* names of the list.
             * if a list or column was renamed from SharePoint afterwards,
             * these parameters don't change.
             */
            String listName = &quot;Client&quot;;
            String rowLimit = &quot;150&quot;;
            ArrayList&lt;String&gt; listColumnNames = new ArrayList&lt;String&gt;();
            listColumnNames.add(&quot;Title&quot;);
            listColumnNames.add(&quot;otherColumnName&quot;);

            //Displays the lists items in the console
            Manager.displaySharePointList(port, listName, listColumnNames, rowLimit);
        } catch (Exception ex) {
            System.err.println(ex);
        }
    }
</pre></p>
<p>This is it!I hope you found this post useful. Any thoughts? I’d be happy to hear your feedback. You can download the full source code covered in this tutorial <a href="http://www.megaupload.com/?d=RJYCT4FR">here</a>.</p>
<p><strong>Update 26 February 2010: </strong><em>Removed unnecessary web service URL in the authentication code (thanks Claus Fassing!)</em></ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=88&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/02/10/reading-a-sharepoint-list-with-java-tutorial/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/02/sharepointapp_capture1.jpg?w=300" medium="image">
			<media:title type="html">SharePoint Java Application (Lists reader)</media:title>
		</media:content>
	</item>
		<item>
		<title>SharePoint Web Services: 3 things to consider before coding in Java</title>
		<link>http://davidsit.wordpress.com/2010/02/03/sharepoint-web-services-3-things-to-consider-before-coding-in-java/</link>
		<comments>http://davidsit.wordpress.com/2010/02/03/sharepoint-web-services-3-things-to-consider-before-coding-in-java/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 12:14:23 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[msdn]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=76</guid>
		<description><![CDATA[Before starting the adventure of coding an application in Java for SharePoint Online, make sure you’re well prepared for the following points: Documentation is rare. No code examples exist on MSDN other than for C# or VB.NET (and some SOAP signatures). Moreover, translating MSDN’s C# examples into Java is tough, as they use language specific [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=76&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Before starting the adventure of coding an application in Java for SharePoint Online, make sure you’re well prepared for the following points:</p>
<ul>
<li><strong>Documentation is rare</strong>. No code examples exist on MSDN other than for C# or VB.NET (and some SOAP signatures). Moreover, translating MSDN’s C# examples into Java is tough, as they use language specific imports. The best info I could find was a webcast with a java coding demo for SharePoint (in French:  <a href="http://www.microsoft.com/france/vision/Msdn-tv/Webcast.aspx?EID=7a725ed6-1d5a-4873-a7a6-541bc691c9f7">MSDN Webcast by Stève Sfartz</a>). The <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=d007f35e-375c-4b11-bc40-bc9082bb224a&amp;displaylang=en">SharePoint Online Developer Guide</a> and the <a href="http://msdn.microsoft.com/en-us/library/lists.lists.aspx">MSDN documentation</a> will be your best friends though.</li>
<li><strong>Microsoft’s WSDLs won’t generate easy to use POJOs</strong>. This is essentially because SharePoint Online’s SOAP Web Services are resource-orientated. This means you can send big and complex requests to SharePoint’s Web Services, but also that you’ll have to manipulate your objects like XML documents rather than objects. And the “XAML” structure used in the requests/responses isn’t always fully documented with examples on MSDN either.</li>
<li><strong>Consuming SharePoint Online’s WSDLs in your favorite Java IDE won’t necessarily work</strong>. I had to use the <a title="Axis homepage" href="http://ws.apache.org/axis/">Axis 1.4</a> from the command line to generate my Java classes for Netbeans (the generated classes couldn’t be compiled when imported from Netbeans wizard). Your mileage may vary&#8230;</li>
</ul>
<p>Therefore, if you have the possibility to use C# instead of Java, don’t think twice: use C#. You’ll save a lot of development and maintenance time. I wouldn’t recommend developing an application in Java if its size goes beyond the one of a small application or proof-of-concept.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=76&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/02/03/sharepoint-web-services-3-things-to-consider-before-coding-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>
	</item>
		<item>
		<title>Using external business data with SharePoint Online Part 1: Scenario and conception of a solution</title>
		<link>http://davidsit.wordpress.com/2010/01/17/using-external-business-data-with-sharepoint-online-part-1-scenario-and-conception-of-a-solution/</link>
		<comments>http://davidsit.wordpress.com/2010/01/17/using-external-business-data-with-sharepoint-online-part-1-scenario-and-conception-of-a-solution/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 16:13:24 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[concept]]></category>
		<category><![CDATA[connector]]></category>
		<category><![CDATA[external data]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[SharePoint Online]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=42</guid>
		<description><![CDATA[The first project I would like to put forward on this blog concerns the integration of external business data with Microsoft SharePoint Online. This theme concerned a part of my Bachelor’s thesis that I did last summer which was named “Electronic Documents Management Optimization In A Consulting Firm”.  I will share the parts that I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=42&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">The first project I would like to put forward on this blog concerns the integration of external business data with Microsoft SharePoint Online. This theme concerned a part of my Bachelor’s thesis that I did last summer which was named “Electronic Documents Management Optimization In A Consulting Firm”.  I will share the parts that I found the most interesting and challenging, in my opinion.</p>
<p><strong>Context</strong></p>
<p>First of all I would like to put some context on the topic that I will cover. The company I worked for was a small &#8220;deskless&#8221; RH consulting business that managed all of its information (addresses, meetings, projects, etc) through the web, on a custom built PHP-MySQL CRM (Customer Relationship Management) server. It was hosted by a local ISP on a linux server.</p>
<p>It soon became apparent that such a CRM wouldn&#8217;t be able to support a centralized document management system, which the company increasingly needed. Consequently, they had to find a solution available on the market.</p>
<p>The company finally settled for Microsoft&#8217;s cloud based solution, <a title="SharePoint Online" href="http://www.microsoft.com/online/sharepoint-online.mspx" target="_blank">SharePoint Online</a>, which is part of the Business Productivity Online Suite, to manage their documents. It turned out to be perfectly suited for such a small deskless company. It offered great functionality fora very low cost (thanks to the Software As A Service model, where you pay only for what you use), and low maintenance once set up.</p>
<p><strong>Conception of a solution</strong></p>
<p>One of the challenges of SharePoint Online is that there isn&#8217;t any<em> obvious </em>way to integrate <a title="SharePoint Online and external database interoperability" href="http://social.technet.microsoft.com/Forums/en/onlineservicessharepoint/thread/a43cce97-51b1-4bab-8f69-348c6aa848ca" target="_blank">external business data from a non-Microsoft source</a>.</p>
<p style="text-align:center;"><a href="http://davidsit.files.wordpress.com/2010/01/connector_abstract.png"><img class="size-medium wp-image-43 aligncenter" title="Connector schema" src="http://davidsit.files.wordpress.com/2010/01/connector_abstract.png?w=300&#038;h=236" alt="Abstract schema of a CRM, Connector and SharePoint Online interacting" width="300" height="236" /></a></p>
<p>This was however a very important point in my project, because alot of the company&#8217;s documents had to be organized by client’s names. And guess what: the clients names had to be the same in the CRM&#8217;s MySQL database and a SharePoint Online&#8217;s list.</p>
<p>But thanks to SharePoint Online’s Web Services, it was possible to build a <strong>connector</strong> in Java that that made the link between the CRM and SharePoint.</p>
<p><strong>It is important to note that the connector can&#8217;t be actioned from within SharePoint Online</strong>, as it is impossible at this time to deploy custom code on SharePoint&#8217;s cloud-based server. Therefore, clients information would need to be entirely manipulated from within the CRM (and therefore the connector), and the SharePoint clients list protected from users manual access.</p>
<p>Java was chosen because it could directly be deployed on the company’s rented LAMP server.</p>
<p>The point here is to show you that if don’t have a Microsoft infrastructure (Access database, Windows OS that can deploy C# code), but would like to integrate existent business data with a low-priced SharePoint Online solution, it is possible. I’ll use PHP and Java as examples.</p>
<p><strong>How it works</strong></p>
<p>The objective was to have the same names of the clients in the CRM and in a SharePoint Online’s clients list. The designed solution worked like this:</p>
<p style="text-align:center;"><a href="http://davidsit.files.wordpress.com/2010/01/connector_1.png"><img class="size-medium wp-image-44 aligncenter" title="SharePoint Online Connector interactions" src="http://davidsit.files.wordpress.com/2010/01/connector_1.png?w=300&#038;h=213" alt="SharePoint Online Connector interaction with external business data" width="300" height="213" /></a></p>
<ol>
<li>A collaborator types in a new client’s information in an HTML form on the CRM, from his computer.</li>
<li>The Apache server, which is running PHP, adds the client’s information in the local MySQL database, while sending the same info to a “Java to SharePoint connector” running on Tomcat (this is done with a <a title="PHP Java Bridge homepage" href="http://php-java-bridge.sourceforge.net" target="_blank">PHP-Java Bridge</a>).</li>
<li>The Java connector processes the received data and encapsulates it into an XAML request that is sent SharePoint Online’s ASMX 2.0 <a title="SharePoint's Lists Web Service on MSDN" href="http://msdn.microsoft.com/en-us/library/lists.aspx" target="_blank">Lists Web Service</a>.</li>
<li>The data is added in the list (which name was detailed in a properties file used by the connector). The list in SharePoint Online is the most restricted as possible for SharePoint Users: the whole point of building a connector is lost if clients information is manipulated from more than one place, for the simple reason that SharePoint Online can&#8217;t push those information outside of its walls!</li>
<li>SharePoint Online sends the result back to the connector, which is then passed to PHP, which in turn displays the result to the end user.</li>
</ol>
<p>The Java code used to build the connector and the implementation of the bridge with PHP will be described in further posts. Your comments are welcome!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=42&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/01/17/using-external-business-data-with-sharepoint-online-part-1-scenario-and-conception-of-a-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/01/connector_abstract.png?w=300" medium="image">
			<media:title type="html">Connector schema</media:title>
		</media:content>

		<media:content url="http://davidsit.files.wordpress.com/2010/01/connector_1.png?w=300" medium="image">
			<media:title type="html">SharePoint Online Connector interactions</media:title>
		</media:content>
	</item>
		<item>
		<title>Welcome to my new blog</title>
		<link>http://davidsit.wordpress.com/2010/01/13/welcome-to-my-new-blog/</link>
		<comments>http://davidsit.wordpress.com/2010/01/13/welcome-to-my-new-blog/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 13:58:56 +0000</pubDate>
		<dc:creator>David Dudok de Wit</dc:creator>
				<category><![CDATA[General IT]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://davidsit.wordpress.com/?p=6</guid>
		<description><![CDATA[Dear cyber visitor, Thanks for stopping by! Time has come for me to contribute some of my IT projects and experiments to the almighty web! Firstly, my posts will focus on the interaction possibilities between Microsoft SharePoint Online and non-Microsoft languages like Java, PHP, and JavaScript. I think this topic is pretty interesting because, as of today use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=6&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dear cyber visitor,</p>
<p>Thanks for stopping by! Time has come for me to contribute some of my IT projects and experiments to the almighty <em>web</em>!</p>
<p>Firstly, my posts will focus on the interaction possibilities between Microsoft SharePoint Online and non-Microsoft languages like Java, PHP, and JavaScript. I think this topic is pretty interesting because, as of today use cases, documentation and examples remain pretty rare. We&#8217;ll see after that!</p>
<p>The content will be split in multiple posts. I&#8217;ll upload relevant code and resources as well (yay!).</p>
<p>Here&#8217;s what I plan to post (the topics might change):</p>
<p><strong>Using external business data with SharePoint Online</strong></p>
<ul>
<li>Part 1: Scenario and conception of a solution</li>
<li>Part 2: Java and SharePoint Online&#8217;s Web Services</li>
<li>Part 3: Bridging PHP and Java</li>
<li>Part 4: Testing and conclusion</li>
</ul>
<p><strong>Extending SharePoint Online&#8217;s functionality with jQuery</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<ul>
<li><span style="font-weight:normal;">Part 1: Why a JavaScript plugin?</span></li>
<li><span style="font-weight:normal;">Part 2: Coding the plugin, its loading scheme and its UI</span></li>
<li><span style="font-weight:normal;">Part 3: Copy operations</span></li>
</ul>
<p>Thank you for visiting my blog. I&#8217;ll be happy hear your feedback on those posts.</p>
<p>David Dudok de Wit</p>
<p><a title="Creativity &amp; Innovation Blogs - Blog Catalog Blog Directory" href="http://www.blogcatalog.com/directory/technology/internet/internet_innovation"><img src="http://assets.blogcatalog.com/buttons/blogcatalog5.gif" alt="Creativity &amp; Innovation Blogs - Blog Catalog Blog Directory" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidsit.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidsit.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidsit.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidsit.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davidsit.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davidsit.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davidsit.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davidsit.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidsit.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidsit.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidsit.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidsit.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidsit.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidsit.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidsit.wordpress.com&amp;blog=11405976&amp;post=6&amp;subd=davidsit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davidsit.wordpress.com/2010/01/13/welcome-to-my-new-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1bf2e766bcb8bda23a0d6cad371d46b8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dok</media:title>
		</media:content>

		<media:content url="http://assets.blogcatalog.com/buttons/blogcatalog5.gif" medium="image">
			<media:title type="html">Creativity &#38; Innovation Blogs - Blog Catalog Blog Directory</media:title>
		</media:content>
	</item>
	</channel>
</rss>
