Hi Guys!

Thanks for your replies, I will try to supply the requested information.
This is the loop that occurs around and around (the object reference in the
logs will change though). 

>From the stacktrace even further below it could suggest that the endpoint
read from the ADFS is not properly set, although when I stepped through the
code I at least found the endpoint of the ADFS in
"Endpoint.endpointInfo.address.address.value" =
http://adfs.msad.lab.company.se/adfs/services/trust/13/issuedtokenasymmetricbasic256.
But perhaps that is not enough? 

Regarding the WSDL there is nothing "simple" with it since it is from ADFS
;) and I have activated a lot of endpoints in some futile attempts in
getting it to work. I´ll try to remove the endpoints not in use and it
should get a lot simpler :)

I think the loglevel should be set to FINE in the output below. 

09:39:57.422 DEBUG org.apache.ws.security.util.Loader - Trying to find
[C:\Users\DOMAINUSERID\Documents\certificateAuthority\tomcat.jks] using
WebappClassLoader
  context: /webclient
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@2f93c0cf
 class loader.
09:39:57.422 DEBUG org.apache.ws.security.util.Loader - Trying to find
[C:\Users\DOMAINUSERID\Documents\certificateAuthority\tomcat.jks] using
WebappClassLoader
  context: /webclient
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@2f93c0cf
 class loader.
09:39:57.424 DEBUG org.apache.ws.security.util.Loader - Trying to find
[C:\Users\DOMAINUSERID\Documents\certificateAuthority\tomcat.jks] using
ClassLoader.getSystemResource().
09:39:57.425 DEBUG o.a.w.s.components.crypto.Merlin - The KeyStore
C:\Users\DOMAINUSERID\Documents\certificateAuthority\tomcat.jks of type jks
has been loaded
09:39:57.426 DEBUG org.apache.cxf.endpoint.ClientImpl - Invoke, operation
info: [BindingOperationInfo:
{http://schemas.microsoft.com/ws/2008/06/identity/securitytokenservice}Trust13IssueAsync],
params: [javax.xml.transform.dom.DOMSource@1c94140a]
09:39:57.426 DEBUG org.apache.cxf.endpoint.ClientImpl - set requestContext
to message
be{ws-security.sts.client=org.apache.cxf.ws.security.trust.STSClient@3d2656d3,
ws-security.username=czc13448rp.ad01.company.se,
ws-security.sts.token.properties={org.apache
.ws.security.crypto.merlin.keystore.file=C:\Users\DOMAINUSERID\Documents\certificateAuthority\tomcat.jks,
org.apache.ws.security.crypto.merlin.keystore.password=qwer1234,
org.apache.ws.security.crypto.merlin.keystore.type=jks,
org.apache.ws.security.crypto.merlin.keystore.
alias=czc13448rp.ad01.company.se},
ws-security.sts.token.username=migissuingcalabtype3v1,
org.apache.cxf.ws.security.tokenstore.TokenStore=org.apache.cxf.ws.security.tokenstore.EHCacheTokenStore@40b4579a,
ws-security.callback-handler=se.company.webc
lient.util.ClientCallbackHandler@609ba29e,
ws-security.sts.disable-wsmex-call-using-epr-address=true,
SOAPAction=http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue,
org.apache.cxf.jaxws.context.WrappedMessageContext.SCOPES={ws-security.sts.token.properties=AP
PLICATION, ws-security.sts.client=APPLICATION,
ws-security.username=APPLICATION,
ws-security.sts.token.username=APPLICATION,
ws-security.sts.disable-wsmex-call-using-epr-address=APPLICATION,
ws-security.callback-handler=APPLICATION, ws-security.saml-callback-handler=
APPLICATION, org.apache.cxf.message.Message.ENDPOINT_ADDRESS=APPLICATION},
ws-security.saml-callback-handler=se.company.webclient.util.ClientCallbackHandler@609ba29e,
org.apache.cxf.message.Message.ENDPOINT_ADDRESS=https://czc13448rp.ad01.company.se
:8443/company.webservice/samltoken/SamlToken}
09:39:57.426 DEBUG org.apache.cxf.endpoint.ClientImpl - Interceptors
contributed by bus:
[org.apache.cxf.interceptor.LoggingOutInterceptor@62fdfcef,
org.apache.cxf.ws.policy.PolicyOutInterceptor@10e8e1af,
org.apache.cxf.interceptor.LoggingOutInterceptor@2938b0d5]
09:39:57.426 DEBUG org.apache.cxf.endpoint.ClientImpl - Interceptors
contributed by client: []
09:39:57.426 DEBUG org.apache.cxf.endpoint.ClientImpl - Interceptors
contributed by endpoint:
[org.apache.cxf.interceptor.MessageSenderInterceptor@48e18517]
09:39:57.426 DEBUG org.apache.cxf.endpoint.ClientImpl - Interceptors
contributed by binding:
[org.apache.cxf.interceptor.AttachmentOutInterceptor@4de8ce62,
org.apache.cxf.interceptor.StaxOutInterceptor@6f45abe3,
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFi
lterInterceptor@4717fd27,
org.apache.cxf.interceptor.BareOutInterceptor@77ed2fe7,
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@74e42433,
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@2e04cc39]
09:39:57.427 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was created. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

09:39:57.427 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking
handleMessage on interceptor
org.apache.cxf.ws.policy.PolicyOutInterceptor@10e8e1af
09:39:57.427 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.ws.security.policy.interceptors.SecurityVerificationOutInterceptor@70ab4338
to phase pre-logical
09:39:57.427 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was modified. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

09:39:57.427 DEBUG o.a.c.ws.policy.PolicyOutInterceptor - Added interceptor
of type SecurityVerificationOutInterceptor
09:39:57.427 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor@7bca4b51 to
phase pre-protocol
09:39:57.427 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was modified. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

09:39:57.428 DEBUG o.a.c.ws.policy.PolicyOutInterceptor - Added interceptor
of type PolicyBasedWSS4JOutInterceptor
09:39:57.428 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor@1e16f255
to phase prepare-send
09:39:57.428 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was modified. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

09:39:57.428 DEBUG o.a.c.ws.policy.PolicyOutInterceptor - Added interceptor
of type IssuedTokenOutInterceptor
09:39:57.428 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor@747fb9e1
to phase prepare-send
09:39:57.428 DEBUG o.a.c.ws.policy.PolicyOutInterceptor - Added interceptor
of type IssuedTokenOutInterceptor
09:39:57.428 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.ws.addressing.impl.MAPAggregatorImpl@6d849e87 to phase
pre-logical
09:39:57.428 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was modified. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [MAPAggregatorImpl, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

09:39:57.428 DEBUG o.a.c.ws.policy.PolicyOutInterceptor - Added interceptor
of type MAPAggregatorImpl
09:39:57.428 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.ws.addressing.soap.MAPCodec@1dc3e93d to phase pre-protocol
09:39:57.428 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was modified. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [MAPAggregatorImpl, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor, MAPCodec]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]

09:39:57.428 DEBUG o.a.c.ws.policy.PolicyOutInterceptor - Added interceptor
of type MAPCodec
09:39:57.429 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.ws.policy.PolicyVerificationOutInterceptor@2ced1f5 to phase
post-stream
09:39:57.429 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was modified. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [MAPAggregatorImpl, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor, MAPCodec]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]

09:39:57.429 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking
handleMessage on interceptor
org.apache.cxf.ws.addressing.impl.MAPAggregatorImpl@6d849e87
09:39:57.429 DEBUG o.a.cxf.ws.addressing.ContextUtils - retrieving MAPs from
context property javax.xml.ws.addressing.context
09:39:57.429 DEBUG o.a.cxf.ws.addressing.MAPAggregator - MAPs retrieved from
message null
09:39:57.429 DEBUG o.a.c.w.a.impl.InternalContextUtils - Determining action
09:39:57.429 DEBUG o.a.c.w.a.impl.InternalContextUtils - action determined
from service model:
http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue
09:39:57.429 DEBUG o.a.c.w.a.impl.InternalContextUtils - action:
http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue
09:39:57.430 DEBUG o.a.cxf.ws.addressing.ContextUtils - associating MAPs
with context property javax.xml.ws.addressing.context.outbound
09:39:57.430 DEBUG o.a.cxf.ws.addressing.ContextUtils - retrieving MAPs from
context property javax.xml.ws.addressing.context.outbound
09:39:57.430 DEBUG o.a.cxf.ws.addressing.ContextUtils - current MAPs
[MessageId: urn:uuid:39b5a0fd-e398-428f-b506-5376c6b7cab1, Action:
http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue, To:
https://czc13448rp.ad01.company.se:8443/company.w
ebservice/samltoken/SamlToken, ReplyTo:
http://www.w3.org/2005/08/addressing/anonymous, FaultTo:
http://www.w3.org/2005/08/addressing/anonymous]
09:39:57.430 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking
handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapHeaderOutFilterInterceptor@4717fd27
09:39:57.430 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking
handleMessage on interceptor
org.apache.cxf.ws.security.policy.interceptors.SecurityVerificationOutInterceptor@70ab4338
09:39:57.430 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking
handleMessage on interceptor
org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor@74e42433
09:39:57.430 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking
handleMessage on interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor@48e18517
09:39:57.430 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Adding interceptor
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor@603caedf
to phase prepare-send-ending
09:39:57.430 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Chain
org.apache.cxf.phase.PhaseInterceptorChain@3dafab2e was modified. Current
flow:
  setup [PolicyOutInterceptor]
  pre-logical [MAPAggregatorImpl, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  post-logical [SoapPreProtocolOutInterceptor]
  prepare-send [MessageSenderInterceptor, IssuedTokenOutInterceptor]
  pre-stream [LoggingOutInterceptor, AttachmentOutInterceptor,
StaxOutInterceptor]
  pre-protocol [PolicyBasedWSS4JOutInterceptor, MAPCodec]
  write [SoapOutInterceptor]
  marshal [BareOutInterceptor]
  post-stream [PolicyVerificationOutInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]

09:39:57.430 DEBUG o.a.cxf.phase.PhaseInterceptorChain - Invoking
handleMessage on interceptor
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor@1e16f255
------------------------------------------------------------------------------------------------------
This is the stack trace that will eventually follow: 

2014-maj-22 09:48:33 org.apache.catalina.core.StandardWrapperValve invoke
ALLVARLIG: Servlet.service() for servlet [mvc-dispatcher] in context with
path [/webclient] threw exception [Handler processing failed; nested
exception is java.lang.StackOverflowError] with root cause
java.lang.StackOverflowError
        at java.net.URL.<init>(Unknown Source)
        at java.net.URL.<init>(Unknown Source)
        at sun.misc.URLClassPath$FileLoader.getResource(Unknown Source)
        at sun.misc.URLClassPath$FileLoader.findResource(Unknown Source)
        at sun.misc.URLClassPath.findResource(Unknown Source)
        at java.net.URLClassLoader$2.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findResource(Unknown Source)
        at java.lang.ClassLoader.getResource(Unknown Source)
        at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
        at
org.apache.catalina.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1542)
        at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown
Source)
        at 
org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown
Source)
        at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
        at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
        at
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown
Source)
        at org.apache.cxf.helpers.XMLUtils.getParser(XMLUtils.java:148)
        at org.apache.cxf.helpers.XMLUtils.newDocument(XMLUtils.java:184)
        at
org.apache.cxf.staxutils.W3CDOMStreamWriter.<init>(W3CDOMStreamWriter.java:50)
        at
org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:672)
        at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:62)
        at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:56)
        at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:52)
        at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.getTokenFromSTS(IssuedTokenInterceptorProvider.java:378)
        at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:487)
        at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:150)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:565)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:474)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:377)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
        at
org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:782)
        at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:62)
        at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:56)
        at
org.apache.cxf.ws.security.trust.STSClient.requestSecurityToken(STSClient.java:52)
        at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.getTokenFromSTS(IssuedTokenInterceptorProvider.java:378)
        at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:487)
        at
org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:150)







--
View this message in context: 
http://cxf.547215.n5.nabble.com/Issue-with-WS-Trust-using-security-tokens-SAML-assertions-tp5744142p5744317.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to