Jan 10th, 2008, 10:45 AM
"Strong-typing" in spring web services
Greetings - we are implementing a web services project in spring and have discovered in testing that the web services are not enforcing input types. Web services built in .NET/Visual Studio by default enforce input types and do not allow clients to 'submit' mal-formatted data (ie, a string when an int is expected).
Is there similar 'strong typing' functionality in the Spring framework and, if yes, could someone point me to documentation that explains how to enable this?
BTW: there's a chance this belongs in the CXF forum and I have cross-posted there.
Last edited by johnoverbaugh; Jan 10th, 2008 at 11:23 AM.
Jan 10th, 2008, 12:13 PM
if you are using some OXM technique like JAXB you would have the same behaviour as in your .NET application since during the marshalling you are implicitly validating the incoming data.
Its up to you. You can also define an interceptor doing plain XML-validation against your schema if your not interested in putting everything in a java object.
I guess in none of the example applications you are able to send the wrong type to any endpoint...