Archive for the 'Tools' Category

XPathmania and XPath on TV!

Friday, August 3rd, 2007

I’ve blogged about the Visual Studio extension XPathmania before. It’s a very simple little tool that lets you write and test XPath inside of Visual Studio 2005. No big deal if you already have tools like XMLSpy or XML Notepad but still. I like not having to start another application, opening the XML document I’m working with and so on. Doing stuff inside of Visual Studio just feels right and saves some time anyway.

One of the last episodes of dnrTV hosted Dom Demsak (Don XML), the creator of XPathmania. The show is 30% about XPathmania and 70% about XPath and XPath syntax in general. It’s kind of basic XPath but I think it can be useful for someone who feels they haven’t got full control of the language. 

During the show they touch on XML namespaces and XML default namespaces. However they don’t really explain the difference between them and how it effects the document. Something that’s sad as I feel that XML namespaces (and especially default namespaces) is something that most people haven’t fully understood.

Anyway, if you got some spare time watch it or forward it someone you think should watch it. ;)

Developing and debugging orchestrations using DebugView and SOAPTrace tools

Tuesday, July 31st, 2007

The main problem I have with developing BizTalk orchestrations is the fact that I’m so blind when it comes to follow the runtime processing. Using the debugger that is part of the HAT tool is slow and clumsy which IMHO makes the tool almost useless in everyday development. But there is hope!

DebugView

Sysinternals (Windows Sysinternal now - Microsoft bought them last year) DebugView is a wonderful little tool and is especially useful when it comes to figure out what’s actually going on inside an orchestration. Basically the tool listens to system wide debug output. From an orchestration it’s possible to write debug information using the .NET System.Diagnostics namespace and the Debug or Trace class.

Decide on how to filter

There are a couple of handy little tricks that makes DebugView a even better in BizTalk development. First one should try and have something in the debug messages that makes it possible to filter and distinct one’s own (as DebugView listens system wide debug output all running applications debug info will show up). Our team decided on “Sogeti” (our company name) for all our development and to have a method in our BaseLibrary component that outputs something like the below (the BaseLibrary is a small little .NET component with a couple of very useful classes we use company wide in our BizTalk related development).

System.Diagnostics.Debug.WrtieLine("Sogeti, your debug/trace message here")

This make is possible to have a filter in DebugView and to for example have it look something like this.

Trace full context of messages

Another little useful trick is to trace the full context of messages. This is done be storing the message in a XmlDocument typed variable and get the OuterXml property of that variable. The below code is and example of this.

tempXml = msgFindPartyRequest.parameters; System.Diagnostics.Trace.Write(System.String.Concat("Sogeti, msgFindPartyRequest: ", tempXml.OuterXml));

Example of a full message trace.

To Trace or Debug - that’s the question

As stated earlier both System.Diagnostics.Debug and System.Diagnostics.Trace has methods (Write, WriteLine and so on) for outputting debug information. However there is only one that stays in your compiled code when switching from Development to Deployment compilation mode (guess which one ;)). So make sure you choose the right class for the right information. I like to have some critical messages left using Trace and be able to trace these even on the test and production server.

DebugView on a remote desktop

When running DebugView on an other server (say a test or a production server) using Remote Desktop I’ve found that ones has to use the console user on the server. This kind of makes sense as if we’re connection “normally” we’re creating a virtual session and that’s not were the debug information is written to.

Microsoft SOAP Toolkit 3.0

This is a totally other tool than DebugView but I thought it fit here any way. It’s a handy tool when working with SOAP based messages. Without it’s very hard to actually figure out how the raw request and response message look and why your orchestration web service is acting the way it does.

The trace tool is placed as a reverse proxy between BizTalk and the Internet. It’s setup by telling the tracing tool which localhost port to listen at (for example 9091 as in the example below) then we’ll redirect to that port by changing the setting in the BizTalk send port.

Finally we’ll set up the trace tool to listen to port 9091 and redirect all traffic to our web service URL at port 80 in this case. So basically the trace tool will catch all the traffic hitting the 9091 port and forward it.

That’s it! This is probably basic stuff for most of you but hopefully it’s useful for someone! 

I’ve also noticed that the SOAP Toolkit is deprecated by Microsoft and I’d like to hear if anyone used something else (like Fiddler example) for tracing SOAP messages. I’d also love some other tips, tools and methods you use for debugging BizTalk orchestrations.

Reading text value from node using XPath function directly in BizTalk orchestrations

Tuesday, July 24th, 2007

The XPath function that’s available directly inside BizTalk orchestration is a powerful little tool. However I’ve seen a couple of project where developers just grown tired of it and started creating their own little libraries instead. I’ll be the first to admit that the XPath function isn’t perfect, and it sure doesn’t work like most of the other XPath engines (which is the biggest problem) but it’s still inside the orchestration and you can use it to both read and assign values to a message which is super useful! Basically I don’t see a valid reason for bringing more complexity into your solution by adding another library - as long as you’re just going to read or set value using XPath.

However there is one trick that you should know of when it comes to reading a text value from a node. Basically you have to use both the string() and
text() XPath functions. Both Charles Young and Yossi Dahan has good post on this subject. Also if your new to writing XPath expressions for complex schemas with loads of namespaces and stuff (like schemas in BizTalk) this post could be useful for you.

Finally a nice tool for writing and testing small XPath expression inside Visual Studio (if you don’t want to spend x minutes waiting for XmlSpy to start up …) is XPathmania. Read about it here - I use it all the time!

Gmail and Opera Mini on the phone!

Wednesday, December 13th, 2006

A couple of months ago I found the new Gmail mobile application. It’s a clean small Java application that one downloads to the mobile phone for accessing the Gmail account.

The application has easy access to almost all of the features that the ordinary web interface has. There was (and probably still are) an mobile version of the web interface but it didn’t have the easy access to all the different menus as this application has. I really like it and use it several times each day.

The supported devices are listed here and to get on your phone all you do is to visit this URL http://gmail.com/app with your device.

Another cool little application is the Opera Mini browser. These a full feature list here. Basically it transforms the pages so that they fit the mobile screen, and it’s fast! It also has some special features for navigation on small screens. And it supports RSS bookmarks!

BizTalk Deploy Tool

Monday, December 11th, 2006

I’m currently working in a stabilization phase on a deployment application for BizTalk 2006 projects. We based the solution on the Enterprise Solutions Build Framework and the BizTalk Explorer Object Model. Basically our solution has a GUI that makes it possible to point out which artifacts one likes to deploy (from the developers local BizTalk server).

The application then figures out all the dependencies that the selected artifacts has (In our solution an Orchestration for example might have > 20 dependencies to different schemas, pipelines, C# libraries etc, etc). 

All DLL:s of the different artifacts are then extracted from the local GAC (where they exist when deployed to the local BizTalk). These DLL:s are then packed in to one single deployment package also containing a single XML file that keeps track of the dependencies and the order of witch they have to be deployed in BizTalk (the most depending schemas first and so on). The XML file also contains other meta data information such as ports the artifacts use etc.

This package is then loaded into another part of the application were it’s possible to point out the different servers one like to deploy to. This view then shows information about what has to be done on the server to make it possible to deploy without conflicts (One might have running Orchestration or suspended messages for example that has to be stopped or terminated.). At this stage we also check the naming of the different artifacts. These have to comply with the naming conventions that are configured in the config file of the applications (a warning is shown if the artifact doesn’t validate towards these).

When no warnings (its possible to override a warning) or conflicts are shown one can deploy. We then move the deploy scripts to the servers and use the MSBuild tasks in the SBF to deploy everything for us. We really saved some serious time with this approach and even if it took us a while to get everything working it’s been well worth it!

We have a huge feature list for the next phase of the tool and are planing to and support for BizUnit tests in the DLL:s (so that one gets a warning when deploying a Orchestration without etc). We also like to add more meta data about the port and make it possible to configure new ports as a part of the deployment process. Etc, etc …

Feel free to comment or write we line for further information about this approach. It would also be interesting to hear about other approaches for deployment and what kind of features these solutions have.

Virtual Desktop Manager in XP PowerToys

Friday, September 29th, 2006

Today someone complained about Windows XP’s lack of virtual desktops and that Mac had the possibility to have several desktops active with different content. I remembered that had tried something like that a couple of years ago and after a while I found Microsoft PowerToys for Windows XP again.

The PowerToys package contains several small XP add-ins. For example the Virtual Desktop Manager

As the image above show the manager makes it possible to have four separate desktops running at one - nice! A few configurations tips that I found useful was turn of the shared desktops option and to set the shortcut for showing the desktops to alt-§ (that’s close to the alt-tab option).

An other cool application in the PowerToys package is the Alt-Tab Replacement that shows a small preview of the different windows one is multi tasking between (as shown in the image above).

Resources …

Thursday, August 31st, 2006

I’ve started reading this list. Jisses! There’s is literally a ton of links to excellent resources here!

Validation

I’ll work my way down the list when I have some more time. However I found this, seems like it could have saved my a lot if I’d known about earlier. It’s a package with validation controls for ASP.NET for every situation. Looks really good.

Date

This seems like another usefull resource. Loads and loads of different date controls. I’ll have to remeber this site the next time I’ll nedd one.

The Regulator!

Tuesday, August 29th, 2006

I had to write a few regular expression for a project today. As always I couldn’t remember the syntax. After a bit of searching I found this excellent free tool!

It saved me a lot of time. It even generates .NET code.

Code formater Plugin for Windows Live Writer

Saturday, August 26th, 2006

I use Windows Live Writer for writing and posting to my blog. However I’ve always had problems with code formating. Until now!

This little plug in to Live Writer does the job!

Thanks to Steve Dunn whos excellt blog you’ll find here