Web services client & server are implemented in Java. Here the Client builds the DomainID java object and invokes an operation and passes DomainID. Code works fine even if the client sets a value i.e out of range from 0-999. Right now I am validating the data manually on the server side.
Since on the server side I am receiving java object as input, I can NOT use schema defined in WSDL for validation.
Does anyone of you know IF there is a way to inform SOAP Runtime dont send the soap message to the server if input is not valid as per the schema defined in WSDL??
Originally posted by Janardhan Kotha: Does anyone of you know IF there is a way to inform SOAP Runtime dont send the soap message to the server if input is not valid as per the schema defined in WSDL??
You haven't indicated which web service API (JAX-RPC, JAX-WS) and which Web service toolkit (Axis, Axis 2, Glassfish Apache CXF, etc.) you are using.
Many SOAP web service toolkits do not validate incoming documents against the schema for performance reasons. And if they did you would need to be able to configure how schema validation errors map to SOAP faults (which themselves need to appear in the WSDL).
So the only recourse is to develop a SOAP Message handler that validates the incoming document and then issue an appropriate SOAP fault if the validation fails.