Guess what this blog is about Sherlock! :) - Jeryl Cook

Thursday, June 10, 2010

HIERARCHY_REQUEST_ERR and Spring-WS

Stuck on a issue for longer than 1 hour!

if you are using Spring-WS 1.5.x WebServiceTemplate
and having issues combining your content using JAXB binding. Do not use

org.springframework.ws.soap.axiom.saaj.SaajSoapMessageFactory

use the Axiom factory instead.
org.springframework.ws.soap.axiom.AxiomSoapMessageFactory 
]

There is a bug in the SAAJ factory that will produce the annoying exception:

org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: An attempt was made to insert a node where it is not permitted. 

Hope this helps someone!

Labels: ,