Java Web Services API example error

Hi All,

Running through the example for Java Wcf API, I am running into the following error. Has anyone seen this before?

WARNING: Interceptor for {docs.oasis-open.org/.../wsdl}SecurityTokenService has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>307 Temporary Redirect</title>
</head><body>
<h1>Temporary Redirect</h1>
<p>The document has moved <a href="www.w3.org/.../p>
</body></html>

Appreciate all the help in advance.

Parents
  • Hi Akheil,
    I've seen something like this. My suspicion lies with a wrong url.
    Can you please provide a fiddler capture along with the url of your target deployment.
  • Hi Alex,
    My apologizes for this delayed response, we have been in the middle of upgrading to Knowledge Center. I ran the java example provided and fiddle doesn't log anything, still get the same error, we are using ADFS for auth would that be the reason fiddler doesn't log anything?
  • Fiddler is a proxy developed in .NET. As such, it works automatically with all programs that use the native windows settings for proxies. Java and Firefox don't, so you need to manually configure them to go through Fiddler. Please notice that JAVA will need to explicitly trust the Fiddler's HTTPS certificate. There might be a better alternative for JAVA stacks but I'm not aware of them.

    As far as I know, the only request that fails when Fiddler is acting as proxy is the ws trust windows authentication because it depends on Kerberos tickets and Fiddler doesn't support them. But the example for JAVA has been build with username/password authentication so I don't expect any problems.
  • Hi Alex,
    Here is what I get:
    Jan 24, 2017 2:23:31 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing org.apache.cxf.bus.spring.BusApplicationContext@a0b07b: display name [org.apache.cxf.bus.spring.BusApplicationContext@a0b07b]; startup date [Tue Jan 24 14:23:31 MST 2017]; root of context hierarchy
    Jan 24, 2017 2:23:31 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
    INFO: Loaded configuration file cxf.xml.
    Jan 24, 2017 2:23:31 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
    Jan 24, 2017 2:23:31 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [cxf.xml]
    Jan 24, 2017 2:23:32 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
    INFO: Bean factory for application context [org.apache.cxf.bus.spring.BusApplicationContext@a0b07b]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1036908
    Jan 24, 2017 2:23:32 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1036908: defining beans [cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,cxf.config0,{https://tempuri.org/}CustomBinding_DocumentObj1.jaxws-client.proxyFactory,{https://tempuri.org/}CustomBinding_DocumentObj1.jaxws-client,stsClient1,{http://tempuri.org}CustomBinding_Application1.jaxws-client.proxyFactory,{http://tempuri.org}CustomBinding_Application1.jaxws-client,stsClient2]; root of factory hierarchy
    Jan 24, 2017 2:23:33 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
    INFO: Creating Service {tempuri.org/}DocumentObj from WSDL: file:/C:/JAVA_PROJECTS/SdlTrisoftClient/src/main/resources/wsdl/service1.wsdl
    DocumentObj25.GetFolderLocation(...)
    Jan 24, 2017 2:23:34 PM org.apache.cxf.ws.security.policy.builders.HttpsTokenBuilder build
    WARNING: sp:HttpsToken/wsp:Policy should have a value!
    Jan 24, 2017 2:23:34 PM org.apache.cxf.ws.security.policy.builders.HttpsTokenBuilder build
    WARNING: sp:HttpsToken/wsp:Policy should have a value!
    Jan 24, 2017 2:23:34 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
    INFO: Creating Service {www.w3.org/.../ws-mex}MetadataExchangeService from class org.apache.cxf.ws.mex.MetadataExchange
    Jan 24, 2017 2:23:34 PM org.apache.cxf.services.MetadataExchangeService.MetadataExchangePort.MetadataExchange
    INFO: Outbound Message
    ---------------------------
    ID: 1
    Address: adfs.healthwise.org/.../mex
    Encoding: UTF-8
    Http-Method: POST
    Content-Type: text/xml
    Headers: {Accept=[*/*], SOAPAction=["http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"]}
    Payload: <soap:Envelope xmlns:soap="schemas.xmlsoap.org/.../"><soap:Header><Action xmlns="www.w3.org/.../Action><MessageID xmlns="www.w3.org/.../MessageID><To xmlns="www.w3.org/.../To><ReplyTo xmlns="www.w3.org/.../soap:Envelope>
    --------------------------------------
    Jan 24, 2017 2:23:34 PM org.apache.cxf.services.MetadataExchangeService.MetadataExchangePort.MetadataExchange
    INFO: Inbound Message
    ----------------------------
    ID: 1
    Response-Code: 500
    Encoding: ISO-8859-1
    Content-Type: text/html
    Headers: {content-type=[text/html], Date=[Tue, 24 Jan 2017 21:23:33 GMT], Server=[Microsoft-HTTPAPI/2.0], transfer-encoding=[chunked]}
    --------------------------------------
    Jan 24, 2017 2:23:34 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
    WARNING: Interceptor for {www.w3.org/.../ws-mex}MetadataExchangeService has thrown exception, unwinding now
    org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: (none)
    at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:84)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
    at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
    at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    at com.sun.proxy.$Proxy65.get2004(Unknown Source)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.configureViaEPR(AbstractSTSClient.java:485)
    at org.apache.cxf.ws.security.trust.STSUtils.getClient(STSUtils.java:110)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:425)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:149)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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.SecureConversationOutInterceptor.issueToken(SecureConversationOutInterceptor.java:167)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:69)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:44)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    at com.sun.proxy.$Proxy42.folderLocation(Unknown Source)
    at com.sdl.trisoft.cxf.TestClient.main(TestClient.java:79)

    javax.xml.ws.soap.SOAPFaultException: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: (none)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:155)
    at com.sun.proxy.$Proxy65.get2004(Unknown Source)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.configureViaEPR(AbstractSTSClient.java:485)
    at org.apache.cxf.ws.security.trust.STSUtils.getClient(STSUtils.java:110)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:425)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:149)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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.SecureConversationOutInterceptor.issueToken(SecureConversationOutInterceptor.java:167)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:69)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:44)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    at com.sun.proxy.$Proxy42.folderLocation(Unknown Source)
    at com.sdl.trisoft.cxf.TestClient.main(TestClient.java:79)
    Caused by: org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: (none)
    at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:84)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
    at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
    at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    ... 26 more
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See www.slf4j.org/codes.html for further details.
    Jan 24, 2017 2:23:34 PM org.apache.cxf.services.SecurityTokenService.CustomBinding_DocumentObj1.sct-client.sts-client.SecurityTokenService
    INFO: Outbound Message
    ---------------------------
    ID: 2
    Address: www.w3.org/.../anonymous
    Encoding: UTF-8
    Http-Method: POST
    Content-Type: text/xml
    Headers: {Accept=[*/*], SOAPAction=["http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"]}
    Payload: <soap:Envelope xmlns:soap="schemas.xmlsoap.org/.../"><soap:Body><wst:RequestSecurityToken xmlns:wst="docs.oasis-open.org/.../200512"><wst:SecondaryParameters><trust:KeyType xmlns:trust="docs.oasis-open.org/.../trust:KeyType><trust:Claims xmlns:trust="docs.oasis-open.org/.../200512" Dialect="schemas.xmlsoap.org/.../identity"><wsid:ClaimType xmlns:wsid="schemas.xmlsoap.org/.../identity" Uri="schemas.xmlsoap.org/.../><wsid:ClaimType xmlns:wsid="schemas.xmlsoap.org/.../identity" Uri="sdl.com/.../><wsid:ClaimType xmlns:wsid="schemas.xmlsoap.org/.../identity" Uri="sdl.com/.../wst:RequestType><wsp:AppliesTo xmlns:wsp="schemas.xmlsoap.org/.../policy"><wsa:EndpointReference xmlns:wsa="www.w3.org/.../wst:KeySize><wst:Entropy><wst:BinarySecret Type="docs.oasis-open.org/.../soap:Envelope>
    --------------------------------------
    Jan 24, 2017 2:23:34 PM org.apache.cxf.services.SecurityTokenService.CustomBinding_DocumentObj1.sct-client.sts-client.SecurityTokenService
    INFO: Inbound Message
    ----------------------------
    ID: 2
    Response-Code: 307
    Encoding: ISO-8859-1
    Content-Type: text/html; charset=iso-8859-1
    Headers: {Cache-Control=[max-age=21600], Content-Length=[257], content-type=[text/html; charset=iso-8859-1], Date=[Tue, 24 Jan 2017 21:23:34 GMT], Expires=[Wed, 25 Jan 2017 03:23:34 GMT], Location=[https://www.w3.org/2005/08/addressing/anonymous], Vary=[upgrade-insecure-requests]}
    Payload: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>307 Temporary Redirect</title>
    </head><body>
    <h1>Temporary Redirect</h1>
    <p>The document has moved <a href="www.w3.org/.../p>
    </body></html>

    --------------------------------------
    Jan 24, 2017 2:23:34 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
    WARNING: Interceptor for {docs.oasis-open.org/.../wsdl}SecurityTokenService has thrown exception, unwinding now
    org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>307 Temporary Redirect</title>
    </head><body>
    <h1>Temporary Redirect</h1>
    <p>The document has moved <a href="www.w3.org/.../p>
    </body></html>

    at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:84)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
    at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
    at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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:356)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:465)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:149)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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.SecureConversationOutInterceptor.issueToken(SecureConversationOutInterceptor.java:167)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:69)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:44)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    at com.sun.proxy.$Proxy42.folderLocation(Unknown Source)
    at com.sdl.trisoft.cxf.TestClient.main(TestClient.java:79)

    Jan 24, 2017 2:23:34 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
    WARNING: Interceptor for {docs.oasis-open.org/.../wsdl}SecurityTokenService has thrown exception, unwinding now
    org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>307 Temporary Redirect</title>
    </head><body>
    <h1>Temporary Redirect</h1>
    <p>The document has moved <a href="www.w3.org/.../p>
    </body></html>

    at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:84)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
    at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
    at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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:356)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:465)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:149)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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.SecureConversationOutInterceptor.issueToken(SecureConversationOutInterceptor.java:167)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:69)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:44)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    at com.sun.proxy.$Proxy42.folderLocation(Unknown Source)
    at com.sdl.trisoft.cxf.TestClient.main(TestClient.java:79)

    Jan 24, 2017 2:23:34 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
    WARNING: Interceptor for {tempuri.org/}DocumentObj has thrown exception, unwinding now
    org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>307 Temporary Redirect</title>
    </head><body>
    <h1>Temporary Redirect</h1>
    <p>The document has moved <a href="www.w3.org/.../p>
    </body></html>

    at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:84)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
    at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
    at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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:356)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:465)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:149)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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.SecureConversationOutInterceptor.issueToken(SecureConversationOutInterceptor.java:167)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:69)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:44)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    at com.sun.proxy.$Proxy42.folderLocation(Unknown Source)
    at com.sdl.trisoft.cxf.TestClient.main(TestClient.java:79)

    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>307 Temporary Redirect</title>
    </head><body>
    <h1>Temporary Redirect</h1>
    <p>The document has moved <a href="www.w3.org/.../p>
    </body></html>

    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:155)
    at com.sun.proxy.$Proxy42.folderLocation(Unknown Source)
    at com.sdl.trisoft.cxf.TestClient.main(TestClient.java:79)
    Caused by: org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>307 Temporary Redirect</title>
    </head><body>
    <h1>Temporary Redirect</h1>
    <p>The document has moved <a href="www.w3.org/.../p>
    </body></html>

    at org.apache.cxf.interceptor.StaxInInterceptor.handleMessage(StaxInInterceptor.java:84)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:800)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1592)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1490)
    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1309)
    at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:50)
    at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:223)
    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:622)
    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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:356)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.issueToken(IssuedTokenInterceptorProvider.java:465)
    at org.apache.cxf.ws.security.policy.interceptors.IssuedTokenInterceptorProvider$IssuedTokenOutInterceptor.handleMessage(IssuedTokenInterceptorProvider.java:149)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.ws.security.trust.AbstractSTSClient.issue(AbstractSTSClient.java:753)
    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.SecureConversationOutInterceptor.issueToken(SecureConversationOutInterceptor.java:167)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:69)
    at org.apache.cxf.ws.security.policy.interceptors.SecureConversationOutInterceptor.handleMessage(SecureConversationOutInterceptor.java:44)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133)
    ... 2 more
  • Please consider attaching the Fiddler capture. With the capture file, Fiddler's UI helps a lot with processing the captured session.
    It's also advised to provide more information about what you are trying and how. For example, what each url represents, what is your STS etc. etc. This will help make better sense of what is in the captured session.
Reply Children
No Data