Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8183528

SOAP payload with empty default namespace (xmlns="") sent to WS is null in SOAP implementation

XMLWordPrintable

    • generic
    • generic

      FULL PRODUCT VERSION :
      java version "1.8.0_131"
      Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      WIndows 7 Professional x64 SP1

      A DESCRIPTION OF THE PROBLEM :
      SOAP payload that resets the default namespace will be ignored and end up as empty/null in SOAP service implementation. Example message:
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
         <soapenv:Header/>
         <soapenv:Body>
            <transcode xmlns="http://snellwilcox.com/xmlbinding/icr/2007/04/control">
               <arg0 xmlns="">Content</arg0>
            </transcode>
         </soapenv:Body>
      </soapenv:Envelope>

      The string "Content" will never make it to the service. In the following example the parameter value will always be null/empty:

      public String transcode(String content) {
      ...
      }

      This is believed to be the same issue as http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8159058 but it does not appear to be fixed as claimed in JRE 8u131.

      REGRESSION. Last worked in version 7u76

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a SOAP request as described.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      "Content" should be passed to the SOAP implementation.
      ACTUAL -
      Parameter is null/empty

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No error

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      SOAP XML can use namespace prefixes throughout but it is not possible for us to force this on customers.

            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: