Thursday 17 November 2011

There was a problem loading the XSD documents provided: a reference to a schema element with name X and namespace Y could not be resolved because the element definition could not be found in the schema for targetNamespace Z.

Posting this one mostly as a reminder for myself:

I was working on extending some existing WCF service in development, while an older version already deployed to production. Let's say our production site is
www.borismod.com
and my local machine name is borism
When I tried to create a local proxy of the web service I got the following error:

(all the ULRs and namespaces are fictive)

>svcutil http://www.borismod.com/RealGeekyURL/mex

Attempting to download metadata from 'http://www.borismod.com/RealGeekyURL/mex' using WS-Metadata Exchange or DISCO.
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: There was a problem loading the XSD documents provided: a reference to a schema element with name 'DoSomeCrazyGeekyStuff' and namespace 'http://borismod.blogspot.com/' could not be resolved because the element definition could not be found in the schema for targetNamespace 'http://www.borismod.com/'. Please check the XSD docu
ments provided and try again.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.borismod.com/']/wsdl:portType[@name='ISomeRealGeekService']

Problem:
The actual problem is that there are references from the WSDL to some internal classes. The references point to the production site. The new added classes were missing in production.

Solution:
Point in host file to the local machine, actually adding the following line in hosts file:
127.0.0.1 www.borismod.com

Wednesday 14 September 2011

Windows 8 Build event

Haven't been here for a while, will try to update the blog more frequently. I attended a Microsoft Build event yesterday where guys and a girl from Redmond presented the next operating system - Windows 8. The presentation was held in the US and was broadcast live worldwide.

So what are the new buzz words we hear in the next years:
- WinRT - a new run-time to provide a unified access to all languages: C, C++, C#, VB.NET and Javascript
- Reset/Restore will replace the familiar Restore Points. Creating your own "reset" point is available in command line utility only
- Metrostyle - is the new unified styling of applications supporting multi-touch, sliding etc

Additional features are:
- Publishing applications to the cloud. All the apps will be certified by "the big brother" to have no malicious code
- I was also impressed by boot up performance, it's a real improvement

Good work!