27th April 2009: BizTalk Server 2009 is officially released for general availability.

For some resources to get started, refer to Richard Seroter's blog here, and Thiago's blog here.

The very first web service that we usually create in any programming language, turned out to be not-so-simple in BizTalk. Here's classic example:

public class Service1 : System.Web.Services.WebService
{

    [WebMethod]
    public string HelloWorld()
    {
        return "Hello World";
    }
}

 

And the problem is two-fold in BizTalk Server (which strictly adhering to message schemas):

1. If BizTalk Server is supposed to consume such web service, it is fairly known issue that we'll need to generate an "empty" web message as input parameter to be passed to the method being called. Many sites have cited the resolution, so I'm not going to describe this case anymore.

Error message when you try to build a project in BizTalk Server 2006

2. The more problematic case (for me) is when we're supposed to expose such service using BizTalk Server. Orchestration requires a trigger message to kick-off the orchestration. But, if i don't have input parameter, how do I tell the web service published orchestration to start? The orchestration does expecting a multipart message with no message part (it's a web message). Following standard procedure of publishing web service based on orchestration with request/response port, the signature of the web methods are created just fine.

BTS_WS_HelloWorld

And my code in client application look like this:

textBox3.Text = test.HelloWorld();

where "test" is the web reference to the web service above. Notice that there is no input parameter here. But alas, I got this error:

"Internal SOAP Processing Failure"

Great! No event log entry. No message tracked in BizTalk  Admin Console. IIS log shows error 500. Scratching my head...

After some readings, found out that it could be due to the similar issue of no#1 above. Which means... I'll need an input parameter!!! :o

http://geekswithblogs.net/cyoung/articles/4634.aspx

http://blogs.msdn.com/richardbpi/archive/2006/10/23/advanced-biztalk-2006-web-services-part-ii.aspx

http://www.jonfancey.com/default.aspx (somehow i can't find back the article that i've just read)

So, workaround is, instead of having a multipart message with no message part as incoming message, i created a normal multipart message with 1 bodypart. Any XML schema based body part. Sure enough, the webservice that was generated by the web service publishing wizard required an input parameter for the method. So, I have to open up the web service solution, removed the input parameter and add defaulting invokeParam code a bit. Rebuild, and it works. It's as simple as that. Here's the part that i've changed (on the asmx code behind. Code has been simplified.):

public string HelloWorld()
{

...

// Parameter information
USoup.WS101.XsdTypesBody.EmptyInputParam EmptyBody = new USoup.WS101.XsdTypesBody.EmptyInputParam();
EmptyBody.SomeValue = System.DateTime.Now.ToLongTimeString();

...

}

Note: "USoup.WS101.XsdTypesBody.EmptyInputParam" is the multipart message that has bodypart. "SomeValue" is just a node in the message.

http://www.zdnetasia.com/news/internet/0,39044908,62049600,00.htm?scid=nl_z_ntnd

Great! Next time we should pay George Lucas or Steven Spielberg royalty fees when we build the next inter-galactica space shuttle. Maybe I should have changed my job. Is multi-touch technology patented yet? Or how about the glass display panel?

Those who have seen the Microsoft Surface, or the Minority Report, will understand this technology: Microsoft Touchwall, dubbed as "Intelligent Whiteboard". What's that, you asked? Basically, having Surface multi-touch and movement recognition capability on any flat surface (or so it seems from the video). Bill Gates was showing the Touchwall during the CEO Summit 2008, using whiteboard. Yeah, plain 'ol whiteboard. Imagine touching, poking, dragging your fingers on the whiteboard, while the images on the whiteboard is being moved/scaled/resized/played accordingly.

However, there was one big question here: if the "Intelligent Whiteboard" is supposed to be shown to audiences such as those powerpoint slides on projector, will it work when the presenter (in this case, Bill Gates) keep on blocking audience view??? *scratch head*

Note to self:

If UI doesn't work, there's always command prompt.

http://support.microsoft.com/kb/222444

I was surprised and worried.

Surprised, because my younger sister had just asked me about checking on her database normalisation homework. Apparently her school has taught them database normalisation (which means, her school taught them about relational database concept too, which means her school also taught them about computing, and perhaps a little bit of software development). And she's still 1.5 years away from graduating from her high school!

Worried, because usually her school have about hundreds (and perhaps close to a thousand) students from her batch alone! (It is quite a big school, actually.) Who knows what else they could learn there. SOA? Corporate governance? Web 2.0? And these could be the batch that probably could do my current job by the time they graduate from university (or earlier)!!!! :o (At this time, you should imagine a scene from the Star Wars: Attack of the Clones, where the clones are ready for deployment! Or the robots from i, Robot!)

(Image referenced from: http://news.bbc.co.uk/media/images/39912000/jpg/_39912096_i_robot_pa.jpg)

Okay, I'm not going to debate on which 1 is better between VMWare and Virtual PC. But, if you used Virtual PC, one of the limitation is that the virtual machine can't recognise the USB port that we have on the host machine. Well, if you insist to be religiously devoted to Virtual PC, you can use USB Redirector, a small application that allows one machine to "connect" to a remote USB port. Yeah, remote. Through a TCP/IP port. And not only limited to virtualization environment. Think of it as if you're connecting to a network printer.

The catch? Well, it's not a freeware... Now where's my VMWare installer again.

Have been trying out the BizTalk 2006 R2 RFID for the past 2 days, I find that it "could" be a very powerful engine. Well, there's still a lot of room for me to explore, and i'm still trying to make the sense of its existence yet (perhaps because it is something quite new, just like when BizTalk server was introduced back in year 2000). But that shouldn't stop your interest, if you would like to know more about it. So here it goes: What's in the package?

To get started, perhaps we'll need a little bit of clarification. Similar to BizTalk Services that i mentioned before, BizTalk 2006 R2 RFID is a stand-alone application, although it's packaged within BTS 2006 R2. That means, you do not need a BizTalk Server to start with! (And all the while I was trying to get a copy of BTS 2006 R2 just to test on its RFID Embarrassed) But, BizTalk 2006 R2 RFID can leverage on some features of BizTalk Server 2006, namely the powerful yet cryptic Business Rule Engine and Business Activity Monitoring.

So, without holding you back, view the end to end demo scenario, go download the trials (that means the BTS 2006 R2), look for the samples, case studies, try it out! If possible, get the RFID readers and some tags. There are a few low cost providers (will try to find Singapore based). But, should you not be able to get a reader, that shouldn't stop you, as using the RFID Manager, you can simulate a RFID reader. Cool huh!

I'll post a few more of it later on. I'll need to re-composing my thoughts first. :)

Have you ever be given a task to use SQL Server T-SQL to find out the date value of next day, at 00 hour? Say, now is '2007-10-26 13:30:50', and you need to get a '2007-10-27 00:00:00'?

Naturally, I think most of us will do something like this:

declare @today datetime

declare @tomorrow datetime

set @today = convert(datetime, convert(nvarchar(4), datepart(yyyy, getdate())) + convert(nvarchar(2), datepart(mm, getdate())) + convert(nvarchar(2), datepart(dd, getdate())))

set @tomorrow = dateadd(dd, 1, @today)

A lot of datepart and convert involved just to get the day/month/year value. There is a much simpler way actually, considering that datetime internal value is in fact numeric.

declare @today datetime

declare @tomorrow datetime

set @today = convert(bigint, dateadd(hh, -12, getdate()))

set @tomorrow = dateadd(dd, 1, @today)

Note the part that convert datetime to bigint. That's where the rounding took place. Let's step back a little bit and see how that works.

select getdate() as datetimeType, convert(bigint, getdate()) as bigintType, convert(decimal(18,12), getdate()) as decimalType

 

datetimeType            bigintType decimalType

------------            ---------- -----------

2007-10-26 13:50:27.560 39380      39379.576707870372

 

(1 row(s) affected)

From the SQL query above, we can see that a datetime can be converted to decimal type. The numbers on the left hand side of the "." denotes the number of days since "1900-01-01 00:00:00". The ones on the right hand side denotes the fraction of milliseconds in a day. That means, "1.0" means 1 day, means 24 hour, means 1440 minutes, means 86400 seconds, means 86400000 milliseconds. That means, this query below:

select convert(datetime, (convert(decimal(18,12), @tomorrow) + (2.0000000000000/24))) as tom_2am

is equivalent to "2007-10-27 02:00:00.000". Cool huh? But of course, the query below:

select dateadd(hh, 2, @tomorrow) as tom_2am

is a lot easier to understand. :D

Oh? Why "dateadd(hh, -12, getdate())", you ask? That's because of the rounding during conversion to bigint. So, let's see a few time during the day:

select convert(decimal(18,12),@dt)

decimal(18,12) bigint
2007-10-26 00:00:00 39379.000000000000 39379
2007-10-26 03:00:00 39379.125000000000 39379
2007-10-26 12:00:00 39379.500000000000 39380
2007-10-26 15:00:00 39379.625000000000 39380
2007-10-27 00:00:00 39380.000000000000 39380

Any time before 12 noon on the day (< 0.5 in numeric) will be rounded down. Any other time will be rounded up. So, if we want to get today at mid night time value, we will need a source range from yesterday noon to today before noon, that can be rounded to today midnight. Hence, the "-12 hours" above.

 

PS: I have always wanted to write about this, but since I don't think it'll make any much difference to programming, I've always canceled writing this. Until I asked myself, "how worse can writing this be?", and I don't have the answer. :D If you have a better ways of doing this, please let us know.

This might interest Windows Mobile apps developers out there. Tan Loke Uei (Microsoft's technical product manager of the Mobile Communications Business division) mentioned in his blog that one of his buddy, Richard Jones (of Best Developer Award fame), wrote a Web SERVER in .NET Compact Framework that runs on a Windows Mobile device!

Just imagine the possibilities then.

My friends and colleagues keep on asking me about the blue screen of death that i keep on gettin on my laptop. So, to feed their (and perhaps your) curiosity, here's how I get it. From sysinternals website:

 http://www.microsoft.com/technet/sysinternals/Utilities/BlueScreen.mspx

Enjoy!

Cool, finally I have some hard disk space for Visual Studio 2008 Beta 2. So, the first project that I want to try is, of course, Silverlight 1.1. And so I downloaded the VS 2008 B2 image file, installed it, then Silverlight 1.1 Alpha refresh, and finally the VS Silverlight Tools Alpha for VS 2008 B2. Get all the downloads at silverlight.net.

Okay, now is the time i've been waiting on. I launched VS 2008 B2, create new project of type Silverlight Project, and then "Boom!". I was shown an error message that VS 2008 B2 is not allowed access to "Testpage.html.js". And then my AVG anti virus (free edition) gives a pop-up of "suspected" virus with hidden extension ".js". Uh-oh! A quick check with Silverlight.net forum, it seems like the error happens only when we have AVG antivirus installed. Can't find a quick solution, I decided to get my hands dirty. I decided to change the Testpage.html.js to Testpage.js, so that the AVG "thinks" that it is legitimate .js file. After all, this is just a testpage. Here's what i did:

1. Open up the VS 2008 B2 program files folder:
 C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\
(path may vary with your machine if you customized it)

 

2. Launch windows command prompt, A quick "findstr /S /L /I /M Testpage.html.js *.*" (the arguments were just easy to remember :D) shows that basically there are 4 CSharp files having testpage.html.js content, with the last file "testpage.html.js" were denied access as well. The 4 files are found in 2 different locations (I'm using C#. there could be more locations if you have installed more languages, such as VB.net, C++.net, i guess).

A. C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Silverlight\1033\SilverlightProject.zip (It's a zip file)

B. C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\CSharp\Silverlight\1033\SilverlightProject.zip

 

3. Then I did the following changes (remember to back up first):

A. SilverlightProject.csproj
     <None Include="TestPage.html.js">
-->     
 <None Include="TestPage.js">

B. SilverlightProject.vstemplate
      <ProjectItem OpenInEditor="false" ReplaceParameters="false">TestPage.html.js</ProjectItem>
-->
      <ProjectItem OpenInEditor="false" ReplaceParameters="false">TestPage.js</ProjectItem>

C. Testpage.html
    <script ... src="TestPage.html.js"></script>
-->
    <script ... src="TestPage.js"></script>

D. Rename Testpage.html.js --> Testpage.js


4. Re-create a new Silverlight project from VS 2008 B2, and voila! It works!


Hope this tips helps, and enjoy Silverlight! It's really a cool application.

 

... in Silverlight.

 http://www.windowsvista.si/

 

Yeap, sushi. Read on how BizTalk Server helps a kaiten sushi restaurant in tracking their sushi from chef's cutting board to conveyor belt to customer's plate to chef's monitor and finally, to cashier billing.

 http://www.forbes.com/logistics/2007/05/23/logistics-restaurants-biz-logistics-cx_rm_0523sushi.html

http://www.microsoft.com/biztalk/evaluation/news/default.mspx

Whoa! For someone that has never attended any live video conference, this really impressed me. Microsoft Office RoundTable, from Microsoft Research. It has 360° panoramic view video, with head-size equalization. That means, it doesn't matter if you sit at the end of the room, or just next to the device, the video will display everyone in similar sizes. And, there is another video view that shows the active speaker. The device will auto-detect the direction of voice, and shows the speaker on the video.

Read the full review here.

Any similar product out there?

More Posts Next page »