Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

Monday, May 07, 2012

xsd.exe and included schemas

Today I learned that the xsd.exe tool ignores all xsd:import statements. And the workaround is to explicitly provide all the schemas as command line arguments.

xsd.exe MainSchema.xsd  Reference1.xsd Reference2.xsd

According to the post here, the fact that the W3C Schema spec describes the schemaLocation attribute as a hint, not a true location might be a plausible reason to this behavior.

Monday, August 30, 2010

Webservice Testing Tool - WcfTestClient

Windows Communication Foundation (WCF) Test Client (WcfTestClient.exe) is a GUI tool that enables users to input test parameters, submit that input to the service, and view the response that the service sends back. It provides a seamless service testing experience when combined with WCF Service Host.
I didn't know this tool existed until a few weeks ago. Apparently its a part of Visual Studio. I've started digging deep into WCF the last few days and its been an indispensable tool to say the least.

More Info on the tool here:
http://msdn.microsoft.com/en-us/library/bb552364.aspx

Also on a side note, I used to be a big fan of storm and they seem to have a paid version here which adds support to WCF. I don't know how it compares to WcfTestClient though.

Sunday, October 12, 2008

Storm, replacement for the aging WebServiceStudio

I am frequently required to work with 3rd party Web Services. These web services are often underdevelopment as well and more often than not tend to break our applications after each update.

I’ve been using WebServiceStudio for a while now to diagnose problems that arise after each update. WebServiceStudio was available on GotDotNet until it got shutdown and haven’t seen much updates since.

Luckily there’s a new open source tool that I discovered that replaces this aging application; Storm.

Here’s a description taken from the project site:

STORM is a free and open source tool for testing web services.

It is written mostly in F#. (I love this language!)

STORM allows you to

  1. Test web services written using any technology (.NET , Java, etc.)
  2. Dynamically invoke web service methods even those that have input parameters of complex data types
  3. Save development time and money. Creating throw-away test client apps just to test the web service is just too wasteful
  4. Test multiple web services from within one UI.
  5. Edit/Manipulate the raw soap requests.
  6. Others (Try out the tool and find out yourself!)

 http://www.codeplex.com/storm

Sunday, August 03, 2008

Debugging XSLT using Visual Studio 2005 / 2008

Visual Studio has the ability to debug XSL stylesheets. This a extremely useful feature that a few seem to know exist and use regularly.

Most of the projects I'm involved with use XSLT in one way or another. And the VS debugger along with other tools have saved me countless hours of frustration.

Here's a quick guide to get you started:

  1. Create / Open up the XSL file using Visual Studio
  2. Setup break points as necessary
    breakpoints
  3. Make sure that the XML Editor toolbar is visible
    XML Toolbar
  4. Click on the Debug XSLT button to start debugging
    debug_xsl
  5. A warning message would appear asking you to setup an input file. This would be the XML file that needs to be transformed. Click YES and select the input file.
    filename
  6. Step through the code.
    stepthrough

The only disadvantage or limitation rather is that you can't specify values for xsl:param variables. The workaround I use is to re-define the parameter as an xsl:variable , set the expected input value.

xsl_variable

On a related note, XslCompiledTransform class supports stepping into the stylesheet while debugging. The only pre-requisite is that the class should be instantiated with the debug parameter value set to true . Detailed instructions provided here.

Saturday, April 26, 2008

Useful XSLT / XML tools

I've worked on a XSLT based ad-hoc reporting solution a few months back. I don't think could have made much progress without the following tools at my side. Just thought I'd give them an honorable mention.


You guys got any favourite XML tools?