Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend DI tESBConsumer Username Token error - "No username available"

When using tESBConsumer with 'Use Authentication' and 'Username Token' as the option, we are seeing the following error. Please help with details of any additional configurations required for this component. We are using Talend Open Studio DI version 5.5.1.
Exception in component tESBConsumer_1
org.apache.cxf.interceptor.Fault: No username available
    at org.apache.cxf.ws.security.wss4j.policyhandlers.TransportBindingHandler.handleBinding(TransportBindingHandler.java:163)
    at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:170)
    at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355)
    at ...
Caused by: org.apache.cxf.ws.policy.PolicyException: No username available
    at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.policyNotAsserted(AbstractBindingBuilder.java:313)
    at org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder.addUsernameToken(AbstractBindingBuilder.java:829)
    at org.apache.cxf.ws.security.wss4j.policyhandlers.TransportBindingHandler.addSignedSupportingTokens(TransportBindingHandler.java:98)
    at org.apache.cxf.ws.security.wss4j.policyhandlers.TransportBindingHandler.handleNonEndorsingSupportingTokens(TransportBindingHandler.java:181)
    at org.apache.cxf.ws.security.wss4j.policyhandlers.TransportBindingHandler.handleBinding(TransportBindingHandler.java:151)
    ... 14 more

Labels (2)
11 Replies
Anonymous
Not applicable
Author

Hi,
Please have a look at a jira issue: https://jira.talendforge.org/browse/TESB-12223
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
Thanks for your response. But, I didn't understand how the issues discussed in the link has any connection to my use case. I am setting the username and password values in the fields provided for the 'Username Token' option.
Thanks,
Sudha
_AnonymousUser
Specialist III
Specialist III

Hi Sabrina,
I agree with sballa the link you mentioned talks about the error when the username and password are not mentioned and authentication method  is selected. I am facing the similar issue mentioned by sballa. I think talend tesbconsumer does not support the authentication where in the WSDL you are using has a WS-SecucurityPolicy fragment in it that describes the UsernameToken policy. In this case WSS4JOutInterceptor should not be configured but Talend component does it by default. I am pasting the relevant links here. 

Our web service works fine with soap-ui and when tried with Talend ESB Consumer it fails consistently with the correct credentials, error is same as mentioned in the stackoverflow link above.
org.apache.cxf.interceptor.Fault: No username available
 at org.apache.cxf.ws.security.wss4j.policyhandlers.TransportBindingHandler.handleBinding(TransportBindingHandler.java:161)
 at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:170)
 at org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(PolicyBasedWSS4JOutInterceptor.java:90)
 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.endpoint.ClientImpl.invoke(ClientImpl.java:350)
 at nab_121_merge_ccw.nra_0_1.nra$GenericConsumer.invoke(nra.java:623)
 at nab_121_merge_ccw.nra_0_1.nra.tFixedFlowInput_1Process(nra.java:1479)
 at nab_121_merge_ccw.nra_0_1.nra.runJobInTOS(nra.java:1989)
 at nab_121_merge_ccw.nra_0_1.nra.main(nra.java:1854)
Anonymous
Not applicable
Author

Hi,
Would you mind opening a work item jira issue of ESB project on Talend Bug Tracker? Our ESB developer will check it.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
I have created https://jira.talendforge.org/browse/TDI-30985 . Please do the needful. Thanks for the help.
Thanks,
Sudha
Anonymous
Not applicable
Author

HI,
This issue is assigned to ESB team.
https://jira.talendforge.org/browse/TESB-14454
We'll keep you posted if there is any solution. Feel free to communicate with our ESB developer in this jira issue if you have any question on it.

Best regards
Sabrina
Anonymous
Not applicable
Author

HI,
This issue is assigned to ESB team.

We'll keep you posted if there is any solution. Feel free to communicate with our ESB developer in this jira issue if you have any question on it.

Best regards
Sabrina

Hi xdshi. 
I am getting the same error than sballa and the assigned  issue  was not solved. 
I need your help please. any suggestion?
Anonymous
Not applicable
Author

Anonymous
Not applicable
Author

Using job exported to Runtime call was successful:
---------------------------
ID: 1
Address: https://secure.p03.eloqua.com/API/1.2/Service.svc
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=, SOAPAction=}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse 0683p000009M9p6.pngecurity soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-2bf3cea0-9b12-4c2a-b5b0-0cd2de48fdeb"><wsse:Username>username</wsse:Username><wsse 0683p000009MAB6.pngassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse 0683p000009MAB6.pngassword></wsse:UsernameToken></wsse 0683p000009M9p6.pngecurity></soap:Header><soap:Body><tns:ListEntityTypes xmlns:tns="https://secure.eloqua.com/API/1.2"/></soap:Body></soap:Envelope>
--------------------------------------
----------------------------
ID: 1
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml; charset=utf-8
Headers: {Cache-Control=, connection=, Content-Length=, content-type=, Date=, P3P=}
Payload: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">The company, user name or password you have entered is incorrect.</faultstring></s:Fault></s:Body></s:Envelope>
--------------------------------------