by community-syndication | Apr 10, 2009 | BizTalk Community Blogs via Syndication
In my previous post I showed how to make a call to SharePoint’s Lists.asmx web service with the jQuery library to retrieve information about the Lists and Document Libraries that are available on a specific SharePoint Site. In the comments of that post, one of the readers asked if it would be possible to create a new item in a List using the same technique. Of course this is possible, you just need to make use of the UpdateListItems web method (yeah, the name of that method is not very intuitive). Here is a quick example!
First let’s create the UI (in this example I’ll use a basic Site Page) to allow the user to enter a Title for the new task, and a button to do the action.
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderMain”>
<p>
Task Title:
<input id=”newTaskTitle” type=”text” />
<input id=”newTaskButton” type=”button” value=”Create Task” />
</p>
</asp:Content>
Next let’s create a Javascript function that will create a new item in a Task list. In the Javascript function I’m declaring two variables that will contain the XML which will be sent to the SharePoint Lists.asmx web service. The first variable (I called it batch) contains the CAML to create a new item. For simplicity the CAML only provides a value for the Title field, add more fields if you’d like. The second variable (called soapEnv) is the SOAP Envelope XML which wraps the batch XML. Notice that in the SOAP Envelope the name of the list is mentioned in which we’re going to create a new item (in this case the Task list). Finally the jQuery ajax function is used to POST the data to the Lists.asmx web service. (If you test this code make sure you update the url option with the URL of your site).
function CreateNewItem(title) {
var batch =
“<Batch OnError=\”Continue\”> \
<Method ID=\”1\” Cmd=\”New\”> \
<Field Name=\”Title\”>” + title + “</Field> \
</Method> \
</Batch>”;
var soapEnv =
“<?xml version=\”1.0\” encoding=\”utf-8\”?> \
<soap:Envelope xmlns:xsi=\”http://www.w3.org/2001/XMLSchema-instance\” \
xmlns:xsd=\”http://www.w3.org/2001/XMLSchema\” \
xmlns:soap=\”http://schemas.xmlsoap.org/soap/envelope/\“> \
<soap:Body> \
<UpdateListItems xmlns=\”http://schemas.microsoft.com/sharepoint/soap/\“> \
<listName>Tasks</listName> \
<updates> \
” + batch + “</updates> \
</UpdateListItems> \
</soap:Body> \
</soap:Envelope>”;
$.ajax({
url: “http://yoursite/_vti_bin/lists.asmx”,
beforeSend: function(xhr) {
xhr.setRequestHeader(“SOAPAction”,
“http://schemas.microsoft.com/sharepoint/soap/UpdateListItems“);
},
type: “POST”,
dataType: “xml”,
data: soapEnv,
complete: processResult,
contentType: “text/xml; charset=utf-8”
});
}
The jQuery ajax function call has a complete option which points to a function, in this function you can process the result as follows:
function processResult(xData, status) {
alert(status);
}
The status parameter is a string which can be for example success or error. Finally in the ready event of the document, we’ll hook up the click event of the button so the CreateNewItem function is called, with the value of the textbox as the parameter.
$(document).ready(function() {
$(“#newTaskButton”).click(function() {
CreateNewItem($(“#newTaskTitle”).val());
});
});
That’s it! If you put all the code in a simple Site Page, upload the page to a Document Library in a SharePoint site, and now you can create Task list items by only using Javascript! The sample code can be downloaded in the following zip file. The zip file also contains the jQuery library which you can upload to the same Document Library if it isn’t already loaded with the help of the SmartTools.jQuery component for example.
by community-syndication | Apr 10, 2009 | BizTalk Community Blogs via Syndication
If you have issues with the ftp adapter, below listed are a few hot fixes from Microsoft:
The FTP adapter stops processing the file transfer in a Microsoft BizTalk Server 2006 environment after a network connection recovers
The BizTalk FTP Adapter reports that no files are available even though the files exist when you try to connect to a GXS server in BizTalk Server 2006 R2
The BizTalk 2006 FTP adapter does not retrieve a file from an FTP server when you issue the RETR command
If there are any more out there, let me know
by community-syndication | Apr 10, 2009 | BizTalk Community Blogs via Syndication
Microsoft recently posted a set of samples that show how to host WCF services as well as Silverlight clients in the Windows Azure fabric. They highlight some of the known issues and workarounds and will help you get started if you’re interested in WCF + Azure.
You can find them on MSDN here. Kudos Yavor!

by community-syndication | Apr 10, 2009 | BizTalk Community Blogs via Syndication
Now that BizTalk Server 2009 is RTM the version number overview table that I posted earlier (here and here) can be updated.
The new table:
Product name
Service pack
Version number
BizTalk Server 2004
3.0.4902.0
BizTalk Server 2004
SP1
3.0.6070.0
BizTalk Server 2004
SP2
3.0.7405.0
BizTalk Server 2006
3.5.1602.0
BizTalk Server 2006 R2
3.6.1404.0
BizTalk Server 2009 (beta1)
3.8.104.5
BizTalk Server 2009
3.8.368.0
As mentioned in the previous post this information will probably also appear in […]
by community-syndication | Apr 9, 2009 | BizTalk Community Blogs via Syndication
Hi guys,
If you’re looking to get into how to host WCF Services on Azure, showing some cool
graphics, then these samples are for you.
Silverlight v3.0 (beta), and important samples showing how to take your existing WCF
Services and hosting/housing them in Auze (there’s a few gotchas – and these samples
have work arounds 🙂 )
Grab them here –
http://code.msdn.microsoft.com/wcfazure
by community-syndication | Apr 9, 2009 | BizTalk Community Blogs via Syndication
A quick update to Solution Clone was posted today to handle some new file types created in the BizTalk Deployment Framework v5.0. You can find it here.
by community-syndication | Apr 9, 2009 | BizTalk Community Blogs via Syndication
We’re excited to announce that Shy Cohen has joined Pluralsight as an instructor/author. He comes to us directly from Microsoft where he worked as a Senior Program Manager in the Connected Systems division. At Pluralsight, he’ll be focusing his efforts in the areas of SOA and cloud computing building courses on architecture and design, but he’ll also share his talents and expertise with our customers in the areas of WCF and “Oslo”. Shy has a passion for teaching and engaging with customers to help them better apply technology to improve their business. As a Microsoft MVP (in the area of solution architecture), Shy brings the total number of MVP’s at Pluralsight up to 13.
The first course Shy will be working on for Pluralsight is called SOA and Cloud Computing Fundamentals. You can read more about Shy on his profile page on pluralsight.com. You can also follow him in real-time on Twitter at http://twitter.com/shycohen.
We’re excited to have him. Welcome Shy!

by community-syndication | Apr 9, 2009 | BizTalk Community Blogs via Syndication
If you read this blog you probably know that besides the web user interface, SharePoint also exposes some interfaces which you can use from code: the SharePoint object model and the SharePoint web services. The object model of SharePoint can only be used by code/applications that are running on a SharePoint server in your Server Farm, so you can’t use the object model on client machines. The SharePoint web services can be used of course across a network boundary, that’s what they are built for! In this post I’m going to show you how you can access the out-of-the-box SharePoint web services by making use of the jQuery Javascript library. First let’s see what you can do with this technique: download this zip file that contains an ASPX page (a basic Site Page without any code behind), and the jQuery Javascript library (in case you don’t have it already). Upload the two individual files (not the zip file) in the root of a Document Library in any of your SharePoint sites. You can do this by making use of the web user interface; you don’t have to touch anything on the server itself. When done, just click on the link of the uploaded ASPX and you’ll see following page:
Probably you’re not really impressed but think about the fact that this page is just an ASPX file you’ve uploaded through the web user interface, there is absolutely no code behind involved (which would have been blocked by SharePoint’s default security settings). The details of the SharePoint lists are loaded by making use of Javascript code that calls the web SharePoint lists.asmx web service.
So how do you call a SharePoint web service in Javascript code; well you can use the XmlHttpRequest object and write lots of boring code, or you can make use of a Javascript library that wraps this XmlHttpRequest object and exposes a nice and easy interface. In this demo I’ll use the jQuery Javascript library, so the first thing that you’ll need to do is to make sure the page is loading that library:
<script type=”text/javascript” src=”jquery-1.3.2.min.js” mce_src=”jquery-1.3.2.min.js”></script>
If you already configured your SharePoint site so the jQuery library is loaded (for example by making use of the SmartTools.jQuery component), you can skip this line of course.
When the page is loaded, the Lists web service (e.g. http://yoursite/_vti_bin/lists.asmx) of SharePoint needs to be called; this can be accomplished by making use of the jQuery’s ajax method. This method can post the necessary SOAP envelope message to the Lists web service. The XML of the SOAP envelope can easily be copied from the .NET web service test form of the desired web method (e.g. http://yoursite/_vti_bin/lists.asmx?op=GetListCollection). In the code below, a call to the GetListCollection web method is made when the page is loaded. The complete parameter of the ajax method is actually a pointer to another Javascript function (which we’ll implement later on) that will be called asynchronously when the web service call is done. Don’t forget to update the url parameter with your SharePoint site’s URL!
$(document).ready(function() {
var soapEnv =
“<soapenv:Envelope xmlns:soapenv=’http://schemas.xmlsoap.org/soap/envelope/’> \
<soapenv:Body> \
<GetListCollection xmlns=’http://schemas.microsoft.com/sharepoint/soap/’> \
</GetListCollection> \
</soapenv:Body> \
</soapenv:Envelope>”;
$.ajax({
url: “http://yoursite/_vti_bin/lists.asmx“,
type: “POST”,
dataType: “xml”,
data: soapEnv,
complete: processResult,
contentType: “text/xml; charset=\”utf-8\””
});
});
As I already mentioned, the processResult function is called when the response XML of the web service call is received. In this method a loop is created which will iterate over every List element of the response XML. For every List element a <li></li> element is added to the element with the ID attribute set to data.
function processResult(xData, status) {
$(xData.responseXML).find(“List”).each(function() {
$(“#data”).append(“<li>” + $(this).attr(“Title”) + “</li>”);
});
}
This data element is the actual <ul></ul> list in HTML:
<ul id=”data”></ul>
When you put everything together in a Site Page, this is the result:
In the zip file mentioned in the beginning of this post, you can find an extended version of the processResult function which will display some additional metadata for every list (like the ID, ItemCount etc). The entire contents of basic version of the Site Page built in this post goes as follows:
<%@ Page Language=”C#” MasterPageFile=”~masterurl/default.master” %>
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderAdditionalPageHead”>
<script type=”text/javascript” src=”jquery-1.3.2.min.js” mce_src=”jquery-1.3.2.min.js”></script>
<script type=”text/javascript”>
$(document).ready(function() {
var soapEnv =
“<soapenv:Envelope xmlns:soapenv=’http://schemas.xmlsoap.org/soap/envelope/’> \
<soapenv:Body> \
<GetListCollection xmlns=’http://schemas.microsoft.com/sharepoint/soap/’> \
</GetListCollection> \
</soapenv:Body> \
</soapenv:Envelope>”;
$.ajax({
url: “http://yoursite/_vti_bin/lists.asmx“,
type: “POST”,
dataType: “xml”,
data: soapEnv,
complete: processResult,
contentType: “text/xml; charset=\”utf-8\””
});
});
function processResult(xData, status) {
$(xData.responseXML).find(“List”).each(function() {
$(“#data”).append(“<li>” + $(this).attr(“Title”) + “</li>”);
});
}
</script>
</asp:Content>
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderMain”>
<ul id=”data”></ul>
</asp:Content>
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderPageTitleInTitleArea”>
List Details
</asp:Content>
<asp:Content runat=”server” ContentPlaceHolderID=”PlaceHolderPageTitle”>
List Details
</asp:Content>
by community-syndication | Apr 8, 2009 | BizTalk Community Blogs via Syndication
If you’re working with WCF services hosted in Azure (I blogged about my first experience putting a service up there here), some new samples have just been published at http://code.msdn.microsoft.com/wcfazure.
Enjoy!
Technorati Tags: WCF,Azure,Cloud
by community-syndication | Apr 8, 2009 | BizTalk Community Blogs via Syndication
.
BizTalk 2009: notorious Microsoft ADO MD.NET 9.0 and 10.0
When I was installing the BizTalk 2009the Setupasked these prerequisite components:
Microsoft ADO MD.NET 9.0 and
Microsoft ADO MD.NET 10.0
Idid not have Internet access and I had to manually search for these components.
Seems it is not a simple googling. 🙂
After painful search I’ve found them here:
1) ADO MD.NET 9.0:
Page “Feature Pack for Microsoft SQL Server 2005 – November 2005” – http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en
[- follow PageDown to]
Microsoft ADOMD.NET
…
X86 Package (SQLServer2005_ADOMD.msi) – 3302 KB
X64 Package (SQLServer2005_ADOMD_x64.msi) – 5430 KB
IA64 Package (SQLServer2005_ADOMD_ia64.msi) – 6906 KB
2) ADO MD.NET 10:
Page “Microsoft SQL Server 2008 Feature Pack, October 2008” – http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=228de03f-3b5a-428a-923f-58a033d316e1
[- follow PageDown to]
Microsoft ADOMD.NET
…
X86 Package(SQLSERVER2008_ASADOMD10.msi) – 4312 KB
X64 Package (SQLSERVER2008_ASADOMD10.msi) – 9263 KB
IA64 Package(SQLSERVER2008_ASADOMD10.msi) – 6776 KB
As you can seethere isabad inconsistency in the names!
Hopethis articlesaves you several minutes.