Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2103

Some attributes marshalled through JAXBSource have wrong names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4
    • 2.1.5, 2.2.1
    • None
    • None

    Description

      Hello,

      I'm using CXF through the JAX-WS Provider interface. I set the parametric parameter of the interface to javax.xml.transform.Source.

      The XML results of marshalling a DOMSource or a JAXBSource are different, look for example at the first attribute of the "formatResponse" element (the DOMSource one is correct):

      — DOMSource —

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Header/>
      <SOAP-ENV:Body>
      <formatResponse attribute="attr1" xmlns="http://www.cxftest.org">
      <formattedName>test</formattedName>
      </formatResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      ------------------------------------------------------------------------------------------------------------

      — JAXBSource —

      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SOAP-ENV:Header/>
      <SOAP-ENV:Body>
      <formatResponse formatResponse="attr1" xmlns="http://www.cxftest.org">
      <formattedName>test</formattedName>
      </formatResponse>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      ------------------------------------------------------------------------------------------------------------

      you can find attached a test case.

      Regards

      Valerio Angelini

      Attachments

        1. cxf-JAXBSource-bug.zip
          8 kB
          Valerio Angelini

        Activity

          People

            dkulp Daniel Kulp
            angelini Valerio Angelini
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: