Skip to content

Recent Articles

6
Feb

Sharepoint 2010 – Client Object Model

Sample code for Sharepoint 2010 Client Object Model.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
using Microsoft.SharePoint.Client;
 
class Program
{
    static void Main()
    {
        using(var ctx = new ClientContext("http://mysharepoint"))
        {
            var list = ctx.Web.Lists.GetByTitle("Announcements");
            var items = list.GetItems(new CamlQuery());
            ctx.Load(items);
            ctx.ExecuteQuery();
 
            foreach (var item in items)
            {
                Console.WriteLine("Id: {0}, Title: {1}", item.Id, item["Title"]);
            }
        }
    }
}
5
Feb

WCF with Zend_Soap

If you want to get Zend Framework SOAP working as a WCF service, you must change line 85 in file Zend/Soap/AutoDiscover.php from:

85
86
87
88
protected $_operationBodyStyle = array(
    'use' => 'encoded',
    'encodingStyle' => "http://schemas.xmlsoap.org/soap/encoding/"
);

to:

85
protected $_operationBodyStyle = array('use' => 'literal');