On Jul 8, 2008, at 4:10 AM, emjayzed wrote:


Will do: As it stands, I'm now attempting to write an interceptor that will perform schema validation just on the SOAP body (rather than turning on CXF
schema validation, which will attempt to validate the entire request).
However, as a new arrival in CXF-land, I'm finding the
org.apache.cxf.binding.soap API a little bewildering. I'd appreciate any pointers which demonstrate how to access the SOAP body from the message (as
passed into handleMessage()) and to pass it to an XML validator
(javax.xml.validation.Validator)

The EASIEST thing to do would be to stick an interceptor before the SoapHeaderInterceptor that just does:

message.put("schema-validation-enable", Boolean.FALSE);

and then another after it that does:

message.put("schema-validation-enable", Boolean.TRUE);

That would turn off the validation just for the header processing, but leave it on for the rest of the stuff.

If you want to do all the validation yourself, the easiest would be to configure in the SAAJInInterceptor and then stick an interceptor after it that do msg.getContent(SOAPMessage.class) and use the SAAJ api's to find what you want and use that for validation.


Dan





Regards,

Martin


--
View this message in context: 
http://www.nabble.com/schema-validation-problem-with-SoapHeader-tp18311410p18334090.html
Sent from the cxf-user mailing list archive at Nabble.com.


---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to