web services - How do I add custom interceptors to my annotation scanned spring-ws endpoint -


I am using Spring-II 2.1.4.RELEASE and Spring 3.2.8. RELEASE. I'm trying to add an interceptor to my endpoint, but there is no luck yet, though I think my setup is very basic.

I have in my Spring-X XML:

   & Lt; / SWS: Interceptor & gt; & Lt; SWS: annotation driven /> & Lt; Reference: component-scan base-package = "package.with.my.endpoints" /> & Lt; Bean id = "MessageFeature" class = "org.springframework.ws.soap.axiom.AxiomSoapMessageFactory" & gt; & Lt; Property Name = "Payload Caching" Value = "Correct" /> & Lt; / Bean & gt; Spring-WS @ Action Annotations is used to address mapping in the annotated bean in my endpoint:  
  @Endpoint ( "Medicin Card Index Endpoint") Public-Class MedicinesCardides {@ Action ("http: // someuriandversion # GetMedicineCardIdws") @ResponsePayload Public String getMedicineCard (@RequestPayload Element Payload, Soap Message Soap Message) {Return ""; }   

However, when I send a request for my end point, nothing is logged by an interceptor before I thought I had configured the log4j incorrectly though, if I If we make breakpoints in the first line of org.springframework.ws.server.endpoint.AbstractLoggingInterceptor # handleRequest, the breakpoint never triggers.

Then I put a breakpoint inside org.springframework.ws. Soap.server.SoapMessageDispatcher # headerUnderstood I can see that the only interceptor org.springframework.ws.soap.addressing.server.AddressingEndpointInterceptor registered for my endpoint has been added due to action annotation.

I thought that any global interceptor in the XML configuration is being added to the interceptor series for all the endpoints? Although it seems that this is not the case. This is not just logging interceptor, even custom interceptors are not added. So I have to mess something.

I am quite new to using SpringWise - did I miss something in my configuration, or do I need an annotation so that I add an interceptor to the annotation scan last point?

When using component scanning and annotation for Spring-VS, I can add the interceptor to my interceptor series or I need to configure it to ensure that my interceptor is added Is it for my endpoint?

I have found that if I use @SoapAction annotation instead of WS-Addressing @action ( My custom interceptor will be added to the endpoint with the XML config) Boat from Spring-W. Packages.

@Soul Action is not an option, so I got a workaround suggestion in this string forum:

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -