0 Replies Latest reply on May 8, 2007 8:10 PM by tingzhou

    jbossws 1.2.1 questions/potential issues?

    tingzhou

      Hi all,

      I posted this earlier to user forum but I didn't get any response. Thought it might be more appropriate for design forum. Sorry for the reposting...

      I've been using JBossWS 1.2.1 along with Sun's Wiseman API for WS-Management development. After days of hard debugging, here are some of the issues (or maybe non-issues) I found. Either case, I hope the gurus here can shed some light.

      1. WRONG_DOCUMENT_ERR when marshaling a SOAP document complaining that caller tries to append a node to another node that belongs to a different owner document

      Turns out the problem was caused by DOMUtils, which uses ThreadLocal to keep track of owner document. This would work fine if everything is in the same thread. But in my case, Wiseman code constructs a response message, and then pass that response object to a separate handler thread for further processing. And that becomes a _problem_. I'm not sure about the rationale behind the threadlocal mechanism, but to me assuming all DOM processing is in one thread is simply dangerous. Thoughts?

      2. JAXB and JBossWS compatibility issue

      The upper-level code (Wiseman) constructs a SOAP message, and uses JAXB to marshal content to the body, something like "marshaller.marshal(contentObj, getBody())". The result: only the top-level node gets added to the body, but not its decedents. After some digging, I found the problem was caused by SOAPBodyImpl.appendChild(), which constructs a new child from the existing child node. This apparently is a problem for JAXB, since the subsequent tree construction is all based on the original child node. The same issue also occurs to SOAPHeaderImpl.appendChild().

      FYI, I'm using JBossWS 1.2.1GA.

      Thanks,
      Ting