Daniel does it the right way 

Daniel Cazzulino, one of our breed, shares this perfect blog posting about a super efficient way of passing XML data as XML, but without loading full DOM on the server side.

Started here and here.

I especially like the availability of arbitrary positioning of XPathNavigator to only serialize the bits you are interested in.

The only limitation of this solution is that it does not ship with FX 1.0/1.1 and you have to be a master in XML to fully grok it. But hey, if you don't, you can still use XmlDocument as a return type. :)

Categories:  MVP | XML
Monday, 31 May 2004 19:06:03 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

 VS 2005 CTP - May 2004 help broken 

If you already downloaded or installed a TechEd 2004 San Diego version of Visual Studio 2005 CTP you must have found out that the help system does not work.

What you get is a “Downloading...” progress bar and nothing is shown.

To fix it, do this:

  • Open c:\program files\common files\microsoft shared\help whidbey\dexplore.exe.config
  • Change supportedRuntime's and requiredRuntime's element attribute version from “v2.0.40507“ to “v2.0.40426”.
  • Final text should read <supportedRuntime version=“v2.0.40426“ safemode=“true“ />

It should work now.

Categories:  Other | Work
Thursday, 27 May 2004 20:47:03 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

 WSE 2.0 Out of the Closet 

Finally! After 30 minutes of SteveB's keynote talk, here at TechEd 2004 in San Diego, WSE 2 was announced.

Download it here.

Categories:  Web Services
Monday, 24 May 2004 17:56:15 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

 What happened? 

Harwey said it's code complete around March 1st.

As I got the confirmation today that first bits from the Indigo team will be available to the selected ones in late July/early August, this is definitely something to look for.

Why...

Why is...

Why is it...

Why is it still...

Why is it still brewing?

Categories:  Web Services | XML
Monday, 17 May 2004 18:29:13 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

 Do it the right way 

With all the talk going on I agree that this is bad:

[WebService]
public class MyWebService
{
   [WebMethod]
   public string GetSomeXML()
   {
     // get some xml
     return xml;
   }

}

And:

public class MyClient
{
   public static void Main()
   {
      MyWebService objWS = new MyWebService();
      string strXML = objWS.GetSomeXML();
      XmlDocument doc = new XmlDocument();
      doc.LoadXml(strXml);
      // processing
   }
}

A lot better (in most situations) is:

[WebService]
public class MyWebService
{
   [WebMethod]
   public XmlDocument GetSomeXML()
   {
     // return xml
   }
}

The former scenario serializes the document directly into the output SOAP stream, therefore bypassing double string (de)serialization.

There are special cases, when one would like to bypass the other approach (passing XML as XmlDocument) on the server side. If you have all the data ready and want to pass it as quickly as humanly possible, without rehydrating the entire full blown DOM-capable object, you would use System.String (xsd:string in the XML world) and System.Text.StringBuilder to contacenate it.

If you don't know what to choose I propose this:

  • It is year 2004, therefore platform and tool support is available in a way that XML processing is not a limitation from the XSD type system -> platform type system conversion side. Therefore choose XmlDocument.
  • Choose XmlDocument.
  • Choose the string way if and only if you are expecting clients which have no other way to bridge/decouple the raw SOAP XML string into something programmatic inside your platform.

In any case, things will change in late July or early August.

Categories:  XML
Monday, 17 May 2004 18:17:32 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

 Validation bug in .NET Fx 1/1.1 

I wrote about a bug in validation engine of .NET Framework 1.0/1.1 a couple of weeks ago. There was a lot of posts/discussions/emails about this issue later on.

As Dare, Web Data Team PM, points out, it turns that this anomaly is manifesting itself through System.Xml.XmlValidaingReader, because System.Uri class has a problem. And System.Uri has a problem, because RFC 2396 does not support empty values in BNF notation of URI.

So, what I propose is that if you end up in a similiar situation that we did in a production environment and want to validate XML instances or XML digital signatures (which are likely to be prone to this problem too, depends on a generation engine) and current Whidbey release is not your cup of tea, THEN CHANGE THE SPECIFICATION/SCHEMA.

Simply change xsd:anyURI with xsd:string. It will help. :)

I know this is architecturally a bad idea. But there is no other way to get around this bug until Whidbey ships (unless you want to change platforms).

I'm glad that usability is driving the ambiguity choice in this case. I'm glad that decision has been made to support empty strings in System.Uri even though the spec is not clear. Some things are just more natural than others.

Categories:  XML
Thursday, 13 May 2004 19:37:30 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

 See it, hear it 

It just ended. The biggest IT conference (NTK 2004) in Slovenia.

I managed to visit two sessions in four days, since I had four of my own (System.XML, WSE2, C# Syntax Changes, GXA stack description).

The first one was an unofficial MihaK's public revelation of New Zealand Joy After One Year(tm). Great! It's still messing with my head. One guy inside is telling me it's too good to be true. The other one is forcing me to go there.

The second one was the presentation of work we did during the last 6 months for a GSMA/Mobitel/Microsoft project. When a mobile operator CTO says it's good, it better be. And I believe it's super important to recognize the security characteristics & requirements as early as we did.

Categories:  Work
Thursday, 13 May 2004 18:19:00 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

 Longhorn 4074 

If you downloaded Longhorn build 4074 from MSDN Universal Subscription download site, you are missing Longhorn SDK.

Wait. Wait. It's going to be available in a couple of days.

Categories:  Windows Vista
Thursday, 06 May 2004 20:00:22 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

Copyright © 2003-2024 , Matevž Gačnik
Recent Posts
RD / MVP
Feeds
RSS: Atom:
Archives
Categories
Blogroll
Legal

The opinions expressed herein are my own personal opinions and do not represent my company's view in any way.

My views often change.

This blog is just a collection of bytes.

Copyright © 2003-2024
Matevž Gačnik

Send mail to the author(s) E-mail