You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/03/02 04:34:02 UTC
svn commit: r917860 - in /cxf/branches/2.2.x-fixes: ./
rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Author: dkulp
Date: Tue Mar 2 03:34:02 2010
New Revision: 917860
URL: http://svn.apache.org/viewvc?rev=917860&view=rev
Log:
Merged revisions 917855 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r917855 | dkulp | 2010-03-01 22:28:21 -0500 (Mon, 01 Mar 2010) | 1 line
Make sure the namespace prefixes are defined in the sts messages.
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=917860&r1=917859&r2=917860&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java (original)
+++ cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java Tue Mar 2 03:34:02 2010
@@ -360,6 +360,7 @@
W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
writer.writeStartElement("wst", "RequestSecurityToken", namespace);
+ writer.writeNamespace("wst", namespace);
boolean wroteKeySize = false;
String keyType = null;
if (template != null) {
@@ -413,8 +414,9 @@
}
} else if (keyType.endsWith("PublicKey")) {
writer.writeStartElement("wst", "UseKey", namespace);
- writer.writeStartElement("http://www.w3.org/2000/09/xmldsig#", "KeyInfo");
- writer.writeStartElement("http://www.w3.org/2000/09/xmldsig#", "KeyValue");
+ writer.writeStartElement("dsig", "KeyInfo", "http://www.w3.org/2000/09/xmldsig#");
+ writer.writeNamespace("dsig", "http://www.w3.org/2000/09/xmldsig#");
+ writer.writeStartElement("dsig", "KeyValue", "http://www.w3.org/2000/09/xmldsig#");
crypto = createCrypto(false);
cert = getCert(crypto);
PublicKey key = cert.getPublicKey();
@@ -524,6 +526,7 @@
W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
writer.writeStartElement("wst", "RequestSecurityToken", namespace);
+ writer.writeNamespace("wst", namespace);
writer.writeStartElement("wst", "RequestType", namespace);
writer.writeCharacters(namespace + "/Validate");
writer.writeEndElement();
@@ -597,6 +600,7 @@
W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
writer.writeStartElement("wst", "RequestSecurityToken", namespace);
+ writer.writeNamespace("wst", namespace);
writer.writeStartElement("wst", "RequestType", namespace);
writer.writeCharacters(namespace + "/Cancel");
writer.writeEndElement();
@@ -661,6 +665,7 @@
XmlSchemaDateFormat fmt = new XmlSchemaDateFormat();
writer.writeStartElement("wst", "Lifetime", namespace);
+ writer.writeNamespace("wsu", WSConstants.WSU_NS);
writer.writeStartElement("wsu", "Created", WSConstants.WSU_NS);
writer.writeCharacters(fmt.format(creationTime));
writer.writeEndElement();
@@ -674,7 +679,9 @@
private void addAppliesTo(XMLStreamWriter writer, String appliesTo) throws XMLStreamException {
if (appliesTo != null && addressingNamespace != null) {
writer.writeStartElement("wsp", "AppliesTo", "http://schemas.xmlsoap.org/ws/2004/09/policy");
+ writer.writeNamespace("wsp", "http://schemas.xmlsoap.org/ws/2004/09/policy");
writer.writeStartElement("wsa", "EndpointReference", addressingNamespace);
+ writer.writeNamespace("wsa", addressingNamespace);
writer.writeStartElement("wsa", "Address", addressingNamespace);
writer.writeCharacters(appliesTo);
writer.writeEndElement();