Announcement Announcement Module
Collapse
No announcement yet.
Add more PayloadValidatingInterceptor to PayloadRootAnnotationMethodEndpointMapping Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add more PayloadValidatingInterceptor to PayloadRootAnnotationMethodEndpointMapping

    Hi,
    I got a problem when i tried to add more than one PayloadValidatingInterceptor to the PayloadRootAnnotationMethodEndpointMapping. When i tried to add it i got error no end point found.

    Code:
    <bean id="supportSchema" class="org.springframework.xml.xsd.SimpleXsdSchema"> 
    		<property name="xsd" value="classpath:/ws/SupportService.xsd"/>
    </bean>
    
    <bean id="SupportService"
    		class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
    		<property name="schema" ref="supportSchema" />
    		<property name="portTypeName" value="Support" />
    		<property name="locationUri"
    			value="......." />
    		<property name="targetNamespace" value="...." />
    		<property name="requestSuffix" value="Request" />
    		<property name="responseSuffix" value="Response" />
    		<property name="createSoap12Binding" value="false" />
    		<property name="createSoap11Binding" value="true" />
    </bean>
    For 2nd schema file

    Code:
    <bean id="subscriptionSchema"	class="org.springframework.xml.xsd.SimpleXsdSchema">
    		<property name="xsd" value="classpath:/com/ect/rbt/core/service/business/ws/SubscriptionService.xsd" />
    	</bean>
    	
    
    	<bean id="SubscriptionService"
    		class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
    		<property name="schema" ref="subscriptionSchema" />
    		<property name="portTypeName" value="Subscription" />
    		<property name="locationUri"
    			value="......." />
    		<property name="targetNamespace" value="......." />
    		<property name="requestSuffix" value="Request" />
    		<property name="responseSuffix" value="Response" />
    		<property name="createSoap12Binding" value="false" />
    		<property name="createSoap11Binding" value="true" />
    	</bean>

    Code:
    <bean id="serviceMapping"
    		class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
    		<property name="interceptors">
    			<list>
    				
    					<ref bean="subscriptionValidationInterceptor"/>
    					<ref bean="supportValidationInterceptor"/>
    				<bean	class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" />
    			</list>
    		</property>
    		<property name="order" value="1" />
    	</bean>
    
    <bean id="supportValidationInterceptor"	class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">
    		<property name="xsdSchema" ref="supportSchema" />
    		<property name="validateRequest" value="true" />
    		<property name="validateResponse" value="false" />
    	</bean>
    
    	<bean id="subscriptionValidationInterceptor"	class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">
    		<property name="xsdSchema" ref="subscriptionSchema" />
    		<property name="validateRequest" value="true" />
    		<property name="validateResponse" value="false" />
    	</bean>
    If i add two validation interceptor then it throw exception. Am i doing any wrong here or is there any alternative way?



    Regards
    Mamun
Working...
X