• Home
  • About the Author
  • Disclosure Policy
KEEP IN TOUCH

Posts tagged WSDL

Null Response From Web Service

Oct14
2010
Leave a Comment Written by Pieter van der Westhuizen

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:

image

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!

Share this:

  • Twitter
  • Google +1
  • Facebook
  • LinkedIn
  • Reddit
  • Digg
  • Send to Kindle
Posted in C#, WCF - Tagged Java, WCF

Recent Posts

  • Outlook 2013 and Visual Studio 2012: Getting started for VSTO developers
  • Office 2013 and Visual Studio 2012: Getting started for VSTO developers
  • Excel 2013 single document interface (SDI): How to rebuild your task panes to support it
  • Converting a .vdproj to WiX in Visual Studio 2012, 2010, 2008
  • How to dynamically bind Outlook add-in UI elements to the context

Tag Cloud

.net ACCPAC Add-in Express Advanced Regions ASP.Net ASP.Net MVC C# CRM CSLA CSS Datafier Toolkit deployment Entity Framework Excel HTML In-app Analytics Internet Explorer Java jQuery LINQ MS Access MS Excel Ms Outlook MS Project MVC NHibernate ODBC Office 365 Office 2013 sdk SharePoint 2010 silverlight Source control SQL SQL Connector TrackToAct Twitter VB.net Visio Visual Studio Visual Studio 2012 vsto WCF WiX WSDL

Blogroll

  • David Turvey's Blog

EvoLve theme by Theme4Press  •  Powered by WordPress Mythical Man Moth
IT Mythbusting