Evaluation Criteria for SaaS/Cloud Platform Vendors
My company has been evaluating (and in some cases, selecting) SaaS offerings and one of the projects that I’m currently on has us considering such an option as well. So, I started considering the technology-specific evaluation criteria (e.g. not hosting provider’s financial viability) that I would use to determine our organizational fit to a particular […]
Hacking the Database Lookup functiod (continued)
Since it is using OLE, you can connect to whatever data source you want.
Below is a brief list of sources to connect to:
| Data Source | Sample Connection String |
| UDL | File Name={path.udl} |
| Sybase | Provider=Sybase.ASEOLEDBProvider;Server Name=thisservername,5000;Initial Catalog=thisdb;User Id=thisusername;Password=thispassword |
| SQL Server | Provider=sqloledb;Data Source=thisservername;Initial Catalog=thisdb;User Id=thisusername;Password=thispassword; Provider=sqloledb;Data Source=thisservername;Initial Catalog=thisdb;Integrated Security=SSPI; |
| Oracle | Provider=msdaora;Data Source=thisdb;User Id=thisusername;Password=thispassword; Provider=msdaora;Data Source=thisdb;Persist Security Info=False;Integrated Security=Yes; |
| MySQL | Provider=MySQLProv;Data Source=thisdb;User Id=thisusername;Password=thispassword; |
| Informix | Provider=Ifxoledbc.2;User ID=thisusername;password=thispassword;Data Source=thisdb@thisservername;Persist Security Info=true |
| FoxPro | Provider=vfpoledb.1;Data Source=c:\directory\thisdb.dbc;Collating Sequence=machine |
| Firebird | User=SYSDBA;Password=thispassword;Database=thisdb.fdb;DataSource=localhost;Port=3050;Dialect=3;Charset=NONE;Role=;Connection lifetime=15;Pooling=true;MinPoolSize=0;MaxPoolSize=50;Packet Size=8192;ServerType=0 |
| Exchange | oConn.Provider = “EXOLEDB.DataSource” oConn.Open = “http://thisservername/myVirtualRootName” |
| Excel | Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\thisspreadsheet.xls;Extended Properties='”Excel 8.0;HDR=Yes;IMEX=1″‘ |
| DBase | Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\directory;Extended Properties=dBASE IV;User ID=Admin;Password= |
| DB2 | Provider=IBMDADB2;Database=thisdb;HOSTNAME=thisservername;PROTOCOL=TCPIP;PORT=50000;uid=thisusername;pwd=thispassword; |
| Access | Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\directory\thisdb.mdb;User Id=admin;Password=; |
You can access a lot more sources. Here is a list of sources you can check against:
Another thing is that if you wanted to put a where clause in your statement to limit the data that is being returned, the forth argument in the Database Lookup functiod is the place to put it. BEWARE, you need to make sure that the column that you are matching with the first argument is correct.
Pro BizTalk 2009 Book
I have just submitted my chapters for the new Pro BizTalk 2009 book from APress. You can also find information about the book on Amazon.
I am co-authoring along with George Dunphy, Harold Campos, Peter Kelcey, Sergei Moukhnitski and David Peterson.
The book will be available this summer.
Using jQuery in SharePoint to Display Notifications for Open Tasks
In my previous post I explained how you can make use of the Lists.asmx web service of SharePoint, to load list items by using the jQuery Javascript library. The example discussed in that post is simple and easy to understand, but very, very boring. Let’s try to do something useful with that technique: display fancy, unobtrusive notifications for open tasks, when a user visits a SharePoint site. The screenshot below shows the result, but it’s static. In real life the user would see the yellow boxes popping up, and after a couple of seconds they would disappear again (they don’t block the user interface at all).
To display these notifications I’ll use the excellent jGrowl extension for jQuery. So to make use of this demo, you’ll need to upload both the jquery.jgrowl_minimized.js and jquery.jgrowl.css files to SharePoint (check the download at the end of this post to get the files). The code below assumes that those two files, and the jQuery library itself, are uploaded to a document library called Shared Documents (which is created by default in a Team Site).
<script type=”text/javascript” src=”Shared Documents/jquery-1.3.2.min.js”></script>
<script type=”text/javascript” src=”Shared Documents/jquery.jgrowl_minimized.js”></script>
<link href=”Shared Documents/jquery.jgrowl.css” rel=”Stylesheet”></link>
<script type=”text/javascript”>
$(document).ready(function() {
var soapEnv =
“<soapenv:Envelope xmlns:soapenv=’http://schemas.xmlsoap.org/soap/envelope/’> \
<soapenv:Body> \
<GetListItems xmlns=’http://schemas.microsoft.com/sharepoint/soap/’> \
<listName>Tasks</listName> \
<viewFields> \
<ViewFields> \
<FieldRef Name=’Title’ /> \
<FieldRef Name=’Body’ /> \
</ViewFields> \
</viewFields> \
<query> \
<Query><Where> \
<And> \
<Eq> \
<FieldRef Name=’AssignedTo’ /> \
<Value Type=’Integer’><UserID Type=’Integer’ /></Value> \
</Eq> \
<Neq> \
<FieldRef Name=’Status’ /> \
<Value Type=’Choice’>Completed</Value> \
</Neq> \
</And> \
</Where> \
</Query>\
</query> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>”;
$.ajax({
url: “_vti_bin/lists.asmx”,
type: “POST”,
dataType: “xml”,
data: soapEnv,
complete: processResult,
contentType: “text/xml; charset=\”utf-8\””
});
});
function processResult(xData, status) {
$.jGrowl.defaults.position = “bottom-right”;
$.jGrowl.defaults.life = 10000;
var firstMessage = true;
$(xData.responseXML).find(“z\\:row”).each(function() {
if(firstMessage)
{
firstMessage = false;
$.jGrowl(“<div class=’ms-vb’><b>You have open tasks on this site.</b><div>”,
{
life: 5000
}
);
}
var messageHtml =
“<div class=’ms-vb’>” +
“<a href=’Lists/Tasks/DispForm.aspx?ID=” + $(this).attr(“ows_ID”)
+ “&Source=” + window.location + “‘>” +
“<img src=’/_layouts/images/ITTASK.GIF’ border=’0′ align=’middle’> ” +
$(this).attr(“ows_Title”) + “</a>” +
“<br/>” + $(this).attr(“ows_Body”) +
“</div>”;
$.jGrowl(messageHtml);
});
}
</script>
Since we’d like to display those notifications when a user visits the site, we need to put a Content Editor Web Part of the home page (typically /default.aspx). In this content editor web part, copy and paste the Javascript code from above. In this code once again, first the SOAP envelope message is constructed. Notice that both the Title and Description fields are requested (the internal name of the Description field is Body). In the query element two conditions are set; the AssignedTo field should be equal to the currently logged on user, and the Status field can’t be equal to Completed. The message is POST-ed to the Lists.asmx web service by using jQuery’s ajax function.
The response of the web service call is processed in the processResult function. For every row element in the result, the jGrowl function is called to display a notification. The contents of such a notification are a small HTLM string containing a link to the task, and the body of the task. So that’s the story of how a small piece of Javascript code can have a pretty nice result in SharePoint! 🙂
You can download the source code for this demo here. The zip file contains the necessary libraries and CSS files (which you have to upload to the Shared Documents document library for example) and the code you have to copy/past in a Content Editor Web Part (using the Source Editor button!). Additionally you can also find an exported web part (.dwp file) in the zip file, which you can very easily import or add to the web part gallery of a site (so you don’t have to copy/past the code yourself).
Two nodes on same level with same name but different namespace
Hi all
Today I encountered something I have never seen before, when creating a map.
The issue occurs because my customer had a schema that imports two other schemas,
both of which have an element called “metadata” – but naturally the two schemas have
different target namespaces.
The main schema imports both, and has two records just below the root, and these two
records reference each of the two metadata elements in the two imported schemas.
So the first schema could look like this:
And the second schema could look like this:
So both have an element named “metadata” but one is in the namespace “http://TwoElementsDifferentNamespace.MetadataOne”
and the other is in the namespace “http://TwoElementsDifferentNamespace.MetadataTwo”.
After that, I create the schema that impors both:
As you can see it imports the first two schemas, and has to elements that reference
each of the metadata elements form the two first schemas.
Also, I crated an output schema that just has three elements and then I created this
map:
Pretty simple. Now, the issue comes when compiling, because I get this error:
Exception Caught: The map contains a reference to a schema node that is not valid.
Perhaps the schema has changed. Try reloading the map in the BizTalk Mapper.
The XSD XPath of the node is: /*[local-name()='<Schema>’]/*[local-name()=’Root’]/*[local-name()=’metadata’]/*[local-name()=’Field2′]
o the first try was to reload the schema – but that didn’t help – it just broke one
of my links.
In he end I found out, that the issue is that the links are stored like this in the
.BTM file:
<Link LinkID="1" LinkFrom="/*[local-name()=’<Schema>’]/*[local-name()=’Root’]/*[local-name()=’metadata’]/*[local-name()=’Field1′]"
LinkTo="/*[local-name()=’<Schema>’]/*[local-name()=’OutputRoot’]/*[local-name()=’Field1′]"
Label="" />
<Link LinkID="2" LinkFrom="/*[local-name()=’<Schema>’]/*[local-name()=’Root’]/*[local-name()=’SomeFields’]/*[local-name()=’Field3′]"
LinkTo="/*[local-name()=’<Schema>’]/*[local-name()=’OutputRoot’]/*[local-name()=’Field2′]"
Label="" />
<Link LinkID="3" LinkFrom="/*[local-name()=’<Schema>’]/*[local-name()=’Root’]/*[local-name()=’metadata’]/*[local-name()=’Field2′]"
LinkTo="/*[local-name()=’<Schema>’]/*[local-name()=’OutputRoot’]/*[local-name()=’Field3′]"
Label="" />
So. basically, the .BTM file saves links as XPath expressions WITHOUT the namespaces.
So naturally, this has to go wrong, when there are two “metadata” elements on the
same level in the schema.
The way to solve this is to choose the properties of the map and disable the “Ignore
Namespaces for Links” like this:
After setting this property, the links change having namespaces inside the .BTM file
and everything is just fine.
One might wonder why the namespaces are not enabled as the default, since they do
make the solution more robust. Well, the reason is simple; If the namespaces are in
all the links, and you change for instance the namespace of the root node, then ALL
links in the map gets broken. So actually, not having the namespaces in the links
make the solution more robust.
So I hope this can help someone.
You can download the solution here:
—
eliasen
BizTalk Adapter Pack 2.0 now Released!!!
Great news folks with the Adapter pack now released.
This is a WCF .NET based set of ’adapters’ that can be used within BizTalk or in any
.NET process – such as SharePoint.
(The visual studio extensions allows you to rapidly create a WCF based Service to
host your adapters)
The Adapter pack has:
– SQL Adapter (faster, newer, improved bionic adapter)
– Siebel
– SAP
– Oracle DB
– Oracle ES
Here’s the links that you’ll need – enjoy!
|
Item
|
Link
|
|
Product
|
|
|
WCF |
http://go.microsoft.com/fwlink/?LinkId=147367
|
|
Adapter
|
120
|
|
SQL |
http://go.microsoft.com/fwlink/?LinkId=147379
|
|
Documentation
|
|
|
MSDN |
http://go.microsoft.com/fwlink/?LinkId=149364
|
|
Download |
http://go.microsoft.com/fwlink/?LinkId=147355
|
|
Download |
http://go.microsoft.com/fwlink/?LinkId=147364
|
|
Download |
http://go.microsoft.com/fwlink/?LinkId=147377
|
|
Download |
http://go.microsoft.com/fwlink/?LinkID=145144
|
Look Me Up at Microsoft TechEd 2009
I’ll be 35 miles from home next week while attending Microsoft TechEd in Los Angeles. In exchange for acting as eye candy during a few shifts at Microsoft’s BizTalk booth and pimping my new book, I get to attend any other sessions that I’m interested in. Not a bad deal.
You can find me in the […]
Querying SharePoint List Items using jQuery
Due to popular demand I’ve created another sample of how you can make use of the jQuery Javascript library in your SharePoint sites. This example uses SharePoint’s Lists.asmx web service to retrieve all the list items of a specific list. In my previous posts I showed how you could use jQuery in SharePoint Site Pages (regular .aspx pages uploaded to a Document Library), so let’s do something different now; let’s use jQuery in a plain Content Editor Web Part.
To try this sample navigate to the home page (usually /default.aspx) of a SharePoint site that has a list with some list items in it, in my code I’ll use the Task list of a plain vanilla Team Site. Switch the page to Edit mode (Site Actions, Edit Page), and add a new instance of the Content Editor Web Part to the page. In the properties of that web part, copy and paste the following code using the Source Editor button.
<script type=”text/javascript” src=”http://jqueryjs.googlecode.com/files/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> \
<GetListItems xmlns=’http://schemas.microsoft.com/sharepoint/soap/’> \
<listName>Tasks</listName> \
<viewFields> \
<ViewFields> \
<FieldRef Name=’Title’ /> \
</ViewFields> \
</viewFields> \
</GetListItems> \
</soapenv:Body> \
</soapenv:Envelope>”;
$.ajax({
url: “_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(“z\\:row”).each(function() {
var liHtml = “<li>” + $(this).attr(“ows_Title”) + “</li>”;
$(“#tasksUL”).append(liHtml);
});
}
</script>
<ul id=”tasksUL”/>
On the first line the jQuery library is loaded from googlecode.com. To make this your, your client browser needs to have Internet access of course. Alternativly you can host the jQuery library yourself (see my previous examples) or even load the jQuery library in every page using the SmartTools.jQuery component. After that a function is attached to the jQuery document ready event. In this function the SOAP envelope message is constructed (the soapEnv variable). If you’d like to see the code getting list items from another list than the Task list, you’d have to change the listName element. The second part POST-ing the SOAP envelope to the web service by using jQuery’s ajax function. When the web service comes back with the result, the processResult method is called. In this function a loop is created over every row element (in the namespace z). Notice that “z:row“ escapes in Javascript to “z\\:row“. For every row element a new li HTML element is added to the ul element with ID tasksUL. And that’s it! You can see the result in the screenshot below.
DonXml joins Tellago
For the last few months I have been planning to start blogging about the new addition to our Architecture team at Tellago . One of our goals when we started Tellago , around a year ago, was to hire the best and the brightest and provide them with an environment…(read more)