July 31, 2003
@ 08:10 AM

There’s a bit too much advertising in the dasBlog themes. I didn’t remove some of the links that were meant to be only on our themes here at the newtelligence site. The download below is a drop-in replacement for the themes than are in the current build (1.0.3210.0)

Download: themes_1_0_3210_0.zip

Categories: dasBlog

July 30, 2003
@ 06:26 AM

After Stephen Forte, who heroically tries to get dasBlog to run on the 1.0 Framework, came back to me with “it’s very slow”, I spent a little time profiling and investigating and it turns out that showing the comment count for every entry is a big problem because of the internal file structure of the underlying BlogX store (it puts comments into an extra file). For the next build, there is going to be a config switch to turn rendering the comment counters on and they will be off by default. We’re talking about a 200%-300% perf gain for the respective execution path on my machine here, so this is a significant improvement. What I also switched off for good (unless anybody complains, in which case it may become switchable) is the ability to include ASP.NET controls straight into the templates, because there is a macro that allows you to pull in web user controls and this should do the job well enough, because the template by themselves allow no additional control over the controls you could inject.

Categories: dasBlog

July 29, 2003
@ 09:03 PM

Christian Nordbakk switched.

Categories: dasBlog

July 29, 2003
@ 04:40 PM

It apparently took Tom Mertens about 5.43 seconds (ok, but not much longer) to get his dasBlog installation working. My site logged his Weblog comment at 18:17 and now at 18:40 he did already switch.

Categories: dasBlog

I wish I knew how the GotDotNet workspaces work and more why they don’t work so often. I get to the workspaces console and when I click to get into the workspace, nothing works. And it’s not the first time. Or is it me?

 

Categories: Other Stuff

So, (t)here it is. And even a day early. I uploaded newtelligence dasBlog 1.0.3210.0

There’s a GotDotNet workspace where you can get the installers (one for a Website and one for the source) or get all source code using the GDN source control “applet” or the VS.NET plug-in.

The files are also available at http://www.dasblog.net/ in the Download section, but GotDotNet is a better choice for bandwidth (for you and for us). If you want to build the source code, you need Visual Studio .NET 2003.

Make sure you read the instructions of the web-install and read the docs that are already there and specifically the docs on the installation steps.

BlogX users should have it very easy to upgrade. Use the web-installer to create a new site on your local machine and drop your existing siteConfig and content directories into the new installation. The siteConfig only needs one new entry in that case: You need to add a <BinariesDir>content/binary/</BinariesDir> tag. The installer should create the necessary subdirectory already. Once the site runs (the setup steps are exactly identical, otherwise and therefore it should) and you’re happy with the templates and all, you can copy the whole stuff over to your existing site and you’re set.

Radio Users will have to fiddle around a bit and poke around in the web.config (see the UrlMapper config section) and look at a previous post to help their hyperlinks to follow them to a new site. Between then and now I made an update that will not only redirect the hyperlinks but also the referrers and I’ll post something about that on the www.dasblog.net site these days. It shouldn’t be too hard to figure it out looking at the UrlMapper config if you are Regex savvy.

However, starting with the content and setting up a replacement for Radio is very easy if you told Radio to make “XML backups” of you data. The command line tool (DasBlogRadioImport.exe) that is included with the source setup and about the only set of files that made it over alive from BlogX, allows you take all the content with you:

dasblogradioimport /from:"c:\program files\radio userland\backups\weblogArchive\posts" /to:c:\temp\radionew

The target directory, which must exist before you run this, will contain a complete content directory that you can simply drop into your new site.

I am not sure about switching from other tools, but since you have a MovebleType/Blogger/MetaWeblog API endpoint sitting at /yoursite/blogger.aspx, some tool may be able to make sense out of that for import/export. I have successfully tested w.bloggar, Zempt and blogBuddy with dasBlog. However, nothing beats Outlook for blogging.

 

Categories: Blog | dasBlog

I am not done packing the code yet. (That's really a lie, because I have the installers sitting here, but I am considering some last-minute changes for some file names and don't want to create too much confusion once the stuff is out).

However, I have already put a good deal of the user documentation on the "dogfood" site where dasBlog is used to document dasBlog. I plan to put the downloadable files (one MSI for setting up a web and one to set up a code tree) over there by Wednesday and then I also will start filling in the "Code" section with some guidance on where to find what. The feature I love most is "Mail To Weblog".

Categories: Blog

July 28, 2003
@ 06:25 AM

This week:

  • Ingo Rammer will be 24 on Thursday, if I remember right
  • I am going to release DasBlog and throw a lot of source code at everyone ;)
  • newtelligence will be 3 years old on Friday
  • I will be 34 on Friday
  • ... and there's one more thing we're waiting to happen on or before Friday
Categories:

There's an option in Word to reduce the amount of odd markup Word injects into e-mail when used from Outlook ...
Categories: Other Stuff | Blog

Dave Winer suggests an experiment:

Shall we run an experiment is to see if aggregators can work with RSS feeds that have a xmlns attribute at the top level, on the <rss> element?

... and continues with an example:

<rss version="2.0" xmlns="http://blogs.law.harvard.edu/tech/rss">

Now, the RSS spec doesn't say that this is okay, but neither does it say it's not okay.

Yes, the RSS spec may not but that doesn't matter, because it's just a vocabulary on top of existing specs that take matters a bit more seriously. The XML namespaces spec says: "If the URI reference in a default namespace declaration is empty, then unprefixed elements in the scope of the declaration are not considered to be in any namespace", which is true for all RSS elements as per RSS specification, because it ignores namespaces and is therefore subject to this default case. Therefore, setting a default document namespace like that may be permissible as per RSS spec, but recognizing such a document as valid RSS is just wrong. I would suggest to revise the spec and not to experiment.

Categories: Blog | Weblogs | RSS



Our buddy René Pierre Coburger understood the obvious name reference and made this little logo for the blog engine.

Categories: Blog

This was a fun week, really. Last week I was mostly at home and spent quite a bit of time (on the balcony, in the sun) refactoring BlogX and adding new features "offline". This week I tested and stabilized things using the online version, upgrading to a new build at least twice a day here at the office. I am quite happy with it. It's really cool playing with the stuff now. I think I am going to set up an additional, different blog just to play around with the features. But until now I needed your referrals and pingbacks and so on.

During this week I also thought about the naming issue, because -- as I pointed out before -- there's not much left of the original BlogX code base now and to limit confusion the thing had to get a different name (ChrisAn still gets proper credit in every single source file, of course). I had about two dozen ideas and it turned out that all of them were already taken either by some software or someone's personal blog and I also didn't want to hijack any of these names. So, I went for a very simple (sort-of) German variant: "Das Blog". So, it's "newtelligence DasBlog 1.0" now.

Some time this weekend, my buddy Stephen Forte is going to get a copy (he's the guinea-pig) and if he's happy with it, I'll check the stuff into a new GotDotNet workspace and then additionally post a web installer (that sets up a basic site) and an installer for the source tree by next week.

The feature-delta to BlogX as of now: Rendering using original templates from Radio, Pingback client/server, Trackback client/server, File-uploads, Picture uploads, web-based DTHML editor, Mail-To-Weblog with attachment and embedded pictures support, pick-up of referrals from redirects (from old blogs), mail notifications for pingbacks, trackbacks, and referrals on the permalink, refactored and streamlined access to the backend, safer file handling, subtitles, experimental Atom syndication support, per-item comment RSS files and "some other changes". I think I need force myself to work on documentation now and stop adding features.

Categories: Blog

July 25, 2003
@ 12:56 PM
Just testing the HTML fix. This should now be it. 
Categories: Blog

Testing, testing ... MailToWeblog thread

Three minutes ago I was thinking "Theoretically, this entry should show up on my blog, in the 'Blog' category, in three minutes" and if you can see this, it did actually work.

I just deployed the first iteration of the last bigger chunk of work that I planned to do on the blogging software (for which we found a new name, meanwhile and you can find it at the bottom of the page). I can now send mail to a POP3-account, which the blogging engine watches. It will not only pick up the text, but will also extract and store any embedded pictures and attachments and link them to the entry. If this here works properly on the actual site, the only little thing I still need to do is to clean up the content for "text/html" so that only the stuff between the <body> tags is emitted into the entry.

This is a little document icon, which I added "as picture" in Outlook:

And here's the footer if it's attached as file:

Download: document.gif

Categories: Blog

Ingo says that "sealed" classes are a good thing and goes great lengths to explain why he thinks so in this article.

Now, I do have a little problem with his conclusion (which I still partially share, because I do write sealed classes every once in a while, but for a slightly different reason, see below) because the example he's using isn't really fitting the problem and he actually makes some assumptions about the ImageList class that aren't accurate in this context. 

First off, the property ImageList.Images isn't virtual and therefore cannot be overridden, at all. So that by itself is no reason to make the class sealed. The property has been introduced by the class, the class designer chose not to make it virtual. Can't be overriden, done. The same is true for all other properties except Container and Site, which are inherited from System.ComponentModel.Component. I fail to see anything on the ImageList class (not even a method) that really justifies the lockup using sealed considering the current version of the Framework. The bad that sealed does here is that I can't create a wrapper around the ImageList that simplifies setting up such a list in my specific environment.

Using sealed on a class is a very brutal thing to do. A more gentle way of using the sealed keyword is to say [void sealed override myMethod() { }], which essentially says: "Within my own class space I am using inheritance for this method, but since outsiders don't know what I am doing I won't let them override the behavior from here downwards in the class hierarchy." That doesn't affect the inheritability of the entire class and hence doesn't adversely affect the ability to wrap the existing functionality. 

Now ... is sealed on a class just plain evil? There are two answers:

  • Yes. The keyword sealed on a class usually doesn't have much or any of a technical justification in the "here and now" version of a class library.
  • No. The keyword sealed conveys a very clear message that the class designer reserves the right to change the class so dramatically in a future release of the product that you would be tremendously unhappy if you had derived from it to implement your own functionality, once that new version comes along. Sealed says: This is going to change in a big way.

 

Categories: CLR

July 24, 2003
@ 10:37 AM

The UDDI OPML list is now being cached in memory and refreshed every three minutes on a background thread. Unless the AppDomain recycles, the responses should be instantaneous now, unless you are doing a query on categories, because that needs to happen live because I don't want to cache each and every request combination on our server here and have it take up too much memory for this demo.

I looked at IBM's UDDI service yesterday and at least the web interface is by several magnitudes quicker (from here). I should probably play with their service a little to improve response times. ( ... just did, IBM and SAP aren't any faster)

Categories: Technology | UDDI

July 23, 2003
@ 03:10 PM

Quick note: All of our *.newtelligence.net and *.newtelligence.com servers will be unavailable from 6PM CET until about 6AM CET due to construction work in the office.  

Sorted out. We educated the construction guy how to turn the servers back on. He succeeded. Obviously. (Just checked coming back from seeing Charlie's Angels for the second time. This time the English original. Fun movie. Guy movie. Most definitely.)

Categories:

July 22, 2003
@ 05:05 PM
Category-based UDDI RSS search. Done.
Categories: Technology | UDDI

July 22, 2003
@ 03:18 PM

Matevz Gacnik got it and put himself on the list 

(Note: I set the output cache to expire every 180 seconds and therefore it mostly takes a little while to rebuild by getting the fresh data from UDDI) 

Categories: Technology | UDDI

July 22, 2003
@ 09:57 AM
I wrote a little OPML renderer that grabs all RSS feeds that are registered in Microsoft's UDDI registry
Categories: Technology | UDDI

July 21, 2003
@ 10:10 PM
A quick overview about my changes to BlogX and why it just isn't BlogX anymore. And, yes, you'll get it.
Categories: Blog | Technology | ASP.NET

Philip Rieck makes a great point about the obsession with "revolutionary innovation" quite a few people have. Little steps count too, he says, and there's good stuff in old things and I absolutely agree. At TechEd in Barcelona I said in one of my talks that people should read less computer books published in 2003 and more of those published in 1973.

Categories: Architecture

July 21, 2003
@ 04:02 PM
Stephen Forte is a big fan of Munich, except for their Linux strategy; and I do agree on the latter -- for some obvious and some not so obvious reasons.
Categories: IT Strategy

BloggerAPI, MT API, MetaWeblog API, Comment API, Pingback API, Trackback  ...  are you nuts?

I must admit that until last week I didn't really pay much close attention to all the blogging related APIs and specs beyond "keeping myself informed". Today I copied my weekend's work over to this server and now I have all of them implemented as client and server versions. Sam's and Mark's validator is happy with my RSS 2.0 feed and the experimental Atom (Pie/Echo) feed.

I have to say ... the state of affairs in this space is absolutely scary. Most of the specs, especially for the APIs are lacking proper information detail, are often too informal with too much room for ambiguities and you need to be lucky to find a reasonably recent one. Sam laments that people don't read specs carefully and I agree, but I would argue that the specs need to be written carefully, too. It also seems that because the documentation on expected behavior is so thin, everybody implements their own flavor and extensions and not only do the APIs have huge overlap, but it seems like any random selection of offline blogging tools will use its own arbitrary selection of these APIs in any random order. Since my implementation didn't "grow" over time, but I implemented it all in one shot essentially only since last Thursday and had to look at this all at once and what I found was just saddening. All of this has to be consolidated and it will be.

I am all for the Atom project and creating a consolidated, SOAP-based API for all blogging functions that the aforementioned APIs offer. XML-RPC was a good thing to start with but its time is up.  I am also for replacing RSS x.x with a spec that's open and under the umbrella of a recognized standards body and not of a law school, that's XML as of ca. 2003 and not as of ca. 1998, and that's formally documented (with a proper schema). What's there right now smells all like "let's hack something up" and not very much like serious software engineering. Ok, it's proven that it all works, but how about dumping the prototypes now?

 

Categories: Blog | Technology | ASP.NET | Weblogs | Atom

July 19, 2003
@ 08:39 AM

This morning I got up early (I going to be picked to play Paintball in an hour or so) and implemented image and attachment uploads for the blogging site. This is the test for the live site.

[Here's a copy of the SoapExtension Wizard for Visual Studio.NET: ASPNETSoapExtensionWizard.zip (53.82 KB)]

 

Categories: Technology | ASP.NET | Blog

July 18, 2003
@ 09:04 PM
I will be speaking at TechEd Malaysia 2003
Categories: TechEd Malaysia | Talks

July 18, 2003
@ 08:28 PM

Productivity and ASP.NET

It took me less than an hour to implement, test and deploy pingback support for this blog here using ASP.NET and XML-RPC.NET (and that includes reading the spec). Yesterday and today, it took me less than 2hrs total (including addressing two comments/suggestions/corrections from Sam Ruby) to get (n)echo/pie/atom support working so that it can be validated.

Categories: Technology | ASP.NET

A little IHttpModule implementation for ASP.NET that maps between URLs using regular expressions. In use here.
Categories: Technology | ASP.NET | Blog

On-the-fly template-based blog rendering

If you want to get a feeling for what the rendering engine here can do (which may not be so impressive looking at other tools, but a lot better than than rev20 of BlogX which I started from), check out the "Pick a theme" bar down at the bottom of the page.

The default theme for this page is currently "newtelligence Blue". You can always go back to the default by clicking "Reset". When you select any of the other themes, you'll get a cookie set and the rendering engine will use the template whenever you come and look at the site.

[As of this moment there are two little bugs in the logic which will (1) have that cookie span the whole site and (2) will render the page inaccessible for you if the cookie goes bad. Both should be fixed today.]

Categories: Blog

July 17, 2003
@ 11:39 AM

This here is not Radio.

Categories: Blog

July 11, 2003
@ 09:07 AM

Quake II on .NET. Scott Stanfield and his team at Vertigo Software show yet another nice trick: Quake II in managed code.

Categories: CLR

I couldn't find one, so I made a WS-PolicyAttachment UDDI bootstrap file for import into Windows UDDI Services.

When I put that together, I ran into a bug in the spec. Point 5.1 shows the tModel for the remote policy reference. The tModelKey shown there is

<tModel tModelKey="uuid:0b1b5a47-bebf-3b7d-9802-f2dd80a91adebd3966a8-faa5-416e-9772-128554343571">

which is a bit long for a uuid, isn't it? Correct is the following (as the spec later explains):

<tModel tModelKey="uuid:0b1b5a47-bebf-3b7d-9802-f2dd80a91ade">

The bug even survived the revision from 1.0 to 1.1, which makes me wonder whether anyone ever reads these specs in any depth

Categories: Web Services | Technology | UDDI

This bit of news retires one of my talks ;)
Categories:

Current output of this is that:

---------------
Feed Name: Clemens Vasters: Enterprise Development & Alien Abductions
Access Point:
http://radio.weblogs.com/0108971/rss.xml
RSS Version: 2.0
Description: Clemens Vasters' Weblog, Language: en
Press any key to continue

Categories: Technology | UDDI

Getting serious about UDDI, Step 1

If you search uddi.microsoft.com for "Services" by the "RSS - Version 2.0" tModel, there's exactly one entry at this time. Mine. Fix that.

Using the UDDI SDK 2.0 (part of the Platform SDK), the following snippet is a simple console app that lists all weblogs registered with the RSS 2.0 tModel in the Microsoft UDDI registry [thanks to Karsten Januszewski for his doc, tModel bootstrap and code]. The advantage? If aggregators were able to remember my service key instead or in addition to my absolute access point (right now http://radio.weblogs.com/0108971/rss.xml), I could move the RSS feed around to any arbitrary locations without any pain and clients would still be able to find it using a simple lookup into the registry. And the infrastructure is all there. No future thing.

using System;
using Microsoft.Uddi;
using Microsoft.Uddi.TModels;
using Microsoft.Uddi.Services;

namespace ListRSS20Feeds
{
    class MainApp
    {
        static void Main(string[] args)
        {
            UddiConnection uddiConnection = new UddiConnection();
            /* RSS 2.0 tModel key from config */
            string RSS20TModelKey = "uuid:bacbe300-4b2b-11d7-bc51-000629dc0a53";
            /* setup the UDDI parameters on the connection */
            uddiConnection.InquireUrl = "http://uddi.microsoft.com/inquire";


            /* create a UDDI FindService and ServiceList objects */

            FindService fs = new FindService();
            ServiceList sl = new ServiceList();
            /* add the rss tModel key */
            fs.TModelBag.Add( RSS20TModelKey );


            try
            {
                /* send to uddi */
                sl = fs.Send(uddiConnection);
            }
            catch ( Exception ex )
            {
                Console.WriteLine( ex.Message );
                return;
            }

            /* create FindBinding and BindingDetail objects */
            FindBinding fb = new FindBinding();
            BindingDetail bd = new BindingDetail();
            fb.TModelBag.Add( RSS20TModelKey );

            /* get the bindings */
            foreach ( ServiceInfo si in sl.ServiceInfos  )
            {
                /* set the serviceKey */
                fb.ServiceKey = si.ServiceKey;
                try
                {
                    /* send to UDDI */
                    bd = fb.Send(uddiConnection);
                }
                catch ( Exception ex )
                {
                    Console.WriteLine( ex.Message );
                    return;
                }
                foreach ( BindingTemplate bt in bd.BindingTemplates )
                {
                    Console.WriteLine(

                        "---------------\n"+
                        "Feed Name: {0}\n"+
                        "Access Point: {1}", 
                        si.Names[0].Text, 
                        bt.AccessPoint.Text);

                    /* get out the tModelInstanceInfo for the tModelKey 
                        that represents RSS 2.0 and get the version info */
                    foreach ( TModelInstanceInfo tmii in bt.TModelInstanceInfos )
                    {
                        if ( tmii.TModelKey == RSS20TModelKey ) 
                        {
                            if ( tmii.InstanceDetails.InstanceParameters != null )
                                Console.WriteLine("RSS Version: {0}", 
                                  tmii.InstanceDetails.InstanceParameters);
                            else
                                Console.WriteLine("RSS Version: n/a");
                        }
                    }
                    
                    if ( bt.Descriptions.Count > 0 )
                    {
                        Console.WriteLine( "Description: {0}, Language: {1}", 
                           bt.Descriptions[0].Text, 
                           bt.Descriptions[0].IsoLanguageCode);
                    }
                }
            }
        }
    }
}

Categories: Technology | UDDI

H2/2003, moving up one notch on the WS stack.

Yesterday, all the travel madness of H1/2003 which begun in January has officially ended. I have a couple of weeks at the office ahead of me and that's, even if it may sound odd, a fantastic thing. The first half of the year and quite a bit of last year too, I spent most of my research time working deep down in the public and not-so-public extensibility points of Enterprise Services and Web Services, trying to understand the exact details of how they work, figuring out how to inject more and tweak existing functionality and whether certain development patterns such as AOP could enhance the development experience and productivity of my clients (and all of you out there who are reading my blog). I've been in 21 countries in this first half of the year alone and at about 40 different events, talking about what I found working with these technologies on some more and some less serious projects and doing that and speaking to people I learned a lot and I also think that I helped to inspire quite a few people's thinking.

Now it's time to move on and focus on the bigger picture. Starting with version 2.0 of Microsoft Web Service Enhancements that's due out by end of this summer, Web Services will finally become less Web and more Services. The WSE 2.0 stack will break the tie between HTTP and SOAP by enabling other transports and they'll add support for some of the most important WS-* specs such as WS-Policy, WS-Addressing and related specs. The now released UDDI services in Windows Server 2003 put a serious local UDDI registry at my fingertips. BizTalk Server 2004's new orchestration engine looks awesome. There's a lot of talk about Service Oriented Architectures, but too less to see and touch for everyone to believe that this stuff is real. I think that's a good job description for H2/2003. My UDDI provider key: 7f0baedf-3f0d-4de1-b5e7-c35f668964d5

Categories: Web Services | Technology | UDDI

July 4, 2003
@ 04:34 PM

Rafal is God.

We're at the speaker hotel looking at the final speaker scores with a group of people including David Platt, Kimberly Tripp, Juval Löwy and Gert Drapers. Rafal Lukawiecki did the four highest ranked sessions of TechEd Europe. The four top spots of all speakers and sessions, all him. The highest was 8.58 out of 9. With 288 attendees responding. That's just unbelievable and it is really, really well deserved, because Rafal is just awesome. We all agree that when it comes to technical presentations, Rafal is God.

Categories: Talks

July 3, 2003
@ 11:53 AM

I am party incompatible ... ummm... no, my session schedule is party incompatible, says Lorenzo. The good news is: My talk this afternoon at 18:15 (DEV387) is going to be pretty light compared to yesterday ;) The session is on "Layers & Tiers" in distributed systems and I'll explain the difference between the two terms, will talk about a broad idea about what a service in an SOA world is and will talk about proper treatment of data and about using data services and about communication patterns and contracts. Very conceptual talk and only one quick (prebuilt) demo to illustrate the concept of "smart" data services.

Categories: Talks | TechEd Europe

July 3, 2003
@ 11:45 AM

WEB404 post-mortem

My talk on web services internals like custom reflectors and importers and format extensions went well -- for what I wanted to achieve. However, based on the audience feedback there was definitively a spread between good and bad in terms of customer experience and most of the critical comments are related to the demo (of course). Here's two out of about 40 feedback comments I got :

  • The speaker had quite a few surprises with his own code during the demo, giving the impression that what he proposed was rather a problem than a solution. The techniques shown looked very powerful, though.
  • sorry about all the demo problems, I hope practicing the demos 3times more before the next time will help.

What's interesting about these two is that everything actually worked and failed just as expected. I was running into "problems" that were there by intent in order to introduce the next step to get the solution going. Whenever I do a coding session (and I think it was appropriate to do that for this session) it is not even my intent to make it all look as if the sun would always shine and everything were easy and works with two mouse clicks. It's not. It's work. Also, I needed good reasons to go into the debugger and show appropriate debugging techniques -- essential for writing importers. But it's always pretty difficult to make it right for everybody, especially with level 400 talks on very complex matters where you need to cover a lot of ground.

Here's the link to the Soap Extension Wizard once more.

 

Categories: Talks | TechEd Europe

July 3, 2003
@ 11:14 AM
Here is the sample code I used for the WEB400 talk about loose coupling here in Barcelona today. To get it to run you need to create virtual directory for the "web400" directory and move the person.xml file into client\bin\debug.
Categories: Talks | TechEd Europe

Barcelona, WEB404 and a new build of the SDK

I still have almost 2 hours until my session on ASP.NET Web Services (ASMX) internals at 18:15 in Room 7. I am going to talk mostly about extensibility and about writing custom "reflectors" (which let you tweak the WSDL spit out by ASMX) and "importers" (which let you tweak the code emitted by 'Add Web Reference'). For a change, I will basically start with a blank project and implement a complete SoapExtension with Reflector and Importer live (I had a canned sample in Dallas) and then show a couple of other goodies that are in the newtelligence SDK bag. 

I just put build 2.2.3173.0 of the newtelligence SDK onto our download site. Read the readme first and then download the MSI file to install the SDK, if you are interested. I will likely show the schema extensions, management extensions and session extensions.

The schema extensions are actually a new thing that I've implemented a couple of weeks ago. The SchemaTypeReflector class tweaks the schema that's being emitted into the WSDL by ASP.NET so that it turns this class definition (if the class is used as a parameter to a web method):

[Serializable]

[System.Xml.Serialization.XmlTypeAttribute(
Namespace="urn:newtelligence-com:samples:northwind:purchaseorder:v1")]

public class orderType

{

public int OrderNumber;

[Match(@"[A-Z]+"), MaxLength(5)]

public string CustomerCode;

public System.DateTime OrderDate;

public System.DateTime RequiredDate;

[System.Xml.Serialization.XmlIgnoreAttribute()]

public bool RequiredDateSpecified;

[Match(@"\p{L}[\p{L}\p{P}0-9\s]*")]

[MaxLength(40)]

public string ShipName;

[Match(@"\p{L}[\p{L}\p{P}0-9\s]*")]

[MaxLength(60)]

public string ShipAddress;

 

...

 

 

}

into a schema type definition like this:

<s:complexType name="orderType"> 
- <s:sequence>
  <s:element minOccurs="1" maxOccurs="1" name="OrderNumber" type="s:int" />
- <s:element minOccurs="0" maxOccurs="1" name="CustomerCode">
- <s:simpleType>
- <s:restriction base="s:string">
  <s:pattern value="[A-Z]+" />
  <s:maxLength value="5" />
  </s:restriction>
  </s:simpleType>
  </s:element>
  <s:element minOccurs="1" maxOccurs="1" name="OrderDate" type="s:dateTime" />
  <s:element minOccurs="0" maxOccurs="1" name="RequiredDate" type="s:dateTime" />
- <s:element minOccurs="0" maxOccurs="1" name="ShipName">
- <s:simpleType>
- <s:restriction base="s:string">
  <s:maxLength value="40" />
  <s:pattern value="\p{L}[\p{L}\p{P}0-9\s]*" />
  </s:restriction>
  </s:simpleType>
  </s:element>
- <s:element minOccurs="0" maxOccurs="1" name="ShipAddress">
- <s:simpleType>
- <s:restriction base="s:string">
  <s:maxLength value="60" />
  <s:pattern value="\p{L}[\p{L}\p{P}0-9\s]*" />
  </s:restriction>
  </s:simpleType>
  </s:element>
- </s:complexType>

The SchemaTypeReflector will walk the type graph of all the parameters passed as an argument. Along with the reflector there is a validator extension that will either do a schema validation on the incoming XML or will check the arguments when they have already been deserialized.  That code is included in the package; check the Source directory in the installation path and look for newtelligence.Web.Services.Schema. For the reflector to work, the type newtelligence.Web.Services.Schema.SchemaTypeReflector must be added to the configuration/system.web/webServices/soapExtensionReflectorTypes section in the web.config.

Having strong contracts with schemas like this makes (amongst many other advantages) for a great combination with InfoPath 2003 since InfoPath honors schema restrictions and puits red squares around editboxes for which the restriction facets are being violated.

Categories:

July 1, 2003
@ 02:40 PM

German Software Legends

A picture named teched2003-aufsteller.jpg

The parodies on the "Software Legends" cardboard cutouts that were all over TechEd Dallas even continues over here in Barcelona. Ralf Westphal had the idea for a quick photo session a few hours ago and actually created a set of cutouts of himself, Christian Weyer, myself and the legend of legends, Juval Löwy (here is the legendary "Cardboard Juval Conquers Dallas" photo series by Stephen Forte).

Categories:

ASP.NET Soap Extension Wizard

While preparing for my WEB404 talk on Web Services extensibility tomorrow at 18:15 in Room 7 at TechEd Barcelona, I remembered that I had built this some 9 months ago. So I made a version that works for Visual Studio .NET 2003 and will show that tomorrow. Here's the current zip file, which includes the installation notes. The zip file contains a file 'InstallerUtil.cs' that implements a helper class supporting the installer that the wizard generates. Put it into a utility assembly and reference it. Aside from that, it's just 3 simple steps to get it running.

Categories: