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

DomPoxMessage not clearing DOM on setting the result

    Details

    • 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:
      None
    • Environment:
      Spring-WS 1.02, JDK 1.6.0_02

      Description

      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
      atifmk

      #2
      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
      Default
      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

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Fixed, both in 1.5 M1, and 1.0.3.

          Show
          arjen.poutsma Arjen Poutsma added a comment - Fixed, both in 1.5 M1, and 1.0.3.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing issues for 1.5.0 M1

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.5.0 M1

            People

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

              Dates

              • Created:
                Updated:
                Resolved: