Validation Interceptor problem for PayloadRootAnnotationMethodEndpointMapping
Hi I have three schema file that expose three wsdl file.
Code:
lt;bean id=quot;subscriptionSchemaquot;class=quot;org..xml.xsd.SimpleXsdSchemaquot;gt; lt;property name=quot;xsdquot; value=quot;classpath:/ws/SubscriptionService.xsdquot; /gt;
lt;/beangt;
lt;bean id=quot;subscriptionServicequot;class=quot;org..ws.wsdl.wsdl11.DefaultWsdl11Definitionquot;gt;lt;property name=quot;schemaquot; ref=quot;subscriptionSchemaquot; /gt;
lt;property name=quot;portTypeNamequot; value=quot;subscriptionquot; /gt;.......................................................
lt;/beangt;
lt;bean id=quot;supportSchemaquot; class=quot;org..xml.xsd.SimpleXsdSchemaquot;gt; lt;property name=quot;xsdquot; value=quot;classpath:/ws/SupportService.xsdquot;/gt;
lt;/beangt;
lt;bean id=quot;supportServicequot;
class=quot;org..ws.wsdl.wsdl11.DefaultWsdl11Definitionquot;gt; lt;property name=quot;schemaquot; ref=quot;supportSchemaquot; /gt; lt;property name=quot;portTypeNamequot; value=quot;supportquot; /gt;
.......................................
......................................
lt;/beangt;
lt;bean id=quot;purchaseSchemaquot; class=quot;org..xml.xsd.SimpleXsdSchemaquot;gt; lt;property name=quot;xsdquot; value=quot;classpath:/ws/PurchaseService.xsdquot;/gt;
lt;/beangt;
lt;bean id=quot;purchaseServicequot;
class=quot;org..ws.wsdl.wsdl11.DefaultWsdl11Definitionquot;gt; lt;property name=quot;schemaquot; ref=quot;purchaseSchemaquot; /gt; lt;property name=quot;portTypeNamequot; value=quot;purchasequot; /gt;
.......................................
......................................
lt;/beangt;
Those three schma file expose three wsdl file with the three port name.
Add interceptor to the PayloadRootAnnotationMethodEndpointMapping.
Code:
lt;bean id=quot;serviceMappingquot;class=quot;org..ws.server.endpoint.
mapping.PayloadRootAnnotationMethodEndpointMappingquot;gt;
lt;property name=quot;interceptorsquot;gt;
lt;listgt; lt;bean class=quot;org..ws.server. endpoint.interceptor.PayloadLoggingInterceptorquot; /gt; lt;bean ref=quot;validationInterceptorquot;gt;
lt;/listgt;
lt;/propertygt;
lt;property name=quot;orderquot; value=quot;1quot; /gt;
lt;/beangt;
lt;bean id=quot;validationInterceptorquot; class=quot;org..ws.soap. server.endpoint.interceptor.PayloadValidatingInterceptorquot;gt;
lt;property name=quot;xsdSchemaquot; ref=quot;supportSchemaquot; /gt;
lt;property name=quot;validateRequestquot; value=quot;truequot; /gt;
lt;property name=quot;validateResponsequot; value=quot;falsequot; /gt;
lt;/beangt;
Now the problem is how can i add another two validatingInterceptor for other two schema supscription and purchase. Any clue.
Even I want to do the same thing.
Please provide solution.
Hi Ashisht, I have solved the problem in different way. Please include all the xsd file in the one file. Use this file in validation interceptor instated of single xsd file.
Regards,
Mamun |