Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public JsonSerializer<?> findSerializer(SerializationConfig config, JavaType typ
String className = rawType.getName();
String factoryName;

if (className.startsWith(PACKAGE_PREFIX_JAVAX_XML)
|| hasSupertypeStartingWith(rawType, PACKAGE_PREFIX_JAVAX_XML)) {
factoryName = SERIALIZERS_FOR_JAVAX_XML;
} else if (doesImplement(rawType, CLASS_NAME_DOM_NODE)) {
if (doesImplement(rawType, CLASS_NAME_DOM_NODE)) {
return (JsonSerializer<?>) instantiate(SERIALIZER_FOR_DOM_NODE);
}
if (className.startsWith(PACKAGE_PREFIX_JAVAX_XML) || hasSupertypeStartingWith(rawType, PACKAGE_PREFIX_JAVAX_XML)) {
factoryName = SERIALIZERS_FOR_JAVAX_XML;
} else {
return null;
}
Expand Down
20 changes: 20 additions & 0 deletions src/test/java/com/fasterxml/jackson/databind/ext/TestSOAP.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.fasterxml.jackson.databind.ext;

import javax.xml.soap.Detail;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class TestSOAP extends com.fasterxml.jackson.databind.BaseMapTest {

public void testSerializeSOAP() throws SOAPException, JsonProcessingException {
ObjectMapper objectMapper = new ObjectMapper();
SOAPFactory fac = SOAPFactory.newInstance();
Detail detailElement = fac.createDetail();
detailElement.setTextContent("test");
String result = objectMapper.writer().writeValueAsString(detailElement);
assertNotNull(result);
}
}