Custom Tool Warning Cannot Import wsdl portType

I chased this bug for a while and got increasingly frustrated. Here’s what happened: I updated a WCF Service Reference and encountered the error (or actually a warning) in the Error List of Visual Studio. Additionally, the Reference.vb file was completely empty.

After some experimentation and frustration (why do I always try things myself before searching for a solution?), I decided to look online. Fortunately, I found the answer quickly.

Travis Spencer’s blog provided a solution. Although the title and description of the post were quite different, the solution was what I needed.

In the “Configure Service Reference” dialog box, there is an option called “Reuse types in referenced assemblies.” This option is a bit vague in its purpose—essentially, it means the tool attempts to download the assemblies that the service is referencing.

To solve the issue, you don’t need to fully understand this setting. Simply uncheck...

Read More

WCF with Handcrafted WSDL Generated No FaultExceptions

This problem has haunted us for the good part of the autumn and winter.

Early on in our design process, we chose to create the WSDL for our services by hand. This decision was mainly due to the need to express details in XSD that WCF attributes don’t support, such as string length.

We were also using the ErrorHandlerAttribute from the excellent book “Programming WCF Services” by Juwal Löwy.

What we observed was that, even though we had created the WSDL for handling faults and their details correctly, we didn’t get the fault details over to the client (i.e., the T of FaultException<T>). We checked the WSDL and the generated client proxy (and its WSDL) file over and over, line by line, but just couldn’t find the issue.

Finally, it dawned on us… It was Mr. Löwy’s fault. Seriously, it was the use...

Read More

2008 - another great year

To sum up 2008 is not very hard for me—it starts and ends with Abbe (Albert). He was almost a part of our lives at the start of 2008 since he took up considerable space in Elin’s belly. :)

In work, I don’t think I ever learned so much in one year (TFS, SOA, MSBuild, WCF, Oracle, just to mention a few things I have touched during the year). But it came at a cost—I lost my ability to leave work at work when I go home. I’ll try to improve that next year, which won’t be hard since I will be home with Abbe for about six months.

With the Vasa Band, it was also a great year with the recording and release of our CD Priority and a tour of the western parts of Sweden. On top of that, we did two great Christmas concerts at...

Read More

About this blog

Lately I have been asked the question why I have this blog, several times actually. I honestly thought that I wrote that in the first posting I did, but it was very short. Not even when I change into www.marcusoft.net I wrote something about it.

But the reason for the blog is, and has always been this simple: I write about things that interest me and when they catches my attention. For several years I did notes in diffrent kind of notebooks at different customers. Always forgot them when I left. So now I have them in one place. I often link to the blog for solutions to problems I have and solve.

I then and then write about private stuff also, in the same manner - when it feels good.

I write in english to keep my english up to date.

So there you have -...

Read More

Compress a string with zip

[UPDATE START]

We found a nasty performance bug in the code below. The DeCompress method copies a string for each turn in the loop. That is a classic problem that creates a new copy of the string for each row. That became a major problem for a 3.8 MB string…

I have now updated the code to use the System.Text.StringBuilder object instead. That took down the speed to about a tenth. Sorry that I didn’t catch that…

[UPDATE STOP]

We had a quite special need the other day; we wanted to compress a part of our request, namely an XML string that was sent to us.

Most of the examples I found on the net showed how to compress the content of a file. But here is the code that compresses a string. The code uses ICSharpCode.SharpZipLib. Here you go:

UTA058 The test engine cannot run tests in the assembly for our integration test

We have a MsTest DLL that contains our integration tests, which is run after each deploy to our daily build environment.

However, on our new build server, we ran into problems with the following error message:

“UTA058: The test engine cannot run tests in the assembly”

It seems that you need to configure the .NET Framework to allow running assemblies from network shares.

I found this description on how to solve it (potentially the longest URL on the net ;)).

But we ran into more trouble… The .NET Framework 2.0 Configuration was nowhere to be found. As it seems, this tool disappears when the .NET Framework 2.0 SDK is installed. Where it disappeared to is another question that I haven’t found an answer to.

However, the great description also told us how to handle the problem on the command prompt, with the caspol...

Read More

SOAP UI - a great way to do integration tests for services

Just found this tool - or actually, I’ve used it but missed its greatness…

SoapUI can be used to automatically generate clients to access web services. But furthermore, it can be used to test web services. With the tool, you can generate test requests and set up the expected responses. This is set up via a nice GUI.

The requests and responses can then be run, in sequence or one by one.

What a great way to do integration tests for a service. Just imagine - you have 100 pre-built request/response files and can run them (from the command prompt as part of your nightly build, of course).

Since not much coding is required, you can easily put SoapUI in the hands of a tester and maintain the requests/responses as checked-in files.

Now we just need to find a way to run the test against...

Read More

Abbe - a December update

I know that a lot of people has been wondering why no new pictures of Abbe has been on display here for a while. Well - a too busy autumn may be one reason. Anywho - here you go…

Almost forgot - he said a very loud and clear “PAPPA” last week!

Read More