Skip to content

Adding header element is not reflected in Document [SWS-1087] #1153

Description

@gregturn

Krzysztof Gonia opened SWS-1087 and commented

After calling addHeaderElement method on SoapHeader element changes in header are not reflected document structure. 

Code samples:

Let's add element to Header

SoapHeader soapHeader = soapMessage.getSoapHeader();
QName qName = new QName("http://www.w3.org/2005/08/addressing", "Action", "a");
SoapHeaderElement soapHeaderElement = soapHeader.addHeaderElement(qName);
soapHeaderElement.setMustUnderstand(true);
soapHeaderElement.setText("some text");

soapMessage is instance of SaajSoapMessage

Now, after calling soapMessage.getDocument() method this change is not reflected in document structure.

Message that is sent has this element but It cause tests failures when MockWebServiceServer is used. SoapEnvelopeDiffMatcher compares Documents which are different that expected because adding header action is not reflected in document structure.  


Affects: 3.0.8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions