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 co...@apache.org on 2008/10/01 15:56:11 UTC
svn commit: r700768 [1/4] - in /webservices/wss4j/trunk: ./
interop/org/apache/ws/axis/oasis/ src/org/apache/ws/axis/security/
src/org/apache/ws/axis/security/handler/ src/org/apache/ws/security/
src/org/apache/ws/security/action/ src/org/apache/ws/sec...
Author: coheigea
Date: Wed Oct 1 06:56:10 2008
New Revision: 700768
URL: http://svn.apache.org/viewvc?rev=700768&view=rev
Log:
[WSS-144] - Removed tab characters from all source, test and build files.
Removed:
webservices/wss4j/trunk/src/org/apache/ws/security/Todolist.java
Modified:
webservices/wss4j/trunk/README.txt
webservices/wss4j/trunk/build.xml
webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/PWCallback1.java
webservices/wss4j/trunk/maven.xml
webservices/wss4j/trunk/pom.xml
webservices/wss4j/trunk/project.xml
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java
webservices/wss4j/trunk/src/org/apache/ws/axis/security/handler/WSDoAllHandler.java
webservices/wss4j/trunk/src/org/apache/ws/security/WSDocInfo.java
webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java
webservices/wss4j/trunk/src/org/apache/ws/security/WSUsernameTokenPrincipal.java
webservices/wss4j/trunk/src/org/apache/ws/security/action/EncryptionAction.java
webservices/wss4j/trunk/src/org/apache/ws/security/action/SAMLTokenSignedAction.java
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/AbstractCrypto.java
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/BouncyCastle.java
webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
webservices/wss4j/trunk/src/org/apache/ws/security/handler/RequestData.java
webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSEncryptBody.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSAddUsernameToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecBase.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecSignature.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecSignatureConfirmation.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecUsernameToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSignEnvelope.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/SecurityTokenReference.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/Timestamp.java
webservices/wss4j/trunk/src/org/apache/ws/security/message/token/UsernameToken.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/EncryptedKeyProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/Processor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/ReferenceListProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/SAMLTokenProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/SignatureConfirmationProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/SignatureProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/TimestampProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/processor/UsernameTokenProcessor.java
webservices/wss4j/trunk/src/org/apache/ws/security/util/Loader.java
webservices/wss4j/trunk/src/org/apache/ws/security/util/XmlSchemaDateFormat.java
webservices/wss4j/trunk/test/wssec/TestWSSecurityDataRef.java
webservices/wss4j/trunk/test/wssec/TestWSSecurityDataRef1.java
webservices/wss4j/trunk/test/wssec/TestWSSecurityFaultCodes.java
webservices/wss4j/trunk/test/wssec/TestWSSecurityNew15.java
webservices/wss4j/trunk/xdocs/index.xml
Modified: webservices/wss4j/trunk/README.txt
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/README.txt?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/README.txt (original)
+++ webservices/wss4j/trunk/README.txt Wed Oct 1 06:56:10 2008
@@ -59,7 +59,7 @@
of the WS sub-projects:
http://wiki.apache.org/ws/
http://wiki.apache.org/ws/FrontPage/WsFx
-
+
WS-Trust and WS-Secure Conversation specifications
Modified: webservices/wss4j/trunk/build.xml
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/build.xml?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/build.xml (original)
+++ webservices/wss4j/trunk/build.xml Wed Oct 1 06:56:10 2008
@@ -9,7 +9,7 @@
ANT is available from http://jakarta.apache.org/ant/index.html
Prerequisites:
- See the README file
+ See the README file
Build Instructions:
To build, run
@@ -100,8 +100,8 @@
the CLASSPATH includes all required packages (see above
-->
-
-
+
+
<path id="classpath.libraries" description="3rd party libs">
<fileset dir="${dir.libs}">
<include name="**/*.jar"/>
@@ -286,7 +286,7 @@
<!-- ################################################################## -->
<target name="prepare-src" depends="prepare"
- description="This target copies the Java sources and brands the version information">
+ description="This target copies the Java sources and brands the version information">
<!-- create directories -->
<mkdir dir="${build.classes}"/>
</target>
@@ -443,7 +443,7 @@
</path>
<property name="undeploy_xml_property" refid="undeploy_xml_files"/>
- <antcall target="deployWSDD" />
+ <antcall target="deployWSDD" />
<junit printsummary="yes"
haltonfailure="yes"
fork="yes"
@@ -470,7 +470,7 @@
"${build.work}/org/apache/ws/axis/oasis/ping/undeploy.wsdd"/>
</java>
- <junit printsummary="yes"
+ <junit printsummary="yes"
haltonfailure="yes"
fork="yes"
dir="${basedir}">
@@ -568,14 +568,14 @@
</java>
</target>
- <!--
- This runs the selected scenario with SimpleAxisServer locally.
- Before you start this target be sure you have started tcpmon too
+ <!--
+ This runs the selected scenario with SimpleAxisServer locally.
+ Before you start this target be sure you have started tcpmon too
in a separate
- "ant tcpmon" call.
- To run different scenarios use: "ant -DNumber=x scenarioTest"
+ "ant tcpmon" call.
+ To run different scenarios use: "ant -DNumber=x scenarioTest"
to run scenario x
- -->
+ -->
<target name="scenarioTest" depends="compile"
if="junit.present"
description="Runs all JUnit tests">
@@ -590,28 +590,28 @@
<echo message=
"Running interop test scenario ${Number} on SimpleAxisServer"/>
- <antcall target="deployWSDD" />
-
+ <antcall target="deployWSDD" />
+
<java classname="interop.TestScenario${Number}" fork="yes"
dir="${basedir}">
<jvmarg value="-Djava.endorsed.dirs=${basedir}/endorsed"/>
<classpath refid="classpath.library"/>
</java>
- <antcall target="undeployWSDD" />
+ <antcall target="undeployWSDD" />
</target>
-
- <!--
- This runs the selected scenario with SimpleAxisServer locally
+
+ <!--
+ This runs the selected scenario with SimpleAxisServer locally
with perfomance
- timing switched on.
- You may also emable the **.TIME entry in log4j.properties to get
+ timing switched on.
+ You may also emable the **.TIME entry in log4j.properties to get
the internal
- timing.
- To run different scenarios use: "ant -DNumber=x scenarioTest"
+ timing.
+ To run different scenarios use: "ant -DNumber=x scenarioTest"
to run scenario x
- -->
+ -->
<target name="performanceTest" depends="compile"
if="junit.present"
description="Runs all JUnit tests">
@@ -626,17 +626,17 @@
<echo message=
"Running performance test scenario ${Number} on SimpleAxisServer"/>
- <antcall target="deployWSDD" />
+ <antcall target="deployWSDD" />
<java classname="interop.TestScenario${Number}" fork="yes"
dir="${basedir}">
<jvmarg value="-Djava.endorsed.dirs=${basedir}/endorsed"/>
<arg value="-lhttp://localhost:8080/axis/services/Ping${Number}" />
- <arg value="-t" />
+ <arg value="-t" />
<classpath refid="classpath.library"/>
</java>
- <antcall target="undeployWSDD" />
+ <antcall target="undeployWSDD" />
</target>
-
+
<target name="deployWSDD">
<path id="deploy_xml_files">
<fileset dir="${build.work}">
@@ -664,7 +664,7 @@
<arg line="${deploy_xml_property}"/>
</java>
</target>
-
+
<target name="undeployWSDD">
<path id="undeploy_xml_files">
<fileset dir="${build.work}">
@@ -686,8 +686,8 @@
<arg line="${undeploy_xml_property}"/>
</java>
</target>
-
- <!-- generate a report from all the tests.
+
+ <!-- generate a report from all the tests.
requires Xalan or other XSLT engine in ant\lib-->
<target name="report" depends="init">
@@ -737,15 +737,15 @@
<target name="otherdist" depends="init"
description="Build zip for required jars">
- <mkdir dir="${dir.dist}"/>
- <zip destfile=
+ <mkdir dir="${dir.dist}"/>
+ <zip destfile=
"${dir.dist}/${product.shortname}-otherjars-${product.version}.zip">
- <zipfileset prefix="wss4j" dir="."
- includes="lib/*.jar, endorsed/*.jar"/>
- </zip>
- </target>
-
- <target name="srcdist" depends="init" description=
+ <zipfileset prefix="wss4j" dir="."
+ includes="lib/*.jar, endorsed/*.jar"/>
+ </zip>
+ </target>
+
+ <target name="srcdist" depends="init" description=
"Build source zip file for distro">
<mkdir dir="${dir.dist}"/>
<zip destfile=
Modified: webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/PWCallback1.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/PWCallback1.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/PWCallback1.java (original)
+++ webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/PWCallback1.java Wed Oct 1 06:56:10 2008
@@ -1,214 +1,114 @@
/*
-
* Copyright 2003-2004 The Apache Software Foundation.
-
*
-
* Licensed under the Apache License, Version 2.0 (the "License");
-
* you may not use this file except in compliance with the License.
-
* You may obtain a copy of the License at
-
*
-
* http://www.apache.org/licenses/LICENSE-2.0
-
*
-
* Unless required by applicable law or agreed to in writing, software
-
* distributed under the License is distributed on an "AS IS" BASIS,
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
* See the License for the specific language governing permissions and
-
* limitations under the License.
-
*
-
*/
-
-
/**
-
* @author Werner Dittmann (Werner.Dittmann@siemens.com)
-
*/
-
package org.apache.ws.axis.oasis;
-
-
import org.apache.ws.security.WSPasswordCallback;
-
-
-
import javax.security.auth.callback.Callback;
-
import javax.security.auth.callback.CallbackHandler;
-
import javax.security.auth.callback.UnsupportedCallbackException;
-
import java.io.IOException;
-
/**
-
* Class PWCallback
-
*/
-
public class PWCallback1 implements CallbackHandler {
-
-
/** Field key */
-
private static final byte[] key = {
-
(byte) 0x31, (byte) 0xfd, (byte) 0xcb, (byte) 0xda, (byte) 0xfb,
-
(byte) 0xcd, (byte) 0x6b, (byte) 0xa8, (byte) 0xe6, (byte) 0x19,
-
(byte) 0xa7, (byte) 0xbf, (byte) 0x51, (byte) 0xf7, (byte) 0xc7,
-
(byte) 0x3e, (byte) 0x80, (byte) 0xae, (byte) 0x98, (byte) 0x51,
-
(byte) 0xc8, (byte) 0x51, (byte) 0x34, (byte) 0x04,
};
-
/*
-
* (non-Javadoc)
-
* @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
-
*/
-
/**
-
* Method handle
-
*
-
* @param callbacks
-
* @throws java.io.IOException
-
* @throws javax.security.auth.callback.UnsupportedCallbackException
-
*/
-
public void handle(Callback[] callbacks)
-
throws IOException, UnsupportedCallbackException {
-
-
for (int i = 0; i < callbacks.length; i++) {
-
if (callbacks[i] instanceof WSPasswordCallback) {
-
WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
-
-
/*
-
* This usage type is used only in case we received a
-
* username token with a password of type PasswordText or
-
* an unknown password type.
-
*
-
* This case the WSPasswordCallback object contains the
-
* identifier (aka username), the password we received, and
-
* the password type string to identify the type.
-
*
-
* Here we perform only a very simple check.
-
*/
if (pc.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) {
-
- if(pc.getIdentifier().equals("Ron") && pc.getPassword().equals("noR")) {
-
+ if(pc.getIdentifier().equals("Ron") && pc.getPassword().equals("noR")) {
return;
-
- }
-
+ }
if (pc.getPassword().equals("sirhC")) {
-
return;
-
- }
-
+ }
throw new UnsupportedCallbackException(callbacks[i],
-
"check failed");
-
}
/*
-
* here call a function/method to lookup the password for
-
* the given identifier (e.g. a user name or keystore alias)
-
* e.g.: pc.setPassword(passStore.getPassword(pc.getIdentfifier))
-
* for Testing we supply a fixed name here.
-
*/
if (pc.getUsage() == WSPasswordCallback.KEY_NAME) {
-
pc.setKey(key);
-
} else if(pc.getIdentifier().equals("alice")) {
-
pc.setPassword("password");
-
} else if(pc.getIdentifier().equals("bob")) {
-
pc.setPassword("password");
-
} else if(pc.getIdentifier().equals("Ron")) {
-
pc.setPassword("noR");
-
} else {
-
pc.setPassword("sirhC");
-
}
-
} else {
-
throw new UnsupportedCallbackException(callbacks[i],
-
"Unrecognized Callback");
-
}
-
}
-
}
-
}
Modified: webservices/wss4j/trunk/maven.xml
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/maven.xml?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/maven.xml (original)
+++ webservices/wss4j/trunk/maven.xml Wed Oct 1 06:56:10 2008
@@ -137,9 +137,9 @@
<postGoal name="jar">
<ant:mkdir dir="${basedir}/target/lib"/>
</postGoal>
- <!--
+ <!--
<preGoal name="xdoc:jelly-transform">
<attainGoal name="html2xdoc"/>
</preGoal>
- -->
+ -->
</project>
Modified: webservices/wss4j/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/pom.xml?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/pom.xml (original)
+++ webservices/wss4j/trunk/pom.xml Wed Oct 1 06:56:10 2008
@@ -1,350 +1,350 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.ws.security</groupId>
- <artifactId>wss4j</artifactId>
- <name>WSS4J</name>
- <!-- <version>1.5.4</version> -->
- <version>SNAPSHOT</version>
- <description>
- Apache WSS4J is an implementation of the Web Services Security
- (WS-Security) being developed at OASIS Web Services Security TC.
- WSS4J is a primarily a Java library that can be used to sign and
- verify SOAP Messages with WS-Security information. WSS4J will
- use Apache Axis and Apache XML-Security projects and will be
- interoperable with JAX-RPC based server/clients and .NET
- server/clients.
- </description>
- <url>http://ws.apache.org/wss4j/</url>
- <issueManagement>
- <system>JIRA</system>
- <url>http://issues.apache.org/jira/browse/WSS</url>
- </issueManagement>
- <mailingLists>
- <mailingList>
- <name>WSS4J Developer List</name>
- <subscribe>wss4j-dev-subscribe@ws.apache.org</subscribe>
- <unsubscribe>
- wss4j-dev-unsubscribe@ws.apache.org
- </unsubscribe>
- <post>wss4j-dev@ws.apache.org</post>
- <archive>
- http://mail-archives.apache.org/mod_mbox/ws-wss4j-dev/
- </archive>
- <otherArchives>
- <otherArchive>http://www.nabble.com/WSS4J-f2398.html</otherArchive>
- </otherArchives>
- </mailingList>
- </mailingLists>
- <inceptionYear>2004</inceptionYear>
- <!-- who the developers are for the project -->
- <developers>
- <developer>
- <name>Davanum Srinivas</name>
- <id>dims</id>
- <email>dims@yahoo.com</email>
- <organization></organization>
- </developer>
- <developer>
- <name>Werner Dittmann</name>
- <id>werner</id>
- <email>werner@apache.org</email>
- <organization></organization>
- </developer>
- <developer>
- <name>Ias</name>
- <id>ias</id>
- <email>ias@apache.org</email>
- <organization></organization>
- </developer>
- <developer>
- <name>Ruchith Fernando</name>
- <id>ruchithf</id>
- <email>ruchithf@apache.org</email>
- <organization></organization>
- </developer>
- <developer>
- <name>Fred Dushin</name>
- <id>fadushin</id>
- <email>fadushin@apache.org</email>
- <organization></organization>
- </developer>
- <developer>
- <name>Colm O hEigeartaigh</name>
- <id>coheigea</id>
- <email>coheigea@apache.org</email>
- <organization></organization>
- </developer>
- </developers>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <scm>
- <connection>
- scm:svn:http://svn.apache.org/repos/asf/webservices/wss4j/trunk/
- </connection>
- <developerConnection>
- scm:svn:https://svn.apache.org/repos/asf/webservices/wss4j/trunk/
- </developerConnection>
- <url>http://svn.apache.org/viewvc/webservices/wss4j/trunk</url>
- </scm>
- <organization>
- <name>Apache Software Foundation</name>
- <url>http://www.apache.org/</url>
- </organization>
-
- <build>
- <sourceDirectory>src</sourceDirectory>
- <resources>
- <resource>
- <directory>src</directory>
- <includes>
- <include>org/**/errors.properties</include>
- </includes>
- <filtering>false</filtering>
- </resource>
- </resources>
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ws.security</groupId>
+ <artifactId>wss4j</artifactId>
+ <name>WSS4J</name>
+ <!-- <version>1.5.4</version> -->
+ <version>SNAPSHOT</version>
+ <description>
+ Apache WSS4J is an implementation of the Web Services Security
+ (WS-Security) being developed at OASIS Web Services Security TC.
+ WSS4J is a primarily a Java library that can be used to sign and
+ verify SOAP Messages with WS-Security information. WSS4J will
+ use Apache Axis and Apache XML-Security projects and will be
+ interoperable with JAX-RPC based server/clients and .NET
+ server/clients.
+ </description>
+ <url>http://ws.apache.org/wss4j/</url>
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://issues.apache.org/jira/browse/WSS</url>
+ </issueManagement>
+ <mailingLists>
+ <mailingList>
+ <name>WSS4J Developer List</name>
+ <subscribe>wss4j-dev-subscribe@ws.apache.org</subscribe>
+ <unsubscribe>
+ wss4j-dev-unsubscribe@ws.apache.org
+ </unsubscribe>
+ <post>wss4j-dev@ws.apache.org</post>
+ <archive>
+ http://mail-archives.apache.org/mod_mbox/ws-wss4j-dev/
+ </archive>
+ <otherArchives>
+ <otherArchive>http://www.nabble.com/WSS4J-f2398.html</otherArchive>
+ </otherArchives>
+ </mailingList>
+ </mailingLists>
+ <inceptionYear>2004</inceptionYear>
+ <!-- who the developers are for the project -->
+ <developers>
+ <developer>
+ <name>Davanum Srinivas</name>
+ <id>dims</id>
+ <email>dims@yahoo.com</email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <name>Werner Dittmann</name>
+ <id>werner</id>
+ <email>werner@apache.org</email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <name>Ias</name>
+ <id>ias</id>
+ <email>ias@apache.org</email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <name>Ruchith Fernando</name>
+ <id>ruchithf</id>
+ <email>ruchithf@apache.org</email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <name>Fred Dushin</name>
+ <id>fadushin</id>
+ <email>fadushin@apache.org</email>
+ <organization></organization>
+ </developer>
+ <developer>
+ <name>Colm O hEigeartaigh</name>
+ <id>coheigea</id>
+ <email>coheigea@apache.org</email>
+ <organization></organization>
+ </developer>
+ </developers>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <scm>
+ <connection>
+ scm:svn:http://svn.apache.org/repos/asf/webservices/wss4j/trunk/
+ </connection>
+ <developerConnection>
+ scm:svn:https://svn.apache.org/repos/asf/webservices/wss4j/trunk/
+ </developerConnection>
+ <url>http://svn.apache.org/viewvc/webservices/wss4j/trunk</url>
+ </scm>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <includes>
+ <include>org/**/errors.properties</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <id>prepareLicenseFiles</id>
- <phase>generate-resources</phase>
- <configuration>
- <tasks>
- <copy
- todir="${project.build.outputDirectory}/META-INF">
- <fileset dir="${basedir}">
- <include name="LICENSE.txt" />
- <include name="NOTICE.txt" />
- </fileset>
- </copy>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-one-plugin</artifactId>
- <version>1.2</version>
- <executions>
- <execution>
- <goals>
- <goal>install-maven-one-repository</goal>
- <goal>deploy-maven-one-repository</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <remoteRepositoryId>apache</remoteRepositoryId>
- <remoteRepositoryUrl>
- scpexe://people.apache.org/www/people.apache.org/repo/m1-snapshot-repository
- </remoteRepositoryUrl>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <configuration>
- <tagBase>
- https://svn.apache.org/repos/asf/webservices/wss4j/tags/
- </tagBase>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.3</source>
- <target>1.3</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <descriptors>
- <descriptor>assembly/bin.xml</descriptor>
- <descriptor>assembly/src.xml</descriptor>
- </descriptors>
- <tarLongFileMode>gnu</tarLongFileMode>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.0.4</version>
- <executions>
- <execution>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <attach>true</attach>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>release</id>
- <activation>
- <property>
- <name>release</name>
- <value></value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>prepareLicenseFiles</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <tasks>
+ <copy
+ todir="${project.build.outputDirectory}/META-INF">
+ <fileset dir="${basedir}">
+ <include name="LICENSE.txt" />
+ <include name="NOTICE.txt" />
+ </fileset>
+ </copy>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-one-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>install-maven-one-repository</goal>
+ <goal>deploy-maven-one-repository</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <remoteRepositoryId>apache</remoteRepositoryId>
+ <remoteRepositoryUrl>
+ scpexe://people.apache.org/www/people.apache.org/repo/m1-snapshot-repository
+ </remoteRepositoryUrl>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>
+ https://svn.apache.org/repos/asf/webservices/wss4j/tags/
+ </tagBase>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.3</source>
+ <target>1.3</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <descriptors>
+ <descriptor>assembly/bin.xml</descriptor>
+ <descriptor>assembly/src.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.0.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <attach>true</attach>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+ <activation>
+ <property>
+ <name>release</name>
+ <value></value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.5</version>
- <executions>
- <execution>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <attach>true</attach>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>jdk14</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- <jdk>1.4</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>bouncycastle</groupId>
- <artifactId>bcprov-jdk14</artifactId>
- <version>${bcprov.jdk14.version}</version>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>jdk15</id>
- <activation>
- <jdk>1.5</jdk>
- </activation>
- <dependencies>
- <dependency>
- <groupId>bouncycastle</groupId>
- <artifactId>bcprov-jdk15</artifactId>
- <version>${bcprov.jdk15.version}</version>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
- <properties>
- <xmlsec.version>1.4.0</xmlsec.version>
- <opensaml.version>1.1</opensaml.version>
- <xml.apis.version>1.3.03</xml.apis.version>
- <bcprov.jdk14.version>136</bcprov.jdk14.version>
- <bcprov.jdk15.version>136</bcprov.jdk15.version>
- <commons.logging.version>1.1</commons.logging.version>
- <xalan.version>2.7.0</xalan.version>
- <xerces.version>2.8.1</xerces.version>
- <axis.version>1.4</axis.version>
- <junit.version>3.8.1</junit.version>
- </properties>
-
- <repositories>
- <repository>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- <checksumPolicy>warn</checksumPolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- <checksumPolicy>warn</checksumPolicy>
- </snapshots>
- <id>apache-ws-snapshots2</id>
- <name>Apache ws.zones - 2</name>
- <url>http://ws.zones.apache.org/repository2/</url>
- </repository>
- </repositories>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <attach>true</attach>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>jdk14</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ <jdk>1.4</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>bouncycastle</groupId>
+ <artifactId>bcprov-jdk14</artifactId>
+ <version>${bcprov.jdk14.version}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>jdk15</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>bouncycastle</groupId>
+ <artifactId>bcprov-jdk15</artifactId>
+ <version>${bcprov.jdk15.version}</version>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+ <properties>
+ <xmlsec.version>1.4.0</xmlsec.version>
+ <opensaml.version>1.1</opensaml.version>
+ <xml.apis.version>1.3.03</xml.apis.version>
+ <bcprov.jdk14.version>136</bcprov.jdk14.version>
+ <bcprov.jdk15.version>136</bcprov.jdk15.version>
+ <commons.logging.version>1.1</commons.logging.version>
+ <xalan.version>2.7.0</xalan.version>
+ <xerces.version>2.8.1</xerces.version>
+ <axis.version>1.4</axis.version>
+ <junit.version>3.8.1</junit.version>
+ </properties>
+
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>always</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </snapshots>
+ <id>apache-ws-snapshots2</id>
+ <name>Apache ws.zones - 2</name>
+ <url>http://ws.zones.apache.org/repository2/</url>
+ </repository>
+ </repositories>
- <dependencies>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>${commons.logging.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.santuario</groupId>
- <artifactId>xmlsec</artifactId>
- <version>${xmlsec.version}</version>
- </dependency>
- <dependency>
- <groupId>opensaml</groupId>
- <artifactId>opensaml</artifactId>
- <version>${opensaml.version}</version>
- </dependency>
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis</artifactId>
- <version>${axis.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis-ant</artifactId>
- <version>${axis.version}</version>
- </dependency>
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>${xalan.version}</version>
- </dependency>
- <dependency>
- <groupId>xerces</groupId>
- <artifactId>xercesImpl</artifactId>
- <version>${xerces.version}</version>
- </dependency>
- <dependency>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- <version>${xml.apis.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- </dependency>
- </dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons.logging.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.santuario</groupId>
+ <artifactId>xmlsec</artifactId>
+ <version>${xmlsec.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>opensaml</groupId>
+ <artifactId>opensaml</artifactId>
+ <version>${opensaml.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>${axis.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-ant</artifactId>
+ <version>${axis.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>${xalan.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>${xerces.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>${xml.apis.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ </dependencies>
- <reporting>
- <plugins>
- <plugin>
+ <reporting>
+ <plugins>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.1</version>
@@ -361,12 +361,12 @@
</reportSet>
</reportSets>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.5</version>
- </plugin>
- <plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.5</version>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.0</version>
@@ -384,32 +384,32 @@
</reportSet>
</reportSets>
</plugin>
- <plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
</plugin>
- <plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.1</version>
</plugin>
- </plugins>
- </reporting>
-
- <distributionManagement>
- <repository>
- <id>apache-repo</id>
- <name>Maven Central Repository</name>
- <url>
- scpexe://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository
- </url>
- </repository>
- <site>
- <id>website</id>
- <url>
- scpexe://people.apache.org/www/ws.apache.org/wss4j/
- </url>
- </site>
- </distributionManagement>
+ </plugins>
+ </reporting>
+
+ <distributionManagement>
+ <repository>
+ <id>apache-repo</id>
+ <name>Maven Central Repository</name>
+ <url>
+ scpexe://people.apache.org/www/people.apache.org/repo/m2-ibiblio-rsync-repository
+ </url>
+ </repository>
+ <site>
+ <id>website</id>
+ <url>
+ scpexe://people.apache.org/www/ws.apache.org/wss4j/
+ </url>
+ </site>
+ </distributionManagement>
</project>
Modified: webservices/wss4j/trunk/project.xml
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/project.xml?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/project.xml (original)
+++ webservices/wss4j/trunk/project.xml Wed Oct 1 06:56:10 2008
@@ -49,9 +49,9 @@
the connection element has the form:
scm:<system>:<system specific connection string> -->
<repository>
- <connection>scm:svn:http://svn.apache.org:repos/asf/webservices:wss4j/trunk</connection>
- <developerConnection>scm:svn:http://svn.apache.org:repos/asf/webservices:wss4j/trunk</developerConnection>
- <url>http://svn.apache.org/viewcvs.cgi/webservices/wss4j/trunk?root=Apache-SVN</url>
+ <connection>scm:svn:http://svn.apache.org:repos/asf/webservices:wss4j/trunk</connection>
+ <developerConnection>scm:svn:http://svn.apache.org:repos/asf/webservices:wss4j/trunk</developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/webservices/wss4j/trunk?root=Apache-SVN</url>
</repository>
<!-- any mailing lists for the project -->
Modified: webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllReceiver.java Wed Oct 1 06:56:10 2008
@@ -67,7 +67,7 @@
*/
public void invoke(MessageContext msgContext) throws AxisFault {
- boolean doDebug = log.isDebugEnabled();
+ boolean doDebug = log.isDebugEnabled();
if (doDebug) {
log.debug("WSDoAllReceiver: enter invoke() with msg type: "
Modified: webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/axis/security/WSDoAllSender.java Wed Oct 1 06:56:10 2008
@@ -70,15 +70,15 @@
reqData.setMsgContext(mc);
/*
- * The overall try, just to have a finally at the end to perform some
- * housekeeping.
- */
+ * The overall try, just to have a finally at the end to perform some
+ * housekeeping.
+ */
try {
/*
- * Get the action first.
- */
+ * Get the action first.
+ */
Vector actions = new Vector();
- String action = getString(WSHandlerConstants.ACTION, mc);
+ String action = getString(WSHandlerConstants.ACTION, mc);
if (action == null) {
throw new AxisFault("WSDoAllSender: No action defined");
}
@@ -88,9 +88,9 @@
}
/*
- * For every action we need a username, so get this now. The
- * username defined in the deployment descriptor takes precedence.
- */
+ * For every action we need a username, so get this now. The
+ * username defined in the deployment descriptor takes precedence.
+ */
reqData.setUsername((String) getOption(WSHandlerConstants.USER));
if (reqData.getUsername() == null || reqData.getUsername().equals("")) {
String username = (String) getProperty(reqData.getMsgContext(), WSHandlerConstants.USER);
@@ -102,18 +102,18 @@
}
}
/*
- * Now we perform some set-up for UsernameToken and Signature
- * functions. No need to do it for encryption only. Check if
- * username is available and then get a passowrd.
- */
+ * Now we perform some set-up for UsernameToken and Signature
+ * functions. No need to do it for encryption only. Check if
+ * username is available and then get a passowrd.
+ */
if ((doAction & (WSConstants.SIGN | WSConstants.UT | WSConstants.UT_SIGN)) != 0) {
/*
- * We need a username - if none throw an AxisFault. For
- * encryption there is a specific parameter to get a username.
- */
+ * We need a username - if none throw an AxisFault. For
+ * encryption there is a specific parameter to get a username.
+ */
if (reqData.getUsername() == null || reqData.getUsername().equals("")) {
throw new AxisFault(
- "WSDoAllSender: Empty username for specified action");
+ "WSDoAllSender: Empty username for specified action");
}
}
if (doDebug) {
@@ -121,21 +121,21 @@
log.debug("Actor: " + reqData.getActor());
}
/*
- * Now get the SOAP part from the request message and convert it
- * into a Document.
- *
- * This forces Axis to serialize the SOAP request into FORM_STRING.
- * This string is converted into a document.
- *
- * During the FORM_STRING serialization Axis performs multi-ref of
- * complex data types (if requested), generates and inserts
- * references for attachements and so on. The resulting Document
- * MUST be the complete and final SOAP request as Axis would send it
- * over the wire. Therefore this must shall be the last (or only)
- * handler in a chain.
- *
- * Now we can perform our security operations on this request.
- */
+ * Now get the SOAP part from the request message and convert it
+ * into a Document.
+ *
+ * This forces Axis to serialize the SOAP request into FORM_STRING.
+ * This string is converted into a document.
+ *
+ * During the FORM_STRING serialization Axis performs multi-ref of
+ * complex data types (if requested), generates and inserts
+ * references for attachements and so on. The resulting Document
+ * MUST be the complete and final SOAP request as Axis would send it
+ * over the wire. Therefore this must shall be the last (or only)
+ * handler in a chain.
+ *
+ * Now we can perform our security operations on this request.
+ */
Document doc = null;
Message message = mc.getCurrentMessage();
@@ -174,19 +174,19 @@
}
/*
- * If required convert the resulting document into a message first.
- * The outputDOM() method performs the necessary c14n call. After
- * that we extract it as a string for further processing.
- *
- * Set the resulting byte array as the new SOAP message.
- *
- * If noSerialization is false, this handler shall be the last (or
- * only) one in a handler chain. If noSerialization is true, just
- * set the processed Document in the transfer property. The next
- * Axis WSS4J handler takes it and performs additional security
- * processing steps.
- *
- */
+ * If required convert the resulting document into a message first.
+ * The outputDOM() method performs the necessary c14n call. After
+ * that we extract it as a string for further processing.
+ *
+ * Set the resulting byte array as the new SOAP message.
+ *
+ * If noSerialization is false, this handler shall be the last (or
+ * only) one in a handler chain. If noSerialization is true, just
+ * set the processed Document in the transfer property. The next
+ * Axis WSS4J handler takes it and performs additional security
+ * processing steps.
+ *
+ */
if (reqData.isNoSerialization()) {
((MessageContext)reqData.getMsgContext()).setProperty(WSHandlerConstants.SND_SECURITY,
doc);
Modified: webservices/wss4j/trunk/src/org/apache/ws/axis/security/handler/WSDoAllHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/axis/security/handler/WSDoAllHandler.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/axis/security/handler/WSDoAllHandler.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/axis/security/handler/WSDoAllHandler.java Wed Oct 1 06:56:10 2008
@@ -114,12 +114,12 @@
* exists; otherwise null.
*/
public Object getOption(String name) {
- if (name == null) {
- throw new IllegalArgumentException("name cannot be null");
- }
+ if (name == null) {
+ throw new IllegalArgumentException("name cannot be null");
+ }
if (options == null) {
- return null;
- }
+ return null;
+ }
return options.get(name);
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/WSDocInfo.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/WSDocInfo.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/WSDocInfo.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/WSDocInfo.java Wed Oct 1 06:56:10 2008
@@ -25,7 +25,7 @@
* Using the Document's hash a caller can identify a document and get
* the stored information that me be necessary to process the document.
* The main usage for this is (are) the transformation functions that
- * are called during Signature/Verfication process.
+ * are called during Signature/Verification process.
*
* @author Werner Dittmann (Werner.Dittmann@siemens.com)
*
@@ -59,7 +59,7 @@
bst.removeAllElements();
}
if (processors != null && processors.size() > 0) {
- processors.removeAllElements();
+ processors.removeAllElements();
}
bst = null;
@@ -95,12 +95,12 @@
* @return the Security processor identified with this Id or null if nothing found
*/
public Processor getProcessor(String id) {
-
+
if (id == null) {
- return null;
- }
+ return null;
+ }
- Processor p = null;
+ Processor p = null;
if (processors != null) {
for (Enumeration e = processors.elements(); e.hasMoreElements();) {
p = (Processor) e.nextElement();
@@ -120,14 +120,14 @@
*/
public void setProcessor(Processor p) {
if (processors == null) {
- processors = new Vector();
+ processors = new Vector();
}
processors.add(p);
}
/**
* @return the signature crypto class used to process
- * the signature/verfiy
+ * the signature/verify
*/
public Crypto getCrypto() {
return crypto;
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/WSPasswordCallback.java Wed Oct 1 06:56:10 2008
@@ -36,7 +36,7 @@
* implementation and shall be treated as an error by the <code>handle
* </code> method.</li>
* <li><code>DECRYPT</code> - need a password to get the private key of
- * this identifier (username) from the keystore. WSS4J uses this private
+ * this identifier (username) from the keystore. WSS4J uses this private
* key to decrypt the session (symmetric) key. Because the encryption
* method uses the public key to encrypt the session key it needs no
* password (a public key is usually not protected by a password).</li>
@@ -44,7 +44,7 @@
* verify a <code>UsernameToken</code>.</li>
* <li><code>SIGNATURE</code> - need the password to get the private key of
* this identifier (username) from the keystore. WSS4J uses this private
- * key to produce a signature. The signature verfication uses the public
+ * key to produce a signature. The signature verification uses the public
* key to verify the signature.</li>
* <li><code>KEY_NAME</code> - need the <i>key</i>, not the password,
* associated with the identifier. WSS4J uses this key to encrypt or
@@ -90,7 +90,7 @@
* this identifier.
*/
public WSPasswordCallback(String id, int usage) {
- this(id, null, null, usage);
+ this(id, null, null, usage);
}
/**
@@ -136,7 +136,7 @@
* @param ident The identity.
*/
public void setIdentifier(String ident) {
- this.identifier = ident;
+ this.identifier = ident;
}
/**
@@ -188,15 +188,15 @@
public int getUsage() {
return usage;
}
- /**
- * The password type is only relevant for usage <code>USERNAME_TOKEN</code>
- * and <code>USERNAME_TOKEN_UNKNOWN</code>.
- *
- * @return Returns the passwordType.
- */
- public String getPasswordType() {
- return passwordType;
- }
+ /**
+ * The password type is only relevant for usage <code>USERNAME_TOKEN</code>
+ * and <code>USERNAME_TOKEN_UNKNOWN</code>.
+ *
+ * @return Returns the passwordType.
+ */
+ public String getPasswordType() {
+ return passwordType;
+ }
public Element getCustomToken() {
return customToken;
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/WSUsernameTokenPrincipal.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/WSUsernameTokenPrincipal.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/WSUsernameTokenPrincipal.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/WSUsernameTokenPrincipal.java Wed Oct 1 06:56:10 2008
@@ -165,18 +165,18 @@
return ("WSUsernameTokenPrincipal: " + name);
}
- /**
- * @return Returns the passwordType.
- */
- public String getPasswordType() {
- return passwordType;
- }
- /**
- * @param passwordType The passwordType to set.
- */
- public void setPasswordType(String passwordType) {
- this.passwordType = passwordType;
- }
+ /**
+ * @return Returns the passwordType.
+ */
+ public String getPasswordType() {
+ return passwordType;
+ }
+ /**
+ * @param passwordType The passwordType to set.
+ */
+ public void setPasswordType(String passwordType) {
+ this.passwordType = passwordType;
+ }
/**
* Compares the specified Object with this <code>WSUsernameTokenPrincipal</code>
* for equality. Returns true if the given object is also a
@@ -191,15 +191,19 @@
* <code>WSUsernameTokenPrincipal</code>.
*/
public boolean equals(Object o) {
- if (o == null)
+ if (o == null) {
return false;
- if (this == o)
+ }
+ if (this == o) {
return true;
- if (!(o instanceof WSUsernameTokenPrincipal))
+ }
+ if (!(o instanceof WSUsernameTokenPrincipal)) {
return false;
+ }
WSUsernameTokenPrincipal that = (WSUsernameTokenPrincipal) o;
- if (this.getName().equals(that.getName()))
+ if (this.getName().equals(that.getName())) {
return true;
+ }
return false;
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/action/EncryptionAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/action/EncryptionAction.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/action/EncryptionAction.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/action/EncryptionAction.java Wed Oct 1 06:56:10 2008
@@ -36,7 +36,7 @@
}
if (reqData.getEncKeyId() == WSConstants.EMBEDDED_KEYNAME) {
String encKeyName = handler.getString(WSHandlerConstants.ENC_KEY_NAME,
- reqData.getMsgContext());
+ reqData.getMsgContext());
wsEncrypt.setEmbeddedKeyName(encKeyName);
byte[] embeddedKey =
handler.getPassword(reqData.getEncUser(),
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/action/SAMLTokenSignedAction.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/action/SAMLTokenSignedAction.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/action/SAMLTokenSignedAction.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/action/SAMLTokenSignedAction.java Wed Oct 1 06:56:10 2008
@@ -111,10 +111,10 @@
}
protected SAMLIssuer loadSamlIssuer(WSHandler handler,
- RequestData reqData) {
- String samlPropFile
- = handler.getString(WSHandlerConstants.SAML_PROP_FILE,
- reqData.getMsgContext());
+ RequestData reqData) {
+ String samlPropFile =
+ handler.getString(WSHandlerConstants.SAML_PROP_FILE,
+ reqData.getMsgContext());
return SAMLIssuerFactory.getInstance(samlPropFile);
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/AbstractCrypto.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/AbstractCrypto.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/AbstractCrypto.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/AbstractCrypto.java Wed Oct 1 06:56:10 2008
@@ -49,7 +49,7 @@
* @param properties
*/
public AbstractCrypto(Properties properties) throws CredentialException, IOException {
- this(properties,AbstractCrypto.class.getClassLoader());
+ this(properties,AbstractCrypto.class.getClassLoader());
}
/**
@@ -65,13 +65,13 @@
return;
}
String location = this.properties.getProperty("org.apache.ws.security.crypto.merlin.file");
- InputStream is = null;
- java.net.URL url = Loader.getResource(loader, location);
- if(url != null) {
- is = url.openStream();
- } else {
- is = new java.io.FileInputStream(location);
- }
+ InputStream is = null;
+ java.net.URL url = Loader.getResource(loader, location);
+ if(url != null) {
+ is = url.openStream();
+ } else {
+ is = new java.io.FileInputStream(location);
+ }
/**
* If we don't find it, then look on the file system.
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/BouncyCastle.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/BouncyCastle.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/BouncyCastle.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/BouncyCastle.java Wed Oct 1 06:56:10 2008
@@ -60,7 +60,7 @@
}
public BouncyCastle(Properties properties, ClassLoader loader) throws CredentialException, IOException {
- super(properties,loader);
+ super(properties,loader);
}
/**
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/components/crypto/CryptoFactory.java Wed Oct 1 06:56:10 2008
@@ -177,7 +177,7 @@
}
private static Crypto loadClass(String cryptoClassName, Map map) {
- return loadClass(cryptoClassName,map,CryptoFactory.class.getClassLoader());
+ return loadClass(cryptoClassName,map,CryptoFactory.class.getClassLoader());
}
/**
@@ -236,7 +236,7 @@
* @return a <code>Properties</code> object loaded from the filename
*/
private static Properties getProperties(String propFilename) {
- return getProperties(propFilename, CryptoFactory.class.getClassLoader());
+ return getProperties(propFilename, CryptoFactory.class.getClassLoader());
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/handler/RequestData.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/handler/RequestData.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/handler/RequestData.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/handler/RequestData.java Wed Oct 1 06:56:10 2008
@@ -34,19 +34,19 @@
private String encUser = null;
private Vector encryptParts = new Vector();
private X509Certificate encCert = null;
- private int timeToLive = 300; // Timestamp: time in seconds between creation and expiry
+ private int timeToLive = 300; // Timestamp: time in seconds between creation and expiry
private WSSConfig wssConfig = null;
private Vector signatureValues = new Vector();
private WSSecHeader secHeader = null;
public void clear() {
soapConstants = null;
- actor = username = pwType = sigAlgorithm = encSymmAlgo = encKeyTransport = encUser = null;
- sigCrypto = decCrypto = encCrypto = null;
- signatureParts.clear();
- encryptParts.clear();
- encCert = null;
- utElements = null;
+ actor = username = pwType = sigAlgorithm = encSymmAlgo = encKeyTransport = encUser = null;
+ sigCrypto = decCrypto = encCrypto = null;
+ signatureParts.clear();
+ encryptParts.clear();
+ encCert = null;
+ utElements = null;
wssConfig = null;
signatureValues.clear();
}
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSS4JHandler.java Wed Oct 1 06:56:10 2008
@@ -206,7 +206,7 @@
* For every action we need a username, so get this now. The username
* defined in the deployment descriptor takes precedence.
*/
- reqData.setUsername((String) getOption(WSHandlerConstants.USER));
+ reqData.setUsername((String) getOption(WSHandlerConstants.USER));
if (reqData.getUsername() == null || reqData.getUsername().equals("")) {
reqData.setUsername((String) mc.getProperty(WSHandlerConstants.USER));
mc.setProperty(WSHandlerConstants.USER, null);
@@ -399,7 +399,7 @@
throw new JAXRPCException("WSS4JHandler: security processing failed",
ex);
}
- if (wsResult == null) { // no security header found
+ if (wsResult == null) { // no security header found
if (doAction == WSConstants.NO_SECURITY) {
return true;
} else {
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/WSEncryptBody.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSEncryptBody.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/WSEncryptBody.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/WSEncryptBody.java Wed Oct 1 06:56:10 2008
@@ -261,7 +261,7 @@
* <ul>
* <li> First step: set the encoding namespace in the SOAP:Envelope </li>
* <li> Second step: generate a symmetric key (session key) for
- * the selected symmetric encryption alogrithm, and set the cipher
+ * the selected symmetric encryption algorithm, and set the cipher
* into encryption mode.
* </li>
* <li> Third step: get the data to encrypt.
@@ -631,39 +631,39 @@
}
private KeyGenerator getKeyGenerator() throws WSSecurityException {
- KeyGenerator keyGen = null;
- try {
- /*
- * Assume AES as default, so initialize it
- */
- keyGen = KeyGenerator.getInstance("AES");
- if (symEncAlgo.equalsIgnoreCase(WSConstants.TRIPLE_DES)) {
- keyGen = KeyGenerator.getInstance("DESede");
- } else if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_128)) {
- keyGen.init(128);
- } else if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_192)) {
- keyGen.init(192);
- } else if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_256)) {
- keyGen.init(256);
- } else {
- return null;
- }
- } catch (NoSuchAlgorithmException e) {
- throw new WSSecurityException(
- WSSecurityException.UNSUPPORTED_ALGORITHM, null, null, e);
- }
- return keyGen;
- }
+ KeyGenerator keyGen = null;
+ try {
+ /*
+ * Assume AES as default, so initialize it
+ */
+ keyGen = KeyGenerator.getInstance("AES");
+ if (symEncAlgo.equalsIgnoreCase(WSConstants.TRIPLE_DES)) {
+ keyGen = KeyGenerator.getInstance("DESede");
+ } else if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_128)) {
+ keyGen.init(128);
+ } else if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_192)) {
+ keyGen.init(192);
+ } else if (symEncAlgo.equalsIgnoreCase(WSConstants.AES_256)) {
+ keyGen.init(256);
+ } else {
+ return null;
+ }
+ } catch (NoSuchAlgorithmException e) {
+ throw new WSSecurityException(
+ WSSecurityException.UNSUPPORTED_ALGORITHM, null, null, e);
+ }
+ return keyGen;
+ }
/**
- * Create DOM subtree for <code>xenc:EncryptedKey</code>
- *
- * @param doc
- * the SOAP envelope parent document
- * @param keyTransportAlgo
- * specifies which algorithm to use to encrypt the symmetric key
- * @return an <code>xenc:EncryptedKey</code> element
- */
+ * Create DOM subtree for <code>xenc:EncryptedKey</code>
+ *
+ * @param doc
+ * the SOAP envelope parent document
+ * @param keyTransportAlgo
+ * specifies which algorithm to use to encrypt the symmetric key
+ * @return an <code>xenc:EncryptedKey</code> element
+ */
public static Element createEncryptedKey(Document doc, String keyTransportAlgo) {
Element encryptedKey =
doc.createElementNS(WSConstants.ENC_NS,
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSAddUsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSAddUsernameToken.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSAddUsernameToken.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSAddUsernameToken.java Wed Oct 1 06:56:10 2008
@@ -124,7 +124,7 @@
* @deprecated replaced by {@link WSSecUsernameToken#getSecretKey()}
*/
public byte[] getSecretKey() {
- return ut.getSecretKey();
+ return ut.getSecretKey();
}
/**
* get the id
@@ -147,7 +147,7 @@
* A complete <code>UsernameToken</code> is constructed and added to
* the <code>wsse:Security</code> header.
*
- * @param doc The SOAP enevlope as W3C document
+ * @param doc The SOAP envelope as W3C document
* @param username The username to set in the UsernameToken
* @param password The password of the user
* @return Document with UsernameToken added
@@ -159,7 +159,7 @@
log.debug("Begin add username token...");
Element securityHeader = insertSecurityHeader(doc);
if (ut == null) {
- preSetUsernameToken(doc, username, password);
+ preSetUsernameToken(doc, username, password);
}
if (id != null)
ut.setID(id);
Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecBase.java?rev=700768&r1=700767&r2=700768&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecBase.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/WSSecBase.java Wed Oct 1 06:56:10 2008
@@ -34,125 +34,125 @@
* @author Werner Dittmann (Werner.Dittmann@apache.org)
*/
public class WSSecBase {
- protected String user = null;
+ protected String user = null;
- protected String password = null;
+ protected String password = null;
- protected int keyIdentifierType = WSConstants.ISSUER_SERIAL;
+ protected int keyIdentifierType = WSConstants.ISSUER_SERIAL;
- protected Vector parts = null;
+ protected Vector parts = null;
- protected boolean doDebug = false;
+ protected boolean doDebug = false;
- protected WSSConfig wssConfig = WSSConfig.getDefaultWSConfig();
+ protected WSSConfig wssConfig = WSSConfig.getDefaultWSConfig();
- /**
- * Constructor.
- */
- public WSSecBase() {
- }
+ /**
+ * Constructor.
+ */
+ public WSSecBase() {
+ }
- /**
- * Set which parts of the message to encrypt/sign. <p/>
- *
- * @param parts
- * The vector containing the WSEncryptionPart objects
- */
- public void setParts(Vector parts) {
- this.parts = parts;
- }
+ /**
+ * Set which parts of the message to encrypt/sign. <p/>
+ *
+ * @param parts
+ * The vector containing the WSEncryptionPart objects
+ */
+ public void setParts(Vector parts) {
+ this.parts = parts;
+ }
- /**
- * Sets which key identifier to use.
+ /**
+ * Sets which key identifier to use.
*
* <p/>
*
* Defines the key identifier type to
- * use in the {@link WSSecSignature#prepare(Document, Crypto, WSSecHeader) method} or
- * the {@link WSSecEncrypt#prepare(Document, Crypto) method} function to
- * set up the key identification elements.
- *
- * @param keyIdType
- * @see WSConstants#ISSUER_SERIAL
- * @see WSConstants#BST_DIRECT_REFERENCE
- * @see WSConstants#X509_KEY_IDENTIFIER
- * @see WSConstants#SKI_KEY_IDENTIFIER
- */
- public void setKeyIdentifierType(int keyIdType) {
- keyIdentifierType = keyIdType;
- }
-
- /**
- * Gets the value of the <code>keyIdentifyerType</code>.
- *
- * @return The <code>keyIdentifyerType</code>.
- * @see WSConstants#ISSUER_SERIAL
- * @see WSConstants#BST_DIRECT_REFERENCE
- * @see WSConstants#X509_KEY_IDENTIFIER
- * @see WSConstants#SKI_KEY_IDENTIFIER
- */
- public int getKeyIdentifierType() {
- return keyIdentifierType;
- }
-
- /**
- * @param wsConfig
- * The wsConfig to set.
- */
- public void setWsConfig(WSSConfig wsConfig) {
- this.wssConfig = wsConfig;
- }
-
- /**
- * Looks up or adds a body id. <p/> First try to locate the
- * <code>wsu:Id</code> in the SOAP body element. If one is found, the
- * value of the <code>wsu:Id</code> attribute is returned. Otherwise the
- * method generates a new <code>wsu:Id</code> and an appropriate value.
- *
- * @param doc
- * The SOAP envelope as <code>Document</code>
- * @return The value of the <code>wsu:Id</code> attribute of the SOAP body
- * @throws Exception
- */
- protected String setBodyID(Document doc) throws Exception {
- SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(doc
- .getDocumentElement());
- Element bodyElement = (Element) WSSecurityUtil.getDirectChild(doc
- .getFirstChild(), soapConstants.getBodyQName().getLocalPart(),
- soapConstants.getEnvelopeURI());
- if (bodyElement == null) {
- throw new Exception("SOAP Body Element node not found");
- }
- return setWsuId(bodyElement);
- }
-
- protected String setWsuId(Element bodyElement) {
- String id = null;
- id = bodyElement.getAttributeNS(WSConstants.WSU_NS, "Id");
-
- if ((id == null) || (id.length() == 0)) {
- id = "id-" + Integer.toString(bodyElement.hashCode());
- String prefix = WSSecurityUtil.setNamespace(bodyElement,
- WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
- bodyElement.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
- }
- return id;
- }
-
- /**
- * Set the user and password info.
- *
- * Both information is used to get the user's private signing key.
- *
- * @param user
- * This is the user's alias name in the keystore that identifies
- * the private key to sign the document
- * @param password
- * The user's password to get the private signing key from the
- * keystore
- */
- public void setUserInfo(String user, String password) {
- this.user = user;
- this.password = password;
- }
+ * use in the {@link WSSecSignature#prepare(Document, Crypto, WSSecHeader) method} or
+ * the {@link WSSecEncrypt#prepare(Document, Crypto) method} function to
+ * set up the key identification elements.
+ *
+ * @param keyIdType
+ * @see WSConstants#ISSUER_SERIAL
+ * @see WSConstants#BST_DIRECT_REFERENCE
+ * @see WSConstants#X509_KEY_IDENTIFIER
+ * @see WSConstants#SKI_KEY_IDENTIFIER
+ */
+ public void setKeyIdentifierType(int keyIdType) {
+ keyIdentifierType = keyIdType;
+ }
+
+ /**
+ * Gets the value of the <code>keyIdentifyerType</code>.
+ *
+ * @return The <code>keyIdentifyerType</code>.
+ * @see WSConstants#ISSUER_SERIAL
+ * @see WSConstants#BST_DIRECT_REFERENCE
+ * @see WSConstants#X509_KEY_IDENTIFIER
+ * @see WSConstants#SKI_KEY_IDENTIFIER
+ */
+ public int getKeyIdentifierType() {
+ return keyIdentifierType;
+ }
+
+ /**
+ * @param wsConfig
+ * The wsConfig to set.
+ */
+ public void setWsConfig(WSSConfig wsConfig) {
+ this.wssConfig = wsConfig;
+ }
+
+ /**
+ * Looks up or adds a body id. <p/> First try to locate the
+ * <code>wsu:Id</code> in the SOAP body element. If one is found, the
+ * value of the <code>wsu:Id</code> attribute is returned. Otherwise the
+ * method generates a new <code>wsu:Id</code> and an appropriate value.
+ *
+ * @param doc
+ * The SOAP envelope as <code>Document</code>
+ * @return The value of the <code>wsu:Id</code> attribute of the SOAP body
+ * @throws Exception
+ */
+ protected String setBodyID(Document doc) throws Exception {
+ SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(doc
+ .getDocumentElement());
+ Element bodyElement = (Element) WSSecurityUtil.getDirectChild(doc
+ .getFirstChild(), soapConstants.getBodyQName().getLocalPart(),
+ soapConstants.getEnvelopeURI());
+ if (bodyElement == null) {
+ throw new Exception("SOAP Body Element node not found");
+ }
+ return setWsuId(bodyElement);
+ }
+
+ protected String setWsuId(Element bodyElement) {
+ String id = null;
+ id = bodyElement.getAttributeNS(WSConstants.WSU_NS, "Id");
+
+ if ((id == null) || (id.length() == 0)) {
+ id = "id-" + Integer.toString(bodyElement.hashCode());
+ String prefix = WSSecurityUtil.setNamespace(bodyElement,
+ WSConstants.WSU_NS, WSConstants.WSU_PREFIX);
+ bodyElement.setAttributeNS(WSConstants.WSU_NS, prefix + ":Id", id);
+ }
+ return id;
+ }
+
+ /**
+ * Set the user and password info.
+ *
+ * Both information is used to get the user's private signing key.
+ *
+ * @param user
+ * This is the user's alias name in the keystore that identifies
+ * the private key to sign the document
+ * @param password
+ * The user's password to get the private signing key from the
+ * keystore
+ */
+ public void setUserInfo(String user, String password) {
+ this.user = user;
+ this.password = password;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org