JBossWS SVN: r4399 - spi/tags.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-17 09:58:56 -0400 (Fri, 17 Aug 2007)
New Revision: 4399
Added:
spi/tags/jbossws-spi-1.0.0.GA/
Log:
Release jbossws-spi-1.0.0.GA
Copied: spi/tags/jbossws-spi-1.0.0.GA (from rev 4398, spi/trunk)
17 years, 4 months
JBossWS SVN: r4398 - spi.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-17 09:57:46 -0400 (Fri, 17 Aug 2007)
New Revision: 4398
Added:
spi/branches/
Log:
Create branches
17 years, 4 months
JBossWS SVN: r4397 - spi.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-17 09:57:28 -0400 (Fri, 17 Aug 2007)
New Revision: 4397
Added:
spi/tags/
Log:
Create tags
17 years, 4 months
JBossWS SVN: r4396 - spi/trunk.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-17 09:56:21 -0400 (Fri, 17 Aug 2007)
New Revision: 4396
Modified:
spi/trunk/version.properties
Log:
Release jbossws-spi-1.0.0.GA
Modified: spi/trunk/version.properties
===================================================================
--- spi/trunk/version.properties 2007-08-16 20:41:59 UTC (rev 4395)
+++ spi/trunk/version.properties 2007-08-17 13:56:21 UTC (rev 4396)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=1.0.0.CR1
-repository.id=1.0.0.CR1
+version.id=1.0.0.GA
+repository.id=1.0.0.GA
implementation.title=JBoss Web Services - SPI
implementation.url=http://www.jboss.org/products/jbossws
17 years, 4 months
JBossWS SVN: r4395 - in stack/native/branches/native-2.0: ant-import and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-16 16:41:59 -0400 (Thu, 16 Aug 2007)
New Revision: 4395
Modified:
stack/native/branches/native-2.0/ant-import/build-thirdparty.xml
stack/native/branches/native-2.0/version.properties
Log:
[JBWS-1617] JAXRPC doc/literal trims empty string
Modified: stack/native/branches/native-2.0/ant-import/build-thirdparty.xml
===================================================================
--- stack/native/branches/native-2.0/ant-import/build-thirdparty.xml 2007-08-16 19:43:05 UTC (rev 4394)
+++ stack/native/branches/native-2.0/ant-import/build-thirdparty.xml 2007-08-16 20:41:59 UTC (rev 4395)
@@ -88,8 +88,8 @@
<get src="${jboss.repository}/jboss/jaxr/${jboss-jaxr}/lib/juddi-service.sar" dest="${thirdparty.dir}/juddi-service.sar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jboss-vfs/${jboss-vfs}/lib/jboss-vfs.jar" dest="${thirdparty.dir}/jboss-vfs.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jboss-vfs/${jboss-vfs}/lib/jboss-vfs-sources.jar" dest="${thirdparty.dir}/jboss-vfs-sources.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb-jboss42}/lib/jboss-xml-binding.jar" dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb-jboss42}/lib/jboss-xml-binding-sources.jar" dest="${thirdparty.dir}/jboss-xml-binding-sources.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-container.jar" dest="${thirdparty.dir}/jboss-container.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency.jar" dest="${thirdparty.dir}/jboss-dependency.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers.jar" dest="${thirdparty.dir}/jboss-deployers.jar" usetimestamp="true" verbose="true"/>
@@ -97,8 +97,8 @@
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-dependency-src.zip" dest="${thirdparty.dir}/jboss-dependency-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-deployers-src.zip" dest="${thirdparty.dir}/jboss-deployers-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/microcontainer/${jboss-microcontainer}/lib/jboss-microcontainer-src.zip" dest="${thirdparty.dir}/jboss-microcontainer-src.zip" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/remoting/${jboss-remoting}/lib/jboss-remoting-src.jar" dest="${thirdparty.dir}/jboss-remoting-src.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/remoting/${jboss-remoting-jboss42}/lib/jboss-remoting.jar" dest="${thirdparty.dir}/jboss-remoting.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/remoting/${jboss-remoting-jboss42}/lib/jboss-remoting-src.jar" dest="${thirdparty.dir}/jboss-remoting-src.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-client.jar" dest="${thirdparty.dir}/jbosssx-client.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx.jar" dest="${thirdparty.dir}/jbosssx.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-src.zip" dest="${thirdparty.dir}/jbosssx-src.zip" usetimestamp="true" verbose="true"/>
Modified: stack/native/branches/native-2.0/version.properties
===================================================================
--- stack/native/branches/native-2.0/version.properties 2007-08-16 19:43:05 UTC (rev 4394)
+++ stack/native/branches/native-2.0/version.properties 2007-08-16 20:41:59 UTC (rev 4395)
@@ -17,7 +17,6 @@
apache-xmlsec=1.3.0
ibm-wsdl4j=1.6.2
jbpm-bpel=1.1.0.Beta5
-jboss-remoting=2.2.0.SP4
stax-api=1.0
sun-jaxb=2.1.4
sun-jaxws=2.1.1
@@ -66,7 +65,6 @@
jboss-microcontainer=2.0.0.Beta3
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
-jboss-jbossxb=1.0.0.GA
jbossas-core-libs=4.2.0.GA
junit=3.8.1
oswego-concurrent=1.3.4
17 years, 4 months
JBossWS SVN: r4394 - stack/native/branches/native-2.0/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-16 15:43:05 -0400 (Thu, 16 Aug 2007)
New Revision: 4394
Modified:
stack/native/branches/native-2.0/ant-import/build-thirdparty.xml
Log:
Remove temporary jbossxb download
Modified: stack/native/branches/native-2.0/ant-import/build-thirdparty.xml
===================================================================
--- stack/native/branches/native-2.0/ant-import/build-thirdparty.xml 2007-08-16 18:12:21 UTC (rev 4393)
+++ stack/native/branches/native-2.0/ant-import/build-thirdparty.xml 2007-08-16 19:43:05 UTC (rev 4394)
@@ -117,8 +117,8 @@
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-tools.jar" dest="${thirdparty.dir}/jaxws-tools.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/stax-ex.jar" dest="${thirdparty.dir}/stax-ex.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/streambuffer.jar" dest="${thirdparty.dir}/streambuffer.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/stax-ex.jar" dest="${thirdparty.dir}/stax-ex.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/stax-ex.jar" dest="${thirdparty.dir}/stax-ex.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/sun-servlet/${sun-servlet}/lib/servlet-api.jar" dest="${thirdparty.dir}/servlet-api.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/xmlunit-xmlunit/${xmlunit}/lib/xmlunit1.0.jar" dest="${thirdparty.dir}/xmlunit.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/wscommons-policy/${wscommons-policy}/lib/policy.jar" dest="${thirdparty.dir}/policy.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/woodstox/${woodstox}/lib/wstx.jar" dest="${thirdparty.dir}/wstx.jar" usetimestamp="true" verbose="true"/>
@@ -127,12 +127,6 @@
<unzip dest="${thirdparty.dir}/jbpm-bpel" src="${thirdparty.dir}/jbpm-bpel.sar"/>
<unzip dest="${thirdparty.dir}" src="${thirdparty.dir}/ejb3.deployer.zip"/>
- <!--
- [JBWS-1617] JAXRPC doc/literal trims empty string
- <get src="http://snapshots.jboss.org/maven2/org/jboss/jbossxb/1.0.0-SNAPSHOT/jbossx..." dest="${thirdparty.dir}/jbossxb-1.0.0-snapshot.jar" usetimestamp="true" verbose="true"/>
- <copy tofile="${thirdparty.dir}/jboss-xml-binding.jar" file="${thirdparty.dir}/jbossxb-1.0.0-snapshot.jar"/>
- -->
-
<checksum file="${core.dir}/version.properties" fileext=".md5"/>
</target>
17 years, 4 months
JBossWS SVN: r4393 - in stack/native/branches/native-2.0: src/test/java/org/jboss/test/ws/jaxrpc/marshall and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-16 14:12:21 -0400 (Thu, 16 Aug 2007)
New Revision: 4393
Modified:
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
stack/native/branches/native-2.0/version.properties
Log:
[JBWS-1617] JAXRPC doc/literal trims empty string
Modified: stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java
===================================================================
--- stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2007-08-16 17:27:54 UTC (rev 4392)
+++ stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxrpc/marshall/MarshallTest.java 2007-08-16 18:12:21 UTC (rev 4393)
@@ -608,11 +608,9 @@
String out = stringTest(in);
assertEquals(in, out);
- System.out.println("FIXME: [JBWS-1617] JAXRPC doc/literal trims empty string");
-
-// in = " ";
-// out = stringTest(in);
-// assertEquals(in, out);
+ in = " ";
+ out = stringTest(in);
+ assertEquals(in, out);
}
public void testStringSpecialChars() throws Exception
Modified: stack/native/branches/native-2.0/version.properties
===================================================================
--- stack/native/branches/native-2.0/version.properties 2007-08-16 17:27:54 UTC (rev 4392)
+++ stack/native/branches/native-2.0/version.properties 2007-08-16 18:12:21 UTC (rev 4393)
@@ -33,15 +33,15 @@
jbossws-jboss50=2.0.1.CR1
# JBossAS-5.0
-jboss-jbossxb-jboss50=2.0.0.CR2
+jboss-jbossxb-jboss50=2.0.0.CR4
jboss-remoting-jboss50=2.2.0.SP4
# JBossAS-4.2
-jboss-jbossxb-jboss42=1.0.0.GA
+jboss-jbossxb-jboss42=1.0.0.CR11
jboss-remoting-jboss42=2.2.1.GA
# JBossAS-4.0
-jboss-jbossxb-jboss40=1.0.0.GA
+jboss-jbossxb-jboss40=1.0.0.CR11
jboss-remoting-jboss40=1.4.3.GA
# Thirdparty library versions
17 years, 4 months
JBossWS SVN: r4392 - in stack/native/branches/native-2.0/src: test/java/org/jboss/test/ws/jaxws/samples/wssecurity and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-08-16 13:27:54 -0400 (Thu, 16 Aug 2007)
New Revision: 4392
Modified:
stack/native/branches/native-2.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameEndpoint.java
stack/native/branches/native-2.0/src/test/resources/jaxws/samples/wssecurity/simple-username/META-INF/wsdl/UsernameService.wsdl
Log:
[JBWS-1766] UsernameToken ignores BindingProvider.USERNAME_PROPERTY
Modified: stack/native/branches/native-2.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/native-2.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-08-16 15:31:49 UTC (rev 4391)
+++ stack/native/branches/native-2.0/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-08-16 17:27:54 UTC (rev 4392)
@@ -31,6 +31,7 @@
import javax.xml.rpc.soap.SOAPFaultException;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
+import javax.xml.ws.BindingProvider;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
@@ -252,6 +253,12 @@
{
Object user = ctx.get(Stub.USERNAME_PROPERTY);
Object pass = ctx.get(Stub.PASSWORD_PROPERTY);
+
+ if (user == null && pass == null)
+ {
+ user = ctx.get(BindingProvider.USERNAME_PROPERTY);
+ pass = ctx.get(BindingProvider.PASSWORD_PROPERTY);
+ }
if (user != null && pass != null)
{
Modified: stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java
===================================================================
--- stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java 2007-08-16 15:31:49 UTC (rev 4391)
+++ stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java 2007-08-16 17:27:54 UTC (rev 4392)
@@ -41,50 +41,55 @@
* Test WS-Security for Username Token
*
* @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
+ * @author Thomas.Diesler(a)jboss.com
* @since 15-Aug-2007
- * @version $Revision$
*/
public class SimpleUsernameTestCase extends JBossWSTest
{
- /** Deploy the test */
+ private static UsernameEndpoint port;
+
public static Test suite() throws Exception
{
return new JBossWSTestSetup(SimpleUsernameTestCase.class, "jaxws-samples-wssecurity-username.war");
}
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ URL wsdlURL = new File("resources/jaxws/samples/wssecurity/simple-username/META-INF/wsdl/UsernameService.wsdl").toURL();
+ URL securityURL = new File("resources/jaxws/samples/wssecurity/simple-username/META-INF/jboss-wsse-client.xml").toURL();
+ QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "UsernameService");
- /**
- * Test SOAP Envelope for Username Token
- */
- public void testUsernameToken() throws Exception
+ Service service = Service.create(wsdlURL, serviceName);
+
+ port = (UsernameEndpoint)service.getPort(UsernameEndpoint.class);
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+ }
+ }
+
+ public void testUsernameTokenNegative() throws Exception
{
- UsernameEndpoint username = getPort();
- String retObj = username.getUsernameToken();
-
- System.out.println("FIXME [JBWS-1790]: UsernameToken is no longer present in Header after it is processed");
- //assertTrue(retObj.indexOf("UsernameToken") > 0);
+ try
+ {
+ port.getUsernameToken();
+ fail("Server should respond with [401] - Unauthorized");
+ }
+ catch (Exception ex)
+ {
+ // this should be ok
+ }
}
- private UsernameEndpoint getPort() throws Exception
+ public void testUsernameToken() throws Exception
{
- URL wsdlURL = new File("resources/jaxws/samples/wssecurity/simple-username/META-INF/wsdl/UsernameService.wsdl").toURL();
- URL securityURL = new File("resources/jaxws/samples/wssecurity/simple-username/META-INF/jboss-wsse-client.xml").toURL();
- QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "UsernameService");
-
- Service service = Service.create(wsdlURL, serviceName);
-
- UsernameEndpoint port = (UsernameEndpoint)service.getPort(UsernameEndpoint.class);
- ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
- ((StubExt)port).setConfigName("Standard WSSecurity Client");
-
Map<String, Object> reqContext = ((BindingProvider)port).getRequestContext();
- reqContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ reqContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
reqContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
- // If these below parameters are set it appears in the log, but the test fails as another
- // request for the getHeader() returns empty <env:Header></env:Header>
- //reqContext.put("javax.xml.rpc.security.auth.username", "kermit");
- //reqContext.put("javax.xml.rpc.security.auth.password", "thefrog");
- reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxws-samples-wssecurity-username");
-
- return port;
+
+ String retObj = port.getUsernameToken();
+ assertEquals("kermit", retObj);
}
}
\ No newline at end of file
Modified: stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java
===================================================================
--- stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java 2007-08-16 15:31:49 UTC (rev 4391)
+++ stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java 2007-08-16 17:27:54 UTC (rev 4392)
@@ -21,41 +21,26 @@
*/
package org.jboss.test.ws.jaxws.samples.wssecurity;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.util.Iterator;
+// $Id$
+import java.security.Principal;
+
import javax.annotation.Resource;
import javax.jws.WebMethod;
-import javax.jws.WebParam;
+import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPEnvelope;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPPart;
-import javax.xml.ws.handler.MessageContext;
-import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.WebServiceContext;
import org.jboss.logging.Logger;
import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.ws.extensions.security.Constants;
-import org.jboss.ws.extensions.security.Util;
-import org.jboss.ws.core.soap.SOAPElementImpl;
-import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
-import org.jboss.ws.core.soap.SOAPHeaderImpl;
-import org.w3c.dom.Element;
/**
* The SEI implementation used by the SimpleUsernameTestCase
*
* @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
+ * @author Thomas.Diesler(a)jboss.com
* @since 15-Aug-2007
- * @version $Revision$
*/
@WebService(name = "UsernameEndpoint", serviceName = "UsernameService", targetNamespace = "http://org.jboss.ws/samples/wssecurity")
@EndpointConfig(configName = "Standard WSSecurity Endpoint")
@@ -63,46 +48,16 @@
public class UsernameBean
{
private Logger log = Logger.getLogger(UsernameBean.class);
-
+
@Resource
WebServiceContext wsCtx;
@WebMethod
+ @WebResult(partName = "return")
public String getUsernameToken()
{
- String retObj = "";
- try
- {
- MessageContext jaxwsContext = (MessageContext)wsCtx.getMessageContext();
- SOAPMessage soapMessage = ((SOAPMessageContext)jaxwsContext).getMessage();
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- soapMessage.writeTo(stream);
- log.info(stream.toString());
-
- SOAPPart soapPart = soapMessage.getSOAPPart();
- SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
- StringWriter strw = new StringWriter();
- ((SOAPEnvelopeImpl)soapEnvelope).writeElement(strw);
- log.info(strw.toString());
-
- SOAPHeader soapHeader = soapEnvelope.getHeader();
- strw = new StringWriter();
- ((SOAPHeaderImpl)soapHeader).writeElement(strw);
- retObj = strw.toString();
- log.info(retObj);
-
- QName secQName = new QName(Constants.WSSE_NS, "Security");
- Element secHeaderElement = Util.findElement(soapHeader, secQName);
- log.info(secHeaderElement);
- }
- catch (SOAPException se)
- {
- log.error(se.getMessage());
- }
- catch (IOException ioe)
- {
- log.error(ioe.getMessage());
- }
- return retObj;
+ Principal principal = wsCtx.getUserPrincipal();
+ log.info("getUsernameToken: " + principal);
+ return principal.toString();
}
}
Modified: stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameEndpoint.java
===================================================================
--- stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameEndpoint.java 2007-08-16 15:31:49 UTC (rev 4391)
+++ stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameEndpoint.java 2007-08-16 17:27:54 UTC (rev 4392)
@@ -1,12 +1,30 @@
-
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.ws.jaxws.samples.wssecurity;
import javax.jws.WebMethod;
-import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import javax.jws.soap.SOAPBinding.Style;
/**
* The SEI
@@ -19,11 +37,6 @@
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface UsernameEndpoint {
- /**
- *
- * @return
- * returns java.lang.String
- */
@WebMethod
@WebResult(partName = "return")
public String getUsernameToken();
Modified: stack/native/branches/native-2.0/src/test/resources/jaxws/samples/wssecurity/simple-username/META-INF/wsdl/UsernameService.wsdl
===================================================================
--- stack/native/branches/native-2.0/src/test/resources/jaxws/samples/wssecurity/simple-username/META-INF/wsdl/UsernameService.wsdl 2007-08-16 15:31:49 UTC (rev 4391)
+++ stack/native/branches/native-2.0/src/test/resources/jaxws/samples/wssecurity/simple-username/META-INF/wsdl/UsernameService.wsdl 2007-08-16 17:27:54 UTC (rev 4392)
@@ -24,7 +24,7 @@
</binding>
<service name='UsernameService'>
<port binding='tns:UsernameEndpointBinding' name='UsernameEndpointPort'>
- <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-wssecurity-username'/>
</port>
</service>
</definitions>
\ No newline at end of file
17 years, 4 months
JBossWS SVN: r4391 - stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-08-16 11:31:49 -0400 (Thu, 16 Aug 2007)
New Revision: 4391
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java
Log:
[JBWS-1766] UsernameToken ignores BindingProvider.USERNAME_PROPERTY - added TestCase with FIXME
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java 2007-08-16 15:24:47 UTC (rev 4390)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java 2007-08-16 15:31:49 UTC (rev 4391)
@@ -61,7 +61,8 @@
UsernameEndpoint username = getPort();
String retObj = username.getUsernameToken();
- assertTrue(retObj.indexOf("UsernameToken") > 0);
+ System.out.println("FIXME [JBWS-1790]: UsernameToken is no longer present in Header after it is processed");
+ //assertTrue(retObj.indexOf("UsernameToken") > 0);
}
private UsernameEndpoint getPort() throws Exception
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java 2007-08-16 15:24:47 UTC (rev 4390)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/UsernameBean.java 2007-08-16 15:31:49 UTC (rev 4391)
@@ -24,7 +24,6 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringWriter;
-import java.util.Iterator;
import javax.annotation.Resource;
import javax.jws.WebMethod;
@@ -32,23 +31,15 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
-import javax.xml.soap.SOAPMessage;
-import javax.xml.soap.SOAPPart;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import javax.xml.ws.WebServiceContext;
import org.jboss.logging.Logger;
import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.ws.extensions.security.Constants;
-import org.jboss.ws.extensions.security.Util;
-import org.jboss.ws.core.soap.SOAPElementImpl;
-import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
import org.jboss.ws.core.soap.SOAPHeaderImpl;
-import org.w3c.dom.Element;
/**
* The SEI implementation used by the SimpleUsernameTestCase
@@ -70,30 +61,16 @@
@WebMethod
public String getUsernameToken()
{
- String retObj = "";
+ String retObj = "<wsse:UsernameToken wsu:Id='token-1-1187274179843-29806874'></wsse:UsernameToken>";
+
try
- {
+ {
MessageContext jaxwsContext = (MessageContext)wsCtx.getMessageContext();
- SOAPMessage soapMessage = ((SOAPMessageContext)jaxwsContext).getMessage();
- ByteArrayOutputStream stream = new ByteArrayOutputStream();
- soapMessage.writeTo(stream);
- log.info(stream.toString());
-
- SOAPPart soapPart = soapMessage.getSOAPPart();
- SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
+ SOAPHeader soapHeader = ((SOAPMessageContext)jaxwsContext).getMessage().getSOAPPart().getEnvelope().getHeader();
StringWriter strw = new StringWriter();
- ((SOAPEnvelopeImpl)soapEnvelope).writeElement(strw);
- log.info(strw.toString());
-
- SOAPHeader soapHeader = soapEnvelope.getHeader();
- strw = new StringWriter();
((SOAPHeaderImpl)soapHeader).writeElement(strw);
retObj = strw.toString();
log.info(retObj);
-
- QName secQName = new QName(Constants.WSSE_NS, "Security");
- Element secHeaderElement = Util.findElement(soapHeader, secQName);
- log.info(secHeaderElement);
}
catch (SOAPException se)
{
17 years, 4 months
JBossWS SVN: r4390 - stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-08-16 11:24:47 -0400 (Thu, 16 Aug 2007)
New Revision: 4390
Modified:
stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java
Log:
[JBWS-1766] UsernameToken ignores BindingProvider.USERNAME_PROPERTY - added TestCase with FIXME
Modified: stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java
===================================================================
--- stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java 2007-08-16 14:39:23 UTC (rev 4389)
+++ stack/native/branches/native-2.0/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleUsernameTestCase.java 2007-08-16 15:24:47 UTC (rev 4390)
@@ -60,7 +60,7 @@
UsernameEndpoint username = getPort();
String retObj = username.getUsernameToken();
- System.out.println("FIXME [JBWS-1766]: UsernameToken ignores BindingProvider.USERNAME_PROPERTY");
+ System.out.println("FIXME [JBWS-1790]: UsernameToken is no longer present in Header after it is processed");
//assertTrue(retObj.indexOf("UsernameToken") > 0);
}
17 years, 4 months