-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Infinite recursion (StackOverflowError) when serializing a SOAP o…
…bject.
- Loading branch information
Alain Gilbert
committed
Apr 22, 2015
1 parent
3470803
commit 309bb14
Showing
2 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/test/java/com/fasterxml/jackson/databind/ext/TestSOAP.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |