Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7112

Preamble is omitted when supplying WSDL and external XSDs

    Details

    • Steps to Reproduce:
      Hide

      Deploy a webservice with these qualities:

      • Uses "wsdlLocation" attribute of the @WebService annotation
      • The referenced WSDL has an XML preamble which specifies a non-default character encoding.
      • Try to access the WSDL via the endpoint "?wsdl" URL
      Show
      Deploy a webservice with these qualities: Uses "wsdlLocation" attribute of the @WebService annotation The referenced WSDL has an XML preamble which specifies a non-default character encoding. Try to access the WSDL via the endpoint "?wsdl" URL
    • Affects:
      Release Notes
    • Release Notes Text:
      When requesting a WSDL or external XML schema from a JBossWS endpoint (e.g. with "?wsdl"), the XML declaration was omitted. This issue has been resolved and the declaration is now included with an encoding of "UTF-8".
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      NEW

      Description

      The XML preamble is omitted when serving external WSDL resources. This can cause problem when specifying a non-default character set using the XML preamble.

      For example, you access an external XSD:

      http://localhost:8080/testService/Service?wsdl&resource=external.xsd

      The file on the server starts like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <xsd:schema ...>
        ...
      </xsd:schema>
      

      But when it's served to a client, it starts like this:

      <xsd:schema ...>
        ...
      </xsd:schema>
      

      This affects the WSDL and any resources referenced by the WSDL.

      Looking at the code, this is what happens when a request for a WSDL resource is received:

      • The WSDL resource is read in from the file system.
      • It is then parsed into a DOM tree.
      • JBossWS then replaces references to external resources with appropriate URLs that can be reached using "?wsdl" URLs.
      • The DOM tree is then marshaled to XML text.

      In this process, the XML preamble is lost.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  klape Kyle Lape
                  Reporter:
                  klape Kyle Lape
                  Writer:
                  Russell Dickenson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: