Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-248

DomPoxMessage not clearing DOM on setting the result


    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.5 M1, 1.0.3
    • Component/s: Core
    • Labels:
    • Environment:
      Spring-WS 1.02, JDK 1.6.0_02


      I am using the POX method to implement a simple XML service. The problem I am having has to do with the XML transformations. The way the PayloadTransformingInterceptor is implemented, it sets the transformation result on the same Document object in DomPoxMessage as the source dom. This is ending up just appending the transformed XML to the original XML.
      I wrote my own interceptor and it ended up being the same result. I also tried to add a new method setDocument(Document) to the DomPoxMessage class. I then stored the result of transformation in a new DomResult and then set the resulting dom on the DomPoxMessage. It works fine upto this point, but then somewhere during the internals of Spring-WS it ends up causing a problem and starts throwing null pointer exceptions.

      This has been really frustrating and considering that there is barely any documentation on the POX in general, this is really turning out to be a loosing cause.
      Reply With Quote

      Old 12-03-2007, 04:56 PM
      Arjen Poutsma Arjen Poutsma is offline
      Senior Member
      Spring Team

      Join Date: Jul 2005
      Location: Rotterdam, the Netherlands
      Posts: 1,166
      I think this is something I can fix by simply emptying the document if setPayloadResult() is called (similar to SOAP). If you create a JIRA issue, I will look at it.

      I will also try and add some POX documentation in 1.5, or maybe a sample.
      Arjen Poutsma
      Spring Web Services Dev Lead
      Please read the FAQ


          Issue Links



              • Assignee:
                arjen.poutsma Arjen Poutsma
                atifmk Atif Khan
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: