Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

ws-security interceptors issue

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

So i have created web services which is working ok and @Endpoint is detected when there is no ws-security enabled (Wss4jSecurityInterceptor). If I enable security   I get: No Endpoint found.

I guess the main issue here is that the @Endpoint is triggered before interceptor decodes request from client (I guess).

I am trying like this if interceptor will be triggered but i get different error which i am unable to fix:

Error:(10, 8) java: softnet.si.ldp.client.GlobanEndointInterceptor is not abstract and does not override abstract method afterCompletion(org.springframework.ws.context.MessageContext,java.lang.Object,java.lang.Exception) in org.springframework.ws.server.EndpointInterceptor



import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;
import org.springframework.ws.context.MessageContext;
import org.springframework.ws.server.EndpointInterceptor;




My interceptors:
 

thank you for all help!



 
Bartender
Posts: 1944
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EndpointInterceptor is an interface with 4 methods definitions.
Your GlobanEndpointInterceptor only overrides 2 of them. So, you need to define the implementations of the other two methods.

Reference: https://docs.spring.io/spring-ws/docs/2.2.3.RELEASE/api/index.html?org/springframework/ws/server/EndpointInterceptor.html
 
miha zoubek
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Himai Minh wrote:EndpointInterceptor is an interface with 4 methods definitions.
Your GlobanEndpointInterceptor only overrides 2 of them. So, you need to define the implementations of the other two methods.

Reference: https://docs.spring.io/spring-ws/docs/2.2.3.RELEASE/api/index.html?org/springframework/ws/server/EndpointInterceptor.html




@Himai Minh thank you. This was the case. But the main issue perssist. I do not know why EndpointInterceptor in not triggered when request is recevied.





interceptor class:



}


thank you
 
Himai Minh
Bartender
Posts: 1944
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find this site helpful https://memorynotfound.com/spring-ws-intercept-request-response-soap-messages/
You may need new PayloadRootSmartSoapEndpointInterceptor(new GlobanEndpointInterceptor()).
 
miha zoubek
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Himai Minh wrote:You may find this site helpful https://memorynotfound.com/spring-ws-intercept-request-response-soap-messages/
You may need new PayloadRootSmartSoapEndpointInterceptor(new GlobanEndpointInterceptor()).



Hi @Himai Minh i tried like this but not working in my case. Thing is that the request is send to @Endpoint before it is decrypted and checked with security Interecptor. Due to this it can not find @Endpoint. Why it does not reach interceptor i am just unable to figure it out

Can some please help me.
 
Himai Minh
Bartender
Posts: 1944
13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Miha,
I am not sure if this stackoverflow thread is helpful :
https://stackoverflow.com/questions/62573785/spring-ws-endpointinterceptor-not-invoked
I am not sure if you should use WsConfigurationSupport instead of WsConfigurerAdapter.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic