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 Jari Fredriksson <ja...@iki.fi> on 2008/11/04 20:25:49 UTC
Problem with Microsoft WCF and a small patch
WCF uses namespace prefix for Password Type, and the current WSS4J does not like it.
Dunno if it is WCF which is broken, but I had to roll my own wss4j.jar with following addition to UsernameToken.java
passwordType = elementPassword.getAttribute("Type");
144,146d143
< if (passwordType == null || passwordType.length() == 0) {
< passwordType = elementPassword.getAttributeNS(WSConstants.WSSE_NS, "Type");
< }
Would be great if the official build had this or similar solution.
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: Problem with Microsoft WCF and a small patch
Posted by Jari Fredriksson <ja...@iki.fi>.
> Jari,
>
> some time ago (about two weeks) we had some dicussions
> about this topic. This patch fixes a problem that WCF
> generates, IMHO only if WSS4J is at the receiver. What if
> WSS4J is the sender? Does WCF also require a namespace in
> this case also? WCF incorrectly attaches a Namespace to
> the Type attribute (refer to OASIS WSS specifications -
> Usernametoken Profile)
I have WCF as a sender and WSS4J as receiver so the patch works for me. I don't know if WCF requires that incorrect ns for its clients, but I guess no. They must have been tested at least that, their services would be useless if not.
Dunno.
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org
Re: Problem with Microsoft WCF and a small patch
Posted by Werner Dittmann <We...@t-online.de>.
Jari,
some time ago (about two weeks) we had some dicussions about this
topic. This patch fixes a problem that WCF generates, IMHO only if
WSS4J is at the receiver. What if WSS4J is the sender? Does WCF
also require a namespace in this case also? WCF incorrectly
attaches a Namespace to the Type attribute (refer to OASIS WSS
specifications - Usernametoken Profile)
Regards,
Werner
Jari Fredriksson schrieb:
> WCF uses namespace prefix for Password Type, and the current WSS4J does not like it.
>
> Dunno if it is WCF which is broken, but I had to roll my own wss4j.jar with following addition to UsernameToken.java
>
>
>
> passwordType = elementPassword.getAttribute("Type");
>
>
>
> 144,146d143
> < if (passwordType == null || passwordType.length() == 0) {
> < passwordType = elementPassword.getAttributeNS(WSConstants.WSSE_NS, "Type");
> < }
>
>
> Would be great if the official build had this or similar solution.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org