Reputation: 12431
I have a SOAP Pojo object provided below:
As it doesn't have any toString method, How do I print the POJO to the String?
Upvotes: 1
Views: 101
Reputation: 1379
Try static method of ReflectiveToStringBuilder with recursive style from Apache
org.apache.commons.lang3.builder.ReflectionToStringBuilder#toString(java.lang.Object, org.apache.commons.lang3.builder.ToStringStyle)
https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/builder/RecursiveToStringStyle.html
Upvotes: 1