Are you at TechEd Developer 2008? Looking for something to do Tuesday?

I ran into an old friend tonight here at TechEd and he told me about an event he’s hosting tomorrow night, pre-registration is done, but rumor has it there are still “ducks available”, so… if you’re here, you may want to swing by the Developer Tools and Languages info desk in the TLC.

The “rubber duck competition” sounds like it should be fun. If I’m happy with the state of the demos for my presentation, I’ll see you there!

http://www.dougseven.com/blog/2008/05/geekfest-party.html

WCF: Data contract names: don’t use names with "Response" suffix!

After creating simple WCF service I’ve got strange errors (see below).
Th issue was in the names of the response messages.
I used the simple custom rule to name request and response messages (.NET DataContract classes):
<OperationName>Request and <OperationName>Response
For instance I created GetTokenResponse class for the response message of the GetToken operation.
And this isthe wrong rule!
Why? Because the WCF creates these names for the WSDL metadata files:
For instance I’ve got:
<wsdl:message name=”ITokenStore_GetToken_OutputMessage>
<wsdl:part name=”parameters element=”tns:GetTokenResponse />
….<wsdl:operation name=”GetToken>
<wsdl:input wsaw:Action=”http://Clearmedia.Services/TokenStore/2008-05-29/ITokenStore/GetToken message=”tns:ITokenStore_GetToken_InputMessage />
<wsdl:output wsaw:Action=”http://Clearmedia.Services/TokenStore/2008-05-29/ITokenStore/GetTokenResponse message=”tns:ITokenStore_GetToken_OutputMessage />
When I changed the name to the GetToken_Response the errors disappeared.
It is not an error in the WCF it is just undocumented feature.
The problem is the error text gives us unhelpful and ambiguous information.
See the article in MSDN: http://msdn.microsoft.com/en-us/library/ms731045.aspx
Not a clue about these rules.
Conclusion:
Don’t use the name convention for the request and response messages (.NET classes) like <OperationName>Request and <OperationName>Response !

Error in SoapUI
, when we’ve tried to get the metadata:
… ERROR:javax.wsdl.WSDLException: WSDLException (at /HTML): faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/}definitions’.

Error in IE: by address the<ServiceAddressURL>

The service encountered an error.

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationBehavior
 contract: http://MyServices/TokenStore/2008-05-29:ITokenStore ----> System.Xml.Schema.XmlSchemaException: The global element 'http://MyServices/TokenStore/2008-05-29:GetTokenResponse' has already been declared.
   at System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(Object sender, ValidationEventArgs e)
   at System.Xml.Schema.BaseProcessor.AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
   at System.Xml.Schema.Preprocessor.Preprocess(XmlSchema schema, String targetNamespace, ArrayList imports)
   at System.Xml.Schema.Preprocessor.Execute(XmlSchema schema, String targetNamespace, Boolean loadExternals)
   at System.Xml.Schema.XmlSchemaSet.PreprocessSchema(XmlSchema& schema, String targetNamespace)
   at System.Xml.Schema.XmlSchemaSet.Reprocess(XmlSchema schema)
   at System.ServiceModel.Description.MessageContractExporter.Compile()
   at System.ServiceModel.Description.DataContractSerializerMessageContractExporter.Compile()
   at System.ServiceModel.Description.MessageContractExporter.ExportMessage(Int32 messageIndex, Object state)
   at System.ServiceModel.Description.MessageContractExporter.ExportMessageContract()
   at System.ServiceModel.Description.WsdlExporter.CallExtension(WsdlContractConversionContext contractContext, IWsdlExportExtension extension)
   --- End of inner ExceptionDetail stack trace ---
   at System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata()
   at System.ServiceModel.Description.ServiceMetadataExtension.EnsureInitialized()
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.InitializationData.InitializeFrom(ServiceMetadataExtension extension)
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.GetInitData()
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.TryHandleDocumentationRequest(Message httpGetRequest, String[] queries, Message& replyMessage)
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.ProcessHttpRequest(Message httpGetRequest)
   at SyncInvokeGet(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Error in IE: by address the<ServiceAddressURL>?wsdl

The service encountered an error.

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.InvalidOperationException: An exception was thrown in a call to a WSDL export extension: System.ServiceModel.Description.DataContractSerializerOperationBehavior
 contract: http://MyServices/TokenStore/2008-05-29:ITokenStore ----> System.Xml.Schema.XmlSchemaException: The global element 'http://MyServices/TokenStore/2008-05-29:GetTokenResponse' has already been declared.
   at System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(Object sender, ValidationEventArgs e)
   at System.Xml.Schema.BaseProcessor.AddToTable(XmlSchemaObjectTable table, XmlQualifiedName qname, XmlSchemaObject item)
   at System.Xml.Schema.Preprocessor.Preprocess(XmlSchema schema, String targetNamespace, ArrayList imports)
   at System.Xml.Schema.Preprocessor.Execute(XmlSchema schema, String targetNamespace, Boolean loadExternals)
   at System.Xml.Schema.XmlSchemaSet.PreprocessSchema(XmlSchema& schema, String targetNamespace)
   at System.Xml.Schema.XmlSchemaSet.Reprocess(XmlSchema schema)
   at System.ServiceModel.Description.MessageContractExporter.Compile()
   at System.ServiceModel.Description.DataContractSerializerMessageContractExporter.Compile()
   at System.ServiceModel.Description.MessageContractExporter.ExportMessage(Int32 messageIndex, Object state)
   at System.ServiceModel.Description.MessageContractExporter.ExportMessageContract()
   at System.ServiceModel.Description.WsdlExporter.CallExtension(WsdlContractConversionContext contractContext, IWsdlExportExtension extension)
   --- End of inner ExceptionDetail stack trace ---
   at System.ServiceModel.Description.ServiceMetadataBehavior.MetadataExtensionInitializer.GenerateMetadata()
   at System.ServiceModel.Description.ServiceMetadataExtension.EnsureInitialized()
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.InitializationData.InitializeFrom(ServiceMetadataExtension extension)
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.GetInitData()
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.TryHandleMetadataRequest(Message httpGetRequest, String[] queries, Message& replyMessage)
   at System.ServiceModel.Description.ServiceMetadataExtension.HttpGetImpl.ProcessHttpRequest(Message httpGetRequest)
   at SyncInvokeGet(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Convert existing 2004 or 2006 HIPAA, BaseEDI, or Covast maps to BizTalk Server 2006 R2

I am on a project that requires that I take all EDI maps that were created using BizTalk preR2 and convert them to the new schemas.

I looked here to be disappointed to find that everything except maps were listed.

I started re mapping (dragging lines again) and it took me an entire day to finish a map. (Yes my employer paid me 8 hours to do something I leaned in kindergarten). I have 30 more maps to go!

Instead, I created an application that will convert them automatically:

Here is what I started off with:

Here is the result of the conversion:

Contact me if you would like to save yourself 5 to 8 hours per map (pricing is documented here)!

Announcing availability of May CTP of Adapter Pack V2!

The BizTalk Adapter Pack team is very happy to announce the release of the first CTP of the Adapter Pack V2. This CTP contains new WCF/ASDK-based Oracle E-Business Suite and SQL adapters for use with BizTalk Server R2. MOSS and any .Net application. This CTP is only available for members who have enrolled into the Adapter Pack V2 TAP program. Please view this blog for details on how to enroll into this program.


Enjoy!


The BizTalk Adapter Pack Team

TechEd 2008 talk on unattended deployments…

Are you going to be at TechEd this week?  I’ll be delivering an expanded
version of the talk I gave on May 15 at the last Twin Cities BizTalk User Group. 
The talk (mostly demos!) is all about achieving unattended deployments with BizTalk
using Team Foundation Server (with TFS Deployer.)  

The session is on Wednesday at 12pm, titled “SOA07–TLC  –
Automated Remote BizTalk Server Deployments with Microsoft Visual Studio Team Foundation
Server” in Green Theater 2.  (That’s a mouthful…)

See you there!

ASP.NET MVC Support with Visual Web Developer 2008 Express

Last week I blogged about the ASP.NET MVC Preview 3 release.  One important thing I forgot to mention about this release is that you can now use it with both Visual Studio 2008 as well as the free Visual Web Developer 2008 Express edition. 

The SP1 release of Visual Web Developer 2008 Express adds support for both class library projects as well as web application projects (previously only web site projects could be used with it).  This new support is useful in itself, as well as in enabling both ASP.NET MVC and Silverlight project support with VWD Express.  If you install the Visual Web Developer Express SP1 Beta you can start using ASP.NET MVC Preview 3 with it immediately.

Important: ASP.NET MVC Preview 3 does not require SP1 to be installed if you are using Visual Studio 2008.  ASP.NET MVC Preview 3 will work with both VS 2008 and VS 2008 SP1 just fine. 

You can learn more about the new VWD Express support for ASP.NET MVC from the VS Web Tools team blog here.  This post also includes a free web download that provides ASP.NET MVC Test project support for NUnit-based unit tests.  You can use these NUnit project templates with both Visual Studio 2008 as well as with Visual Web Developer Express 2008.

Hope this helps,

Scott

"The project type is not supported by this installation?" – VS2008 and Silverlight error!

I was cracking into getting my machine setup for a Silverlight project that I’m working
on and came up with the above error.

Now….I admit….running x64 Windows 2008 on my Fijitsu Laptop mighten be the best
combination given the huge support for my laptop drivers that I have.

I installed all the new(er) Silverlight 2.0 Beta bits from http://silverlight.net (VS2008
Silverlight 2.0 Beta 1 Bits) and opened up my VS2008 seeing all the new Silverlight
project types – cool! (I thought)

Each time I either created or opened an existing project – boom!
up came the error.

So I figured the installation didn’t complete properly………after running/re-running/uninstalling/installing
countless times the error was still there!!!!

My one solace and saving grace was running the following command line:

devenv /setup

……”I’m on my way, on my way to happiness today…..ah huh ah huh ah huh”……..

🙂