Day of the Developer

Living the life of a developer. What is development work really like?

<July 2007>
SuMoTuWeThFrSa
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

Post Categories

Article Categories

News

I'm a dad :) Welcome to a new life.

Navigation

Software Business Tips

My Sites

Subscriptions



Wonders and Weirdness of Web Services

I just spent 3 hours trying to work out why one of two methods on a web service was failing with a NullReferenceException when both methods accepted the same first 3 parameters (one of which was apparently null) from the same 3 variables, and the other method was perfectly happy.

I'm not sure how it happened, maybe a global replace, or something, altough that doesn't match up really.

Anyway:

BeginMethod1(string About, string My, string Method)

Method1(string About, string My, string Method)

BeginMethod2(string About, string My, string Method)

Method2(string about, string My, string Method)

Calling Method 1 succeeds

Calling Method 2 fails

Did you spot the cause?

In the first 3 definitions, About started with a capital, in the last it started with a lower case.

The actual method parameter on the web service started with a capital.

The end result is that somewhere in the serialization or deserialization, the value is not transferred across, so that the web service, the parameter value is null.

posted on Wednesday, July 25, 2007 12:09 PM by admin

Powered by Community Server, by Telligent Systems