JBossWS SVN: r9139 - container/jboss42/branches/jboss423.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-28 06:32:21 -0500 (Wed, 28 Jan 2009)
New Revision: 9139
Modified:
container/jboss42/branches/jboss423/pom.xml
Log:
Moving to 3.1.0-SNAPSHOT + using latest snapshots
Modified: container/jboss42/branches/jboss423/pom.xml
===================================================================
--- container/jboss42/branches/jboss423/pom.xml 2009-01-28 11:31:32 UTC (rev 9138)
+++ container/jboss42/branches/jboss423/pom.xml 2009-01-28 11:32:21 UTC (rev 9139)
@@ -6,7 +6,7 @@
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-jboss423</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -24,8 +24,8 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.0.8.GA</jbossws.common.version>
- <jbossws.spi.version>1.0.8-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>1.0.9-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>1.1.0-SNAPSHOT</jbossws.spi.version>
<!--
To deploy-file to snapshot repo do:
15 years, 11 months
JBossWS SVN: r9138 - container/jboss42/branches/jboss422.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-28 06:31:32 -0500 (Wed, 28 Jan 2009)
New Revision: 9138
Modified:
container/jboss42/branches/jboss422/pom.xml
Log:
Moving to 3.1.0-SNAPSHOT + using latest snapshots
Modified: container/jboss42/branches/jboss422/pom.xml
===================================================================
--- container/jboss42/branches/jboss422/pom.xml 2009-01-28 11:29:45 UTC (rev 9137)
+++ container/jboss42/branches/jboss422/pom.xml 2009-01-28 11:31:32 UTC (rev 9138)
@@ -6,7 +6,7 @@
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-jboss422</artifactId>
- <version>3.0.6-SNAPSHOT</version>
+ <version>3.1.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
@@ -25,8 +25,8 @@
<!-- Properties -->
<properties>
<jboss.version>4.2.2.GA</jboss.version>
- <jbossws.common.version>1.0.8.GA</jbossws.common.version>
- <jbossws.spi.version>1.0.8-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>1.0.9-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>1.1.0-SNAPSHOT</jbossws.spi.version>
<!-- versions defined in build/build-thirdparty.xml -->
<dom4j.version>1.6.1</dom4j.version>
<jboss.aop.version>1.5.6.GA</jboss.aop.version>
15 years, 11 months
JBossWS SVN: r9137 - common/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-28 06:29:45 -0500 (Wed, 28 Jan 2009)
New Revision: 9137
Modified:
common/trunk/pom.xml
Log:
Using spi 3.1.0-SNAPSHOT
Modified: common/trunk/pom.xml
===================================================================
--- common/trunk/pom.xml 2009-01-28 11:29:10 UTC (rev 9136)
+++ common/trunk/pom.xml 2009-01-28 11:29:45 UTC (rev 9137)
@@ -27,7 +27,7 @@
<!-- Properties -->
<properties>
- <jbossws.spi.version>1.0.8-SNAPSHOT</jbossws.spi.version>
+ <jbossws.spi.version>1.1.0-SNAPSHOT</jbossws.spi.version>
<jboss.common.version>2.2.7.GA</jboss.common.version>
<jboss.microcontainer.version>1.0.2</jboss.microcontainer.version>
</properties>
15 years, 11 months
JBossWS SVN: r9136 - spi/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-28 06:29:10 -0500 (Wed, 28 Jan 2009)
New Revision: 9136
Modified:
spi/trunk/pom.xml
Log:
Moving to 3.1.0-SNAPSHOT
Modified: spi/trunk/pom.xml
===================================================================
--- spi/trunk/pom.xml 2009-01-27 18:51:31 UTC (rev 9135)
+++ spi/trunk/pom.xml 2009-01-28 11:29:10 UTC (rev 9136)
@@ -7,7 +7,7 @@
<artifactId>jbossws-spi</artifactId>
<packaging>jar</packaging>
- <version>1.0.8-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<!-- Parent -->
<parent>
15 years, 11 months
JBossWS SVN: r9135 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-27 13:51:31 -0500 (Tue, 27 Jan 2009)
New Revision: 9135
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss422.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss423.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss424.txt
Log:
[JBWS-2491] Excluding test on AS 4.2.x
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss422.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss422.txt 2009-01-27 18:50:30 UTC (rev 9134)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss422.txt 2009-01-27 18:51:31 UTC (rev 9135)
@@ -35,3 +35,6 @@
# [JBWS-2258] Fix EnumTestCase (fixed in AS trunk)
org/jboss/test/ws/tools/enums/EnumTestCase.*
+
+# [JBWS-2491] Enable JAXWS 2.1 WebServiceContext methods
+org/jboss/test/ws/jaxws/jbws2257/**
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss423.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss423.txt 2009-01-27 18:50:30 UTC (rev 9134)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss423.txt 2009-01-27 18:51:31 UTC (rev 9135)
@@ -19,3 +19,6 @@
# [JBWS-2258] Fix EnumTestCase (fixed in AS trunk)
org/jboss/test/ws/tools/enums/EnumTestCase.*
+
+# [JBWS-2491] Enable JAXWS 2.1 WebServiceContext methods
+org/jboss/test/ws/jaxws/jbws2257/**
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss424.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss424.txt 2009-01-27 18:50:30 UTC (rev 9134)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss424.txt 2009-01-27 18:51:31 UTC (rev 9135)
@@ -19,3 +19,6 @@
# [JBWS-2258] Fix EnumTestCase (fixed in AS trunk)
org/jboss/test/ws/tools/enums/EnumTestCase.*
+
+# [JBWS-2491] Enable JAXWS 2.1 WebServiceContext methods
+org/jboss/test/ws/jaxws/jbws2257/**
15 years, 11 months
JBossWS SVN: r9134 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-27 13:50:30 -0500 (Tue, 27 Jan 2009)
New Revision: 9134
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt
Log:
[JBWS-2491] Excluding test on AS 4.2.x
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt 2009-01-27 18:45:15 UTC (rev 9133)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss422.txt 2009-01-27 18:50:30 UTC (rev 9134)
@@ -108,3 +108,6 @@
# [JBWS-2480] Soap attachments are dropped on server response
org/jboss/test/ws/jaxws/jbws1283/**
+
+# [JBWS-2491] Enable JAXWS 2.1 WebServiceContext methods
+org/jboss/test/ws/jaxws/jbws2257/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt 2009-01-27 18:45:15 UTC (rev 9133)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss423.txt 2009-01-27 18:50:30 UTC (rev 9134)
@@ -108,3 +108,6 @@
# [JBWS-2480] Soap attachments are dropped on server response
org/jboss/test/ws/jaxws/jbws1283/**
+
+# [JBWS-2491] Enable JAXWS 2.1 WebServiceContext methods
+org/jboss/test/ws/jaxws/jbws2257/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt 2009-01-27 18:45:15 UTC (rev 9133)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss424.txt 2009-01-27 18:50:30 UTC (rev 9134)
@@ -108,3 +108,6 @@
# [JBWS-2480] Soap attachments are dropped on server response
org/jboss/test/ws/jaxws/jbws1283/**
+
+# [JBWS-2491] Enable JAXWS 2.1 WebServiceContext methods
+org/jboss/test/ws/jaxws/jbws2257/**
15 years, 11 months
JBossWS SVN: r9133 - in stack/metro/trunk/modules/server/src/main: resources/jbossws-metro-server.jar/META-INF/services and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-27 13:45:15 -0500 (Tue, 27 Jan 2009)
New Revision: 9133
Added:
stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java
stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
Log:
[JBWS-2491] Providing WebServiceContextFactoryImpl (as it's not in container integration anymore)
Added: stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java
===================================================================
--- stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java (rev 0)
+++ stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java 2009-01-27 18:45:15 UTC (rev 9133)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.metro;
+
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ *
+ */
+public class WebServiceContextFactoryImpl extends WebServiceContextFactory
+{
+ public ExtensibleWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
+ {
+ ExtensibleWebServiceContext context = null;
+
+ //checking for a provided WebServiceContext in the MessageContext; to be removed after EJBTHREE-1604 (the whole class should not be required anymore for Metro integration)
+ WebServiceContext providedContext = (WebServiceContext)messageContext.get(WebServiceContext.class.toString());
+ if (providedContext != null)
+ context = new WebServiceContextDelegate(providedContext);
+ else
+ throw new WebServiceException("Cannot find Metro WebServiceContext in the MessageContext");
+
+ return context;
+ }
+}
Property changes on: stack/metro/trunk/modules/server/src/main/java/org/jboss/wsf/stack/metro/WebServiceContextFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
===================================================================
--- stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory (rev 0)
+++ stack/metro/trunk/modules/server/src/main/resources/jbossws-metro-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory 2009-01-27 18:45:15 UTC (rev 9133)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.metro.WebServiceContextFactoryImpl
\ No newline at end of file
15 years, 11 months
JBossWS SVN: r9132 - stack/metro/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-27 13:44:11 -0500 (Tue, 27 Jan 2009)
New Revision: 9132
Modified:
stack/metro/trunk/pom.xml
Log:
Moving to snapshots
Modified: stack/metro/trunk/pom.xml
===================================================================
--- stack/metro/trunk/pom.xml 2009-01-27 18:43:32 UTC (rev 9131)
+++ stack/metro/trunk/pom.xml 2009-01-27 18:44:11 UTC (rev 9132)
@@ -47,14 +47,14 @@
<properties>
<jbossws.common.version>1.0.9-SNAPSHOT</jbossws.common.version>
<jbossws.framework.version>3.0.6-SNAPSHOT</jbossws.framework.version>
- <jbossws.spi.version>1.0.7.GA</jbossws.spi.version>
- <jbossws.jboss422.version>3.0.5.GA</jbossws.jboss422.version>
- <jbossws.jboss423.version>3.0.5.GA</jbossws.jboss423.version>
- <jbossws.jboss424.version>3.0.5.GA</jbossws.jboss424.version>
- <jbossws.jboss500.version>3.0.5.GA</jbossws.jboss500.version>
+ <jbossws.spi.version>1.0.8-SNAPSHOT</jbossws.spi.version>
+ <jbossws.jboss422.version>3.0.6-SNAPSHOT</jbossws.jboss422.version>
+ <jbossws.jboss423.version>3.0.6-SNAPSHOT</jbossws.jboss423.version>
+ <jbossws.jboss424.version>3.0.6-SNAPSHOT</jbossws.jboss424.version>
+ <jbossws.jboss500.version>3.0.6-SNAPSHOT</jbossws.jboss500.version>
<!-- JBWS-2263 -->
<!-- START -->
- <jbossws.jboss510.version>3.0.5.GA</jbossws.jboss510.version>
+ <jbossws.jboss510.version>3.0.6-SNAPSHOT</jbossws.jboss510.version>
<jbossws.jboss600.version>3.0.6-SNAPSHOT</jbossws.jboss600.version>
<!-- END -->
<jboss.common.version>1.2.1.GA</jboss.common.version>
15 years, 11 months
JBossWS SVN: r9131 - in stack/cxf/trunk/modules/server/src/main: resources/jbossws-cxf-server.jar/META-INF/services and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-27 13:43:32 -0500 (Tue, 27 Jan 2009)
New Revision: 9131
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextEJB.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextJSE.java
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java
Log:
[JBWS-2491] Providing WebServiceContext CXF specific implementations
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java 2009-01-27 18:41:22 UTC (rev 9130)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java 2009-01-27 18:43:32 UTC (rev 9131)
@@ -24,18 +24,24 @@
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
-import org.jboss.wsf.spi.invocation.WebServiceContextEJB;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
/**
* An XFire invoker for EJB3
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
* @since 21-May-2007
*/
public class InvokerEJB3 extends AbstractInvoker
{
protected WebServiceContext getWebServiceContext(MessageContext msgCtx)
{
- return new WebServiceContextEJB(msgCtx);
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ WebServiceContextFactory contextFactory = spiProvider.getSPI(WebServiceContextFactory.class);
+ return contextFactory.newWebServiceContext(InvocationType.JAXWS_EJB3, msgCtx);
}
}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java 2009-01-27 18:41:22 UTC (rev 9130)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java 2009-01-27 18:43:32 UTC (rev 9131)
@@ -24,18 +24,24 @@
import javax.xml.ws.WebServiceContext;
import javax.xml.ws.handler.MessageContext;
-import org.jboss.wsf.spi.invocation.WebServiceContextJSE;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
/**
* An CXF invoker for JSE
*
* @author Thomas.Diesler(a)jboss.org
+ * @author alessio.soldano(a)jboss.com
* @since 21-May-2007
*/
public class InvokerJSE extends AbstractInvoker
{
protected WebServiceContext getWebServiceContext(MessageContext msgCtx)
{
- return new WebServiceContextJSE(msgCtx);
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ WebServiceContextFactory contextFactory = spiProvider.getSPI(WebServiceContextFactory.class);
+ return contextFactory.newWebServiceContext(InvocationType.JAXWS_JSE, msgCtx);
}
}
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextEJB.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextEJB.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextEJB.java 2009-01-27 18:43:32 UTC (rev 9131)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.cxf;
+
+import java.security.Principal;
+
+import javax.ejb.EJBContext;
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 27-Jan-2009
+ */
+public class WebServiceContextEJB extends WebServiceContextDelegate
+{
+ public WebServiceContextEJB(WebServiceContext ctx)
+ {
+ super(ctx);
+ }
+
+ public Principal getUserPrincipal()
+ {
+ EJBContext ejbContext = getAttachment(EJBContext.class);
+ Principal principal = ejbContext.getCallerPrincipal();
+ return principal;
+ }
+
+ public boolean isUserInRole(String role)
+ {
+ EJBContext ejbContext = getAttachment(EJBContext.class);
+ boolean isUserInRole = ejbContext.isCallerInRole(role);
+ return isUserInRole;
+ }
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextEJB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2009-01-27 18:43:32 UTC (rev 9131)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.cxf;
+
+import javax.xml.ws.handler.MessageContext;
+
+import org.apache.cxf.jaxws.context.WebServiceContextImpl;
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ *
+ */
+public class WebServiceContextFactoryImpl extends WebServiceContextFactory
+{
+ public ExtensibleWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
+ {
+ ExtensibleWebServiceContext context = null;
+
+ if (type.toString().indexOf("EJB") != -1 || type.toString().indexOf("MDB") != -1)
+ context = new WebServiceContextEJB(new WebServiceContextImpl(messageContext));
+ else
+ context = new WebServiceContextJSE(new WebServiceContextImpl(messageContext));
+
+ return context;
+ }
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextJSE.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextJSE.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextJSE.java 2009-01-27 18:43:32 UTC (rev 9131)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.cxf;
+
+import java.security.Principal;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 27-Jan-2009
+ */
+public class WebServiceContextJSE extends WebServiceContextDelegate
+{
+ private HttpServletRequest httpRequest;
+
+ public WebServiceContextJSE(WebServiceContext ctx)
+ {
+ super(ctx);
+ httpRequest = (HttpServletRequest)ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
+ if (httpRequest == null)
+ throw new IllegalStateException("Cannot obtain HTTPServletRequest from message context");
+ }
+
+ @Override
+ public Principal getUserPrincipal()
+ {
+ Principal principal = httpRequest.getUserPrincipal();
+ return principal;
+ }
+
+ @Override
+ public boolean isUserInRole(String role)
+ {
+ boolean isUserInRole = httpRequest.isUserInRole(role);
+ return isUserInRole;
+ }
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf-server.jar/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory 2009-01-27 18:43:32 UTC (rev 9131)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.WebServiceContextFactoryImpl
\ No newline at end of file
15 years, 11 months
JBossWS SVN: r9130 - in stack/native/trunk/modules/core/src/main: resources/META-INF/services and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-01-27 13:41:22 -0500 (Tue, 27 Jan 2009)
New Revision: 9130
Added:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/NativeWebServiceContext.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextEJB.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextFactoryImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextJSE.java
stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
Log:
[JBWS-2491] Adding WebServiceContext Native specific implementations
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/NativeWebServiceContext.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/NativeWebServiceContext.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/NativeWebServiceContext.java 2009-01-27 18:41:22 UTC (rev 9130)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.jbws;
+
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.http.HTTPBinding;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.jaxws.binding.EndpointReferenceUtil;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.w3c.dom.Element;
+
+/**
+ * An ExtensibileWebServiceContext implementing the getEndpointReference jaxws 2.1 methods
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 27-Jan-2009
+ */
+public abstract class NativeWebServiceContext extends ExtensibleWebServiceContext
+{
+ public NativeWebServiceContext(MessageContext messageContext)
+ {
+ super(messageContext);
+ }
+
+ public EndpointReference getEndpointReference(Element... referenceParameters)
+ {
+ return getEndpointReference(W3CEndpointReference.class, referenceParameters);
+ }
+
+ public <T extends EndpointReference> T getEndpointReference(Class<T> clazz, Element... referenceParameters)
+ {
+ EndpointMetaData epMetaData = ((CommonMessageContext)getMessageContext()).getEndpointMetaData();
+ if (epMetaData == null)
+ {
+ throw new WebServiceException("Cannot get EndpointMetaData!");
+ }
+ if (HTTPBinding.HTTP_BINDING.equals(epMetaData.getBindingId()))
+ {
+ throw new UnsupportedOperationException("Cannot get epr when using the XML/HTTP binding");
+ }
+ W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ String address = epMetaData.getEndpointAddress();
+ builder.address(address);
+ builder.wsdlDocumentLocation(address.toString() + "?wsdl");
+ //TODO set other parameters in the builder
+ if (referenceParameters != null && W3CEndpointReference.class.getName().equals(clazz.getName()))
+ {
+ for (Element el : referenceParameters)
+ builder.referenceParameter(el);
+ }
+ return EndpointReferenceUtil.transform(clazz, builder.build());
+ }
+}
Property changes on: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/NativeWebServiceContext.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextEJB.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextEJB.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextEJB.java 2009-01-27 18:41:22 UTC (rev 9130)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.jbws;
+
+import java.security.Principal;
+
+import javax.ejb.EJBContext;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * A WebServiceContext implementation that delegates to the EJBContext.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jan-2007
+ */
+public class WebServiceContextEJB extends NativeWebServiceContext
+{
+ public WebServiceContextEJB(MessageContext msgContext)
+ {
+ super(msgContext);
+ }
+
+ public Principal getUserPrincipal()
+ {
+ EJBContext ejbContext = getAttachment(EJBContext.class);
+ Principal principal = ejbContext.getCallerPrincipal();
+ return principal;
+ }
+
+ public boolean isUserInRole(String role)
+ {
+ EJBContext ejbContext = getAttachment(EJBContext.class);
+ boolean isUserInRole = ejbContext.isCallerInRole(role);
+ return isUserInRole;
+ }
+}
Property changes on: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextEJB.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextFactoryImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextFactoryImpl.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextFactoryImpl.java 2009-01-27 18:41:22 UTC (rev 9130)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.jbws;
+
+import javax.xml.ws.handler.MessageContext;
+
+import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.jboss.wsf.spi.invocation.InvocationType;
+import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ *
+ */
+public class WebServiceContextFactoryImpl extends WebServiceContextFactory
+{
+ public ExtensibleWebServiceContext newWebServiceContext(InvocationType type, MessageContext messageContext)
+ {
+ ExtensibleWebServiceContext context = null;
+
+ if(type.toString().indexOf("EJB")!=-1 || type.toString().indexOf("MDB")!=-1)
+ context = new WebServiceContextEJB(messageContext);
+ else
+ context = new WebServiceContextJSE(messageContext);
+
+ return context;
+ }
+}
Property changes on: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextJSE.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextJSE.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextJSE.java 2009-01-27 18:41:22 UTC (rev 9130)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.wsf.stack.jbws;
+
+import java.security.Principal;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * A WebServiceContext implementation that delegates to the HttpServletRequest.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 23-Jan-2007
+ */
+public class WebServiceContextJSE extends NativeWebServiceContext
+{
+ private HttpServletRequest httpRequest;
+
+ public WebServiceContextJSE(MessageContext msgContext)
+ {
+ super(msgContext);
+ httpRequest = (HttpServletRequest)msgContext.get(MessageContext.SERVLET_REQUEST);
+ if (httpRequest == null)
+ throw new IllegalStateException("Cannot obtain HTTPServletRequest from message context");
+ }
+
+ @Override
+ public Principal getUserPrincipal()
+ {
+ Principal principal = httpRequest.getUserPrincipal();
+ return principal;
+ }
+
+ @Override
+ public boolean isUserInRole(String role)
+ {
+ boolean isUserInRole = httpRequest.isUserInRole(role);
+ return isUserInRole;
+ }
+}
Property changes on: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebServiceContextJSE.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory
===================================================================
--- stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory (rev 0)
+++ stack/native/trunk/modules/core/src/main/resources/META-INF/services/org.jboss.wsf.spi.invocation.WebServiceContextFactory 2009-01-27 18:41:22 UTC (rev 9130)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.jbws.WebServiceContextFactoryImpl
\ No newline at end of file
15 years, 11 months