Java STS Client for SDL API

 Hello,

 

Good Morning.

We have STS Apache CXF SOAP Client to access SDL API.

We have the below long-standing issue that very frequently the token is expired (Let say every 60 minutes/90 minutes) and getting the following exception:

message":"javax.xml.ws.soap.SOAPFaultException: An error occurred when verifying security for the message.","thrown":▶{ … "commonElementCount":0,"localizedMessage":"javax.xml.ws.soap.SOAPFaultException: An error occurred when verifying security for the message.","message":"javax.xml.ws.soap.SOAPFaultException: An error occurred when verifying security for the message.","name":"com.ebsco.sdlgateway.exception.FolderRetrieveException","cause":▶{ … "commonElementCount":82,"localizedMessage":"An error occurred when verifying security for the message.","message":"An error occurred when verifying security for the message.","name":"javax.xml.ws.soap.SOAPFaultException","cause":▶{ … "commonElementCount":82,"localizedMessage":"An error occurred when verifying security for the message.","message":"An error occurred when verifying security for the message.","name":"org.apache.cxf.binding.soap.SoapFault"}}},"endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","contextMap":▶{ … "APPLICATION_ID":"discover.medical.ccms-sdlgateway","APP_VERSION":"315

Below is the STS client code for your verification. And we have CXF files for URL configurations:

public class SDLCxfSTSClient extends org.apache.cxf.ws.security.trust.STSClient {

public SDLCxfSTSClient(Bus b) {
super(b);
super.setSecureConv(false);
super.setWspNamespace(null);
super.setAllowRenewing(false);
super.setAllowRenewingAfterExpiry(false);
super.setSendRenewing(false);
}

@Override
public void setSecureConv(boolean secureConv) {
// This has to be false!
}

@Override
public void setAllowRenewing(boolean allowRenewing) {
// This has to be false!
}

@Override
public void setAllowRenewingAfterExpiry(boolean allowRenewingAfterExpiry) {
// This has to be false!
}

@Override
public void setSendRenewing(boolean sendRenewing) {
// This has to be false!
}

}

 

Any suggestion/thoughts are much appreciated.

NOTE: We also have C# client which we haven't seen this token expiring issue.

 

Thanks,

PaulGregory

Parents
  • If you are sure that the serverside doesn't contain errors, then I assume it is indeed your code (inc Java libraries). Seemingly confirmed by working C# code. As a stop-gap you could catch the specific error and re-authenticate.

    It is unclear which STS and STS version you are using and if you witnessed timeout values match up with a configured one... sometimes setting it to an atypical value like 63 or 54 minutes could help you pinpoint which value is causing this.
Reply
  • If you are sure that the serverside doesn't contain errors, then I assume it is indeed your code (inc Java libraries). Seemingly confirmed by working C# code. As a stop-gap you could catch the specific error and re-authenticate.

    It is unclear which STS and STS version you are using and if you witnessed timeout values match up with a configured one... sometimes setting it to an atypical value like 63 or 54 minutes could help you pinpoint which value is causing this.
Children
No Data