You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by "Sérgio Patrício (JIRA)" <ji...@apache.org> on 2008/06/04 16:43:45 UTC
[jira] Commented: (WSS-68) No way to create a UsernameToken with
absent element
[ https://issues.apache.org/jira/browse/WSS-68?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602304#action_12602304 ]
Sérgio Patrício commented on WSS-68:
------------------------------------
I was trying to use this and got an error.
My code:
Document doc = ...
WSSecHeader secHeader = new WSSecHeader();
secHeader.insertSecurityHeader(doc);
WSSecUsernameToken builder = new WSSecUsernameToken();
builder.setUserInfo("user", "password");
builder.setPasswordType(null);
builder.build(doc, secHeader);
And the error:
Caused by: java.lang.NullPointerException
at org.apache.ws.security.message.token.UsernameToken.getFirstNode(UsernameToken.java:479)
at org.apache.ws.security.message.token.UsernameToken.setPassword(UsernameToken.java:418)
at org.apache.ws.security.message.WSSecUsernameToken.prepare(WSSecUsernameToken.java:180)
at org.apache.ws.security.message.WSSecUsernameToken.build(WSSecUsernameToken.java:240)
> No way to create a UsernameToken with absent <Password> element
> ---------------------------------------------------------------
>
> Key: WSS-68
> URL: https://issues.apache.org/jira/browse/WSS-68
> Project: WSS4J
> Issue Type: Bug
> Reporter: George Stanchev
> Fix For: 1.5.4
>
> Attachments: UsernameToken.java, wss4j-1.5.3.patch, WSSecUsernameToken.java
>
>
> We should be able to create UsernameTokens without <Password> in them if needed. Password is an optional element
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org