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

SaajSoapMessage created with default (empty) SoapEnvelope

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.0.1
    • Fix Version/s: 2.4.3, 3.0.4
    • Component/s: Core
    • Labels:
      None

      Description

      It seems like with the fix for SWS-981 check for SOAP 1.1 was added. This results in setting default/empty SoapEnvelope for SaajSoapMessage.

       

      public SaajSoapMessage(SOAPMessage soapMessage, boolean langAttributeOnSoap11FaultString, MessageFactory messageFactory) {
         Assert.notNull(soapMessage, "soapMessage must not be null");
         saajMessage = soapMessage;
         this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString;
         this.messageFactory = messageFactory;
         if (SoapVersion.SOAP_11.equals(getVersion())) {
            MimeHeaders headers = soapMessage.getMimeHeaders();
            if (ObjectUtils.isEmpty(headers.getHeader(TransportConstants.HEADER_SOAP_ACTION))) {
               headers.addHeader(TransportConstants.HEADER_SOAP_ACTION, "\"\"");
            }
         }
      }
      

       Invoking getVersion() results in introspection for SoapEnvelope. This constructor is invoked as part of createMessage() method which sets the soapMessage in doWithMessage() method after the SaajSoapMessage is initialized.

       

      @Override
      public final WebServiceMessage createMessage(WebServiceMessageFactory messageFactory) throws IOException {
         WebServiceMessage message = messageFactory.createWebServiceMessage();
         doWithMessage(message);
         return message;
      }
      

      We started to see our integration tests failing with this upgrade.  

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gregturn Greg Turnquist
                Reporter:
                slad Sachin Lad
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: