Search code examples
javasoapcxf

What configuration is needed to include empty SOAP body parameters in Apache CXF?


Apache CXF by default does not send empty SOAP body parameters (elements). How can CXF be configured to include these as self-closing/empty tags?

It may be because this particular web service marks the elements as Optional, but when the parameters are left out entirely, the service complains.


Solution

  • The issue in my case was that I was sending null values, and I needed to change this to be empty values instead.