Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOMScanner ignores default namespace at scan method. #1489

Closed
petr-mates opened this issue Nov 10, 2020 · 0 comments · Fixed by #1588
Closed

DOMScanner ignores default namespace at scan method. #1489

petr-mates opened this issue Nov 10, 2020 · 0 comments · Fixed by #1588

Comments

@petr-mates
Copy link

When default namespace is declared in parent node public void scan( Element e) throws SAXException ignores it and then Unmarshaller fails.

I have Spring Web Service application, and Unmarshaller fails to create instance of EnvelopeSubject, because
xsi:type is from default namespace and default namespace is declared in S:Body element.
Everythink is ok, when default namespace is declared at SaveApprovalProcessRequest element

Spring calls unmarshaller.unmarshal(source) where source is DomSource name = "SaveApprovalProcessRequest"
from my example
example

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <S:Body xmlns="http://application/approval_proccess">
        <SaveApprovalProcessRequest xmlns:ns2="http://application/data">
            <envelope>
                <approvalSubject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="EnvelopeSubject">
                    <id>1</id>
                </approvalSubject>                
            </envelope>
           .....
        </SaveApprovalProcessRequest>
    </S:Body>
</S:Envelope>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants