CXF JAXWS Client Returning Null

June 30, 2009

We’re using CXF to generate both our web service and client. For a certain method call, the web service was returning the correct XML (we used tcpmon to make sure of this), but the CXF client was returning null to our code, instead of the returned objects. Other web service methods were returning data correctly, however.

After some research we discovered a difference between the WSDLs for the two method calls. Here’s the correct one:

<xsd:complexType name=”getAllCategoriesResponse”>
<xsd:sequence>
<xsd:element minOccurs=”0″ name=”return” nillable=”true” type=”ns1:ArrayOfCategory”></xsd:element>
</xsd:sequence>
</xsd:complexType>

And here’s the incorrect one:

<xsd:complexType name=”loginResponse”>
<xsd:sequence>
<xsd:element minOccurs=”0″ name=”User” nillable=”true” type=”ns1:User”></xsd:element>
</xsd:sequence>
</xsd:complexType>

Note that the correct xsd:element has a name of “return,” but the incorrect one has a name of “User.” For some reason, the CXF client ignores returned data unless its name is “return”. When we switched “User” to “return,” it worked fine.

If any readers have details on why this is the case, or other light to shed on the issue, please comment. Thanks!


My Top iPhone Apps

June 17, 2009

The “Duh” Category:

  1. Facebook
  2. Pandora

Free:

  1. AudioMemos – voice recording (should be obsolete as soon as 3.0 gets here)
  2. IM+ Lite – all IM apps
  3. ICanHasCheezburger – lots of photo humor blogs
  4. Dictionary
  5. Shazam – recognizes songs on the radio
  6. Flixster – trailers, showtimes

Paid:

  1. Tweetie – twitter client
  2. BibleReader – includes Strong’s
  3. Wedding Day
  4. Outliner

Services, not apps:

  1. Google Sync – use this instead of CalDAV to get better multi-calendar support
  2. Gmail – for free IMAP
  3. Yahoo! Mail – for free push e-mail, so that you get notified as soon as you receive an e-mail

Top Reasons Your YUI Widget Looks Messed Up

June 12, 2009
  1. You created the widget but didn’t call its render() method. When you create it, that seems to update some styles and DOM elements, but not all. Calling render() updates the rest.
  2. You tried to apply the widget to multiple elements, but, since they have the same ID, it was applied to the same element multiple times. This is like the Ghostbusters crossing the streams, and is very bad.