PDA

View Full Version : PayloadValidatingInterceptor validates only once (Websphere)



jeff44
Nov 10th, 2006, 04:50 AM
I've customized the spring-ws-1.0-m2 airline example. Using PayloadValidatingInterceptor with SoapActionEndpointMapping in apache-tomcat-5.5.16 (j2sdk1.4.2_09) works fine.

Using the same code under Websphere 6.0 Testserver (J2RE 1.4.2 IBM Windows 32) validates only once. If both (request and response) is validated the request is validated, but not the response. If the configuration is changed, to validate only the request, the first request is validated and the ws responds with a valid response. But the second request (with the same data) will fail. Error is in both cases identical (except of request/response token in error message):

XML validation error on request: schema_reference.4: Failed to read schema document 'file:/F:/Programs/IBM/Rational/SDP/6.0/runtimes/base_v6/profiles/testprofile/installedApps/xxxNode01Cell/myServer.ear/web.war/airline.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
XML validation error on request: cvc-elt.1: Cannot find the declaration of element 'myns:myRequest'.

If AbstractValidatingInterceptor is patched to always retrieve a validator (in handleRequest() and handleResponse()) the error disappears:


validator = XmlValidatorFactory.createValidator(schemas, schemaLanguage);

The schema and wsdl file is at the right dir position.

Please, can someone help me?

Arjen Poutsma
Nov 12th, 2006, 04:18 AM
Hmm, this sounds like a bug. Could you create an issue over at JIRA (http://opensource.atlassian.com/projects/spring/browse/SWS)?

Thanks,

jeff44
Nov 13th, 2006, 03:16 AM
JIRA issue (http://opensource.atlassian.com/projects/spring/browse/SWS-63) created.