You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In saaj-impl version 1.5.x, When trying to import an element created with Document::createElement into a SOAP message it crashes with the exception: java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
This type of import worked fine in java 8 / saaj-impl 1.3.
public void testImportNodeIntoMessage() throws Exception {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.newDocument();
Element request = doc.createElementNS("http://example.com/", "request");
//Adding a DOM level 1 element causes exception when importing
request.appendChild(doc.createElement("DOMLevel1"));
SOAPMessage msg = MessageFactoryImpl.newInstance().createMessage();
Node importNode = msg.getSOAPPart().importNode(request, true);
assertNotNull(msg.getSOAPBody().appendChild(importNode));
}
The text was updated successfully, but these errors were encountered:
jmongard
changed the title
Crash when importing DOM levrvl 1 into SOAP Message
Crash when importing DOM level 1 into SOAP Message
Mar 20, 2020
In saaj-impl version 1.5.x, When trying to import an element created with Document::createElement into a SOAP message it crashes with the exception:
java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
This type of import worked fine in java 8 / saaj-impl 1.3.
The text was updated successfully, but these errors were encountered: