I need to validate a SOAP message against a WSDL
?
(in the same way that an XML
file can be validated against a XSD
schema).
I am not calling any webservice;
I just have a SOAP
message and a WSDL
, and I need to verify that the SOAP
message is correct.
without calling the webservice or whatsoever afterwards.
I need to make this validate within a Java program.
Do you know of a small Java library to do this?
ps: I am aware that several JAX-WS
libraries can validate the request/response when you call a webservice. But again, I am not calling any webservice; I have a simple SOAP
message, and a WSDL
, and I a need a function that validates the SOAP
message against the WSDL
.
ps: I am also aware that there tools that can do this, such as SOAPUI
and XMLSpy
. Again, I need to do this validation within my Java program.
ps: I am aware that I could extract the body part of the SOAP
message, and validate it against the XSD
. However, I'd like to validate the entire SOAP
message against the WSDL
.
Copyright Notice:Content Author:「David Portabella」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/7281755/java-validate-soap-message-against-a-wsdl