Null Response From Web Service

Pieter van der Westhuizen, a professional freelance web & mobile developer and founder of Coalition Software.
Search for a command to run...

Pieter van der Westhuizen, a professional freelance web & mobile developer and founder of Coalition Software.
A recent requirement came up for configurable dynamic forms in a mobile application. There are a few dynamic form packages for Flutter, but I wanted a bit more control over the schema and behavior of the form. Here follows my attempt at creating dyna...

If you've ever written a mobile app with Flutter that integrates with an API, then you'll know that there are a lot of model objects that get passed between the app and the API. JSON Serialization in Flutter can also take a fair amount of boilerplate...

Back in May 2020, Microsoft announced a new feature for Azure Blob Storage called Blob Index. Essentially, this enables you to add key/value tags to your Blob objects and be able to query said Blob objects without having to use a separate service lik...

In my last post, "Using AWS Cognito with Xamarin Forms", I showed how to authenticate with Amazon Cognito using Xamarin Forms and the Xamarin.Essentials Web Authenticator. In this post, we'll go through the process of using the AWS Cognito Hosted UI ...

In this post, I'll show you how to quickly and easily set up user authentication for your Xamarin Forms app using Amazon Cognito. AWS Cognito is a user identity management solution by Amazon. It is a really easy way to add authentication to your appl...

I’m currently working on a pretty big project where we have to consume a number of web services. These service was written in Java and the guys who wrote them use soapUI in order to test.
Personally, I like soapUI. It is a very powerful tool to test your web services with. Unfortunately as is the nature of web service development, when you send a request and get a response back, you’re happy. I’ve run into a scenario where I build a request send it via the service client and always get a null response object back. Null as in Object Reference Not Set null.
Debugging it is very tricky as the client code generated by WSDL.exe cannot tell you much. Yes, in this case we had to use old style WSDL web services, no WCF 
Eventually after some time trying to figure out what the heck is happening, I installed tcpmon, a nice free Java utility to monitor data flow on a TCP connection. This allowed me to trap the XML for both the request and response. Within this XML I saw that the namespaces for the request and response was different. Once the guys fixed it, the code worked brilliantly.
To get tcpmon working, setup the connection like so:

In your code, point your service to http://127.0.0.1:7080. If all goes well, you should see the traffic in the Port Tab.
So next time you get an unexplained Null response, remember to check the namespaces!