I am having a jsr181 endpoint that follows 'contract first' paradigm with
following settings:

<jsr181:endpoint pojo="#myService" 
                   wsdlResource="classpath:my.wsdl" 
                   style="document"
                   typeMapping="jaxb2"
                   annotations="jsr181"
                   serviceInterface="myclass" />

I am using wsgen task to generate all mapping classes. 
I have noticed that I can send invalid payload message to this service and
it will not complain. While debugging I have noticed a parameter in xfire:
org.codehaus.xfire.jaxb2.JaxbType.ENABLE_VALIDATION. After turning it on in
debbuger the payload is validated.

I figured out that this property could be turned on in
Jsr181Endpoint.registerService method by inserting following line:

getXFireService().setProperty(JaxbType.ENABLE_VALIDATION,
Boolean.TRUE.toString());


As a workaround I could write a custom Jsr181ExchangeProcessor which somehow
would inject this property. However, the problem is that there is no setter
for processor property. 


Is there any other way to achive automatic validation of the payload? Maybe
I did not configure my service correctly?
Shall I raise JIRA enhancment for this endpoint?


Michal



-- 
View this message in context: 
http://www.nabble.com/jsr181---validating-payload-tf4316406s12049.html#a12290428
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to