JBossWS SVN: r10729 - in stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817: modules/testsuite/native-tests/scripts and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-21 12:33:51 -0400 (Mon, 21 Sep 2009)
New Revision: 10729
Removed:
stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java
Modified:
stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java
stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/pom.xml
Log:
[JBPAPP-2817] Relax restriction on @WebContext(authMethod).
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-09-21 16:05:51 UTC (rev 10728)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-09-21 16:33:51 UTC (rev 10729)
@@ -537,20 +537,6 @@
<include name="jboss-app.xml"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565-wrong.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.class"/>
- </fileset>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565-wrong.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-jbws2565-wrong.jar"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2565/wrong/META-INF">
- <include name="application.xml"/>
- <include name="jboss-app.xml"/>
- </metainf>
- </jar>
<!-- jaxws-jbws2682 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2682.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2682/WEB-INF/web.xml">
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java 2009-09-21 16:05:51 UTC (rev 10728)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java 2009-09-21 16:33:51 UTC (rev 10729)
@@ -56,19 +56,6 @@
final String[] serviceArgs = {};
final String result = (String) call.invoke(serviceArgs);
assertEquals("i've done stuff", result);
- }
+ }
- public void testWrongArchiveDeployment() throws Exception
- {
- try
- {
- this.deploy("jaxws-jbws2565-wrong.ear");
- fail("Deployment of this archive had to fail.");
- }
- catch (Exception ignore)
- {
- log.error("Expected exception caught:" + ignore.getMessage(), ignore);
- }
- }
-
}
Deleted: stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java 2009-09-21 16:05:51 UTC (rev 10728)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java 2009-09-21 16:33:51 UTC (rev 10729)
@@ -1,43 +0,0 @@
-/**
- *
- */
-package org.jboss.test.ws.jaxws.jbws2565;
-
-import javax.annotation.security.PermitAll;
-import javax.ejb.Stateless;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.wsf.spi.annotation.TransportGuarantee;
-import org.jboss.wsf.spi.annotation.WebContext;
-
-@Stateless
-@PermitAll
-@WebService
-(
- name = "MyWebService",
- targetNamespace = "http://my.services.web",
- serviceName = "MyWebServiceName"
-)
-@WebContext
-(
- contextRoot = "/jaxws-jbws2565-wrong",
- transportGuarantee = TransportGuarantee.NONE,
- authMethod = "NONE" // this is wrong value, deployment should be rejected
-)
-@SOAPBinding
-(
- use = SOAPBinding.Use.LITERAL,
- style = SOAPBinding.Style.DOCUMENT,
- parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
-)
-public final class MyWebServiceBeanWrong
-{
- @WebMethod
- @PermitAll
- public final String doStuff()
- {
- return "i've done stuff";
- }
-}
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/pom.xml 2009-09-21 16:05:51 UTC (rev 10728)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/pom.xml 2009-09-21 16:33:51 UTC (rev 10729)
@@ -49,7 +49,7 @@
<properties>
<jbossws.common.version>1.1.0.SP2</jbossws.common.version>
<jbossws.framework.version>3.1.2.SP4</jbossws.framework.version>
- <jbossws.spi.version>1.1.2.SP1</jbossws.spi.version>
+ <jbossws.spi.version>1.1.2.SP1_JBPAPP-2817</jbossws.spi.version>
<!-- [JBWS-2505] -->
<!-- START -->
<!--
15 years, 3 months
JBossWS SVN: r10728 - in spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817: src/main/java/org/jboss/wsf/spi/annotation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-21 12:05:51 -0400 (Mon, 21 Sep 2009)
New Revision: 10728
Modified:
spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/pom.xml
spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java
spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java
spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java
Log:
[JBPAPP-2817] Relax restriction on @WebContext(authMethod).
Modified: spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/pom.xml
===================================================================
--- spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/pom.xml 2009-09-21 15:29:07 UTC (rev 10727)
+++ spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/pom.xml 2009-09-21 16:05:51 UTC (rev 10728)
@@ -6,7 +6,7 @@
<artifactId>jbossws-spi</artifactId>
<packaging>jar</packaging>
- <version>1.1.2.SP1</version>
+ <version>1.1.2.SP1_JBPAPP-2817</version>
<!-- Parent -->
<parent>
Modified: spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java 2009-09-21 15:29:07 UTC (rev 10727)
+++ spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java 2009-09-21 16:05:51 UTC (rev 10728)
@@ -21,6 +21,8 @@
*/
package org.jboss.wsf.spi.annotation;
+import org.jboss.logging.Logger;
+
/**
* The authMethod is used to configure the authentication mechanism for the web service.
* As a prerequisite to gaining access to any web service which are protected by an
@@ -30,6 +32,7 @@
*/
public final class AuthMethod
{
+ private static final Logger log = Logger.getLogger(AuthMethod.class);
/**
* Basic authentication.
@@ -50,7 +53,7 @@
/**
* Returns string representing correct auth method value.
- * @param s string to convert, both lowercased and uppercased values are accepted
+ * @param s string to convert.
* @return correct auth method value
* @throws IllegalArgumentException if <b>s</b> is <b>null</b> or it contains unknown value.
*/
@@ -70,6 +73,8 @@
{
return AuthMethod.CLIENT_CERT;
}
+ log.warn("Non-standard auth method value: " + s);
+ return s;
}
throw new IllegalArgumentException("Illegal auth method value: " + s);
Modified: spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java 2009-09-21 15:29:07 UTC (rev 10727)
+++ spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java 2009-09-21 16:05:51 UTC (rev 10728)
@@ -63,7 +63,7 @@
/**
* Returns string representing correct transport guarantee value.
- * @param s string to convert, both lowercased and uppercased values are accepted
+ * @param s string to convert.
* @return correct transport guarantee value
* @throws IllegalArgumentException if <b>s</b> is <b>null</b> or it contains unknown value.
*/
Modified: spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java 2009-09-21 15:29:07 UTC (rev 10727)
+++ spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java 2009-09-21 16:05:51 UTC (rev 10728)
@@ -64,7 +64,8 @@
* As a prerequisite to gaining access to any web service which are protected by an authorization
* constraint, a user must have authenticated using the configured mechanism.
*
- * Legal values for this element are "BASIC", or "CLIENT-CERT".
+ * Standard values for this element are "BASIC", or "CLIENT-CERT", custom authMethods may also
+ * be specified.
*
* @see AuthMethod
*/
15 years, 3 months
JBossWS SVN: r10727 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-21 11:29:07 -0400 (Mon, 21 Sep 2009)
New Revision: 10727
Added:
spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817/
Log:
[JBPAPP-2817] Branch for patch.
Copied: spi/branches/jbossws-spi-1.1.2.SP1_JBPAPP-2817 (from rev 10726, spi/tags/jbossws-spi-1.1.2.SP1)
15 years, 3 months
JBossWS SVN: r10726 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-21 11:11:59 -0400 (Mon, 21 Sep 2009)
New Revision: 10726
Added:
stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817/
Log:
[JBPAPP-2817] Branch for patch.
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_JBPAPP-2817 (from rev 10725, stack/native/tags/jbossws-native-3.1.2.SP3)
15 years, 3 months
JBossWS SVN: r10725 - in stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws/jbws2565 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-21 10:20:27 -0400 (Mon, 21 Sep 2009)
New Revision: 10725
Removed:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java
Log:
[JBPAPP-2816] Relax restriction on @WebContext(authMethod).
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-09-21 13:11:08 UTC (rev 10724)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2009-09-21 14:20:27 UTC (rev 10725)
@@ -537,20 +537,6 @@
<include name="jboss-app.xml"/>
</metainf>
</jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565-wrong.jar">
- <fileset dir="${tests.output.dir}/test-classes">
- <include name="org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.class"/>
- </fileset>
- </jar>
- <jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2565-wrong.ear">
- <fileset dir="${tests.output.dir}/test-libs">
- <include name="jaxws-jbws2565-wrong.jar"/>
- </fileset>
- <metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2565/wrong/META-INF">
- <include name="application.xml"/>
- <include name="jboss-app.xml"/>
- </metainf>
- </jar>
<!-- jaxws-jbws2682 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2682.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2682/WEB-INF/web.xml">
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java 2009-09-21 13:11:08 UTC (rev 10724)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/JBWS2565TestCase.java 2009-09-21 14:20:27 UTC (rev 10725)
@@ -56,19 +56,6 @@
final String[] serviceArgs = {};
final String result = (String) call.invoke(serviceArgs);
assertEquals("i've done stuff", result);
- }
+ }
- public void testWrongArchiveDeployment() throws Exception
- {
- try
- {
- this.deploy("jaxws-jbws2565-wrong.ear");
- fail("Deployment of this archive had to fail.");
- }
- catch (Exception ignore)
- {
- log.error("Expected exception caught:" + ignore.getMessage(), ignore);
- }
- }
-
}
Deleted: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java 2009-09-21 13:11:08 UTC (rev 10724)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2565/MyWebServiceBeanWrong.java 2009-09-21 14:20:27 UTC (rev 10725)
@@ -1,43 +0,0 @@
-/**
- *
- */
-package org.jboss.test.ws.jaxws.jbws2565;
-
-import javax.annotation.security.PermitAll;
-import javax.ejb.Stateless;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-import org.jboss.wsf.spi.annotation.TransportGuarantee;
-import org.jboss.wsf.spi.annotation.WebContext;
-
-@Stateless
-@PermitAll
-@WebService
-(
- name = "MyWebService",
- targetNamespace = "http://my.services.web",
- serviceName = "MyWebServiceName"
-)
-@WebContext
-(
- contextRoot = "/jaxws-jbws2565-wrong",
- transportGuarantee = TransportGuarantee.NONE,
- authMethod = "NONE" // this is wrong value, deployment should be rejected
-)
-@SOAPBinding
-(
- use = SOAPBinding.Use.LITERAL,
- style = SOAPBinding.Style.DOCUMENT,
- parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
-)
-public final class MyWebServiceBeanWrong
-{
- @WebMethod
- @PermitAll
- public final String doStuff()
- {
- return "i've done stuff";
- }
-}
15 years, 3 months
JBossWS SVN: r10724 - stack/native/branches/jbossws-native-3.1.2.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-21 09:11:08 -0400 (Mon, 21 Sep 2009)
New Revision: 10724
Modified:
stack/native/branches/jbossws-native-3.1.2/pom.xml
Log:
[JBPAPP-2838] Switch to using a SNAPSHOT for SPI.
Modified: stack/native/branches/jbossws-native-3.1.2/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/pom.xml 2009-09-21 13:02:13 UTC (rev 10723)
+++ stack/native/branches/jbossws-native-3.1.2/pom.xml 2009-09-21 13:11:08 UTC (rev 10724)
@@ -49,7 +49,7 @@
<properties>
<jbossws.common.version>1.1.0.SP2</jbossws.common.version>
<jbossws.framework.version>3.1.2.SP4</jbossws.framework.version>
- <jbossws.spi.version>1.1.2.SP1</jbossws.spi.version>
+ <jbossws.spi.version>1.1.2-SNAPSHOT</jbossws.spi.version>
<!-- [JBWS-2505] -->
<!-- START -->
<!--
15 years, 3 months
JBossWS SVN: r10723 - spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-09-21 09:02:13 -0400 (Mon, 21 Sep 2009)
New Revision: 10723
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java
Log:
[JBPAPP-2816] Relax restriction on @WebContext(authMethod).
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java 2009-09-21 12:36:40 UTC (rev 10722)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/AuthMethod.java 2009-09-21 13:02:13 UTC (rev 10723)
@@ -21,6 +21,8 @@
*/
package org.jboss.wsf.spi.annotation;
+import org.jboss.logging.Logger;
+
/**
* The authMethod is used to configure the authentication mechanism for the web service.
* As a prerequisite to gaining access to any web service which are protected by an
@@ -30,6 +32,7 @@
*/
public final class AuthMethod
{
+ private static final Logger log = Logger.getLogger(AuthMethod.class);
/**
* Basic authentication.
@@ -50,7 +53,7 @@
/**
* Returns string representing correct auth method value.
- * @param s string to convert, both lowercased and uppercased values are accepted
+ * @param s string to convert.
* @return correct auth method value
* @throws IllegalArgumentException if <b>s</b> is <b>null</b> or it contains unknown value.
*/
@@ -70,6 +73,8 @@
{
return AuthMethod.CLIENT_CERT;
}
+ log.warn("Non-standard auth method value: " + s);
+ return s;
}
throw new IllegalArgumentException("Illegal auth method value: " + s);
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java 2009-09-21 12:36:40 UTC (rev 10722)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/TransportGuarantee.java 2009-09-21 13:02:13 UTC (rev 10723)
@@ -63,7 +63,7 @@
/**
* Returns string representing correct transport guarantee value.
- * @param s string to convert, both lowercased and uppercased values are accepted
+ * @param s string to convert.
* @return correct transport guarantee value
* @throws IllegalArgumentException if <b>s</b> is <b>null</b> or it contains unknown value.
*/
Modified: spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java
===================================================================
--- spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java 2009-09-21 12:36:40 UTC (rev 10722)
+++ spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/annotation/WebContext.java 2009-09-21 13:02:13 UTC (rev 10723)
@@ -64,7 +64,8 @@
* As a prerequisite to gaining access to any web service which are protected by an authorization
* constraint, a user must have authenticated using the configured mechanism.
*
- * Legal values for this element are "BASIC", or "CLIENT-CERT".
+ * Standard values for this element are "BASIC", or "CLIENT-CERT", custom authMethods may also
+ * be specified.
*
* @see AuthMethod
*/
15 years, 3 months
JBossWS SVN: r10722 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-21 08:36:40 -0400 (Mon, 21 Sep 2009)
New Revision: 10722
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
Log:
[JBWS-2674][JBWS-2754] providing JAX-WS 2.2 methods
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2009-09-21 07:37:56 UTC (rev 10721)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2009-09-21 12:36:40 UTC (rev 10722)
@@ -34,6 +34,7 @@
import javax.xml.ws.Endpoint;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.WebServicePermission;
import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
@@ -67,6 +68,7 @@
private Object implementor;
private Executor executor;
+ private WebServiceFeature[] features; // TODO: use features
private List<Source> metadata;
private BindingProviderImpl bindingProvider;
private Map<String, Object> properties = new HashMap<String, Object>();
@@ -75,15 +77,14 @@
private boolean isDestroyed;
private URI address;
- public EndpointImpl(String bindingId, Object implementor)
+ public EndpointImpl(String bindingId, Object implementor, WebServiceFeature[] features)
{
- log.debug("new EndpointImpl(bindingId=" + bindingId + ",implementor=" + implementor + ")");
-
if (implementor == null)
throw new IllegalArgumentException("Implementor cannot be null");
this.implementor = implementor;
this.bindingProvider = new BindingProviderImpl(bindingId);
+ this.features = features;
}
@Override
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2009-09-21 07:37:56 UTC (rev 10721)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ProviderImpl.java 2009-09-21 12:36:40 UTC (rev 10722)
@@ -24,6 +24,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
+import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
@@ -47,107 +48,112 @@
* Service provider for ServiceDelegate and Endpoint objects.
*
* @author Thomas.Diesler(a)jboss.com
- * @since 03-May-2006
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @see javax.xml.ws.spi.Provider
*/
-public class ProviderImpl extends Provider
+public final class ProviderImpl extends Provider
{
- // 6.2 Conformance (Concrete javax.xml.ws.spi.Provider required): An implementation MUST provide
- // a concrete class that extends javax.xml.ws.spi.Provider. Such a class MUST have a public constructor
- // which takes no arguments.
+
public ProviderImpl()
{
}
@Override
- public ServiceDelegate createServiceDelegate(URL wsdlLocation, QName serviceName, Class serviceClass)
+ public Endpoint createAndPublishEndpoint(final String address, final Object implementor)
{
- ServiceDelegateImpl delegate = new ServiceDelegateImpl(wsdlLocation, serviceName, serviceClass);
- DOMUtils.clearThreadLocals();
- return delegate;
+ return this.createAndPublishEndpoint(address, implementor, (WebServiceFeature[])null);
}
+ // @Override TODO: comment out override on switch to JAX-WS 2.2
+ public Endpoint createAndPublishEndpoint(final String address, final Object implementor, final WebServiceFeature... features)
+ {
+ final String bindingId = getBindingFromAddress(address);
+ final EndpointImpl endpoint = (EndpointImpl)createEndpoint(bindingId, implementor, features);
+ endpoint.publish(address);
+
+ return endpoint;
+ }
+
@Override
- public Endpoint createEndpoint(String bindingId, Object implementor)
+ public Endpoint createEndpoint(final String bindingId, final Object implementor)
{
- String realBindingId = bindingId;
- if (realBindingId == null)
- {
- BindingType anBindingType = implementor.getClass().getAnnotation(BindingType.class);
- realBindingId = (anBindingType != null) ? anBindingType.value() : SOAPBinding.SOAP11HTTP_BINDING;
- }
+ return this.createEndpoint(bindingId, implementor, (WebServiceFeature[])null);
+ }
+
+ // @Override TODO: comment out override on switch to JAX-WS 2.2
+ public Endpoint createEndpoint(final String bindingId, final Object implementor, final WebServiceFeature... features)
+ {
+ final String nonNullBindingId = this.getBindingId(bindingId, implementor.getClass());
- return new EndpointImpl(realBindingId, implementor);
+ return new EndpointImpl(nonNullBindingId, implementor, features);
}
+ /* TODO: comment out on switch to JAX-WS 2.2
+ @SuppressWarnings("unchecked")
@Override
- public Endpoint createAndPublishEndpoint(String address, Object implementor)
+ public Endpoint createEndpoint(final String bindingId, final Class implementorClass, final Invoker invoker,
+ final WebServiceFeature... features)
{
- // 6.3 Conformance (Provider createAndPublishEndpoint Method): The effect of invoking the createAnd-
- // PublishEndpoint method on a Provider MUST be the same as first invoking the createEndpoint
- // method with the binding ID appropriate to the URL scheme used by the address, then invoking the
- // publish(String address) method on the resulting endpoint.
+ throw new UnsupportedOperationException("This method is not portable across JAX-WS implementations");
+ }
+ */
+
+ @Override
+ public ServiceDelegate createServiceDelegate(final URL wsdlLocation, final QName serviceName, final Class serviceClass)
+ {
+ return this.createServiceDelegate(wsdlLocation, serviceName, serviceClass, (WebServiceFeature[])null);
+ }
- String bindingId = getBindingFromAddress(address);
- EndpointImpl endpoint = (EndpointImpl)createEndpoint(bindingId, implementor);
- endpoint.publish(address);
- return endpoint;
+ // @Override TODO: comment out override on switch to JAX-WS 2.2
+ public ServiceDelegate createServiceDelegate(final URL wsdlLocation, final QName serviceName, final Class serviceClass,
+ final WebServiceFeature... features)
+ {
+ ServiceDelegateImpl delegate = new ServiceDelegateImpl(wsdlLocation, serviceName, serviceClass, features);
+ DOMUtils.clearThreadLocals();
+ return delegate;
}
- private String getBindingFromAddress(String address)
+ // @Override TODO: comment out override on switch to JAX-WS 2.2
+ public W3CEndpointReference createW3CEndpointReference(final String address, final QName interfaceName,
+ final QName serviceName, final QName portName, final List<Element> metadata, final String wsdlDocumentLocation,
+ final List<Element> referenceParameters, final List<Element> elements, final Map<QName, String> attributes)
{
- String bindingId;
- try
- {
- URL url = new URL(address);
- String protocol = url.getProtocol();
- if (protocol.startsWith("http"))
- {
- bindingId = SOAPBinding.SOAP11HTTP_BINDING;
- }
- else
- {
- throw new IllegalArgumentException("Unsupported protocol: " + address);
- }
- }
- catch (MalformedURLException e)
- {
- throw new IllegalArgumentException("Invalid endpoint address: " + address);
- }
- return bindingId;
+ throw new UnsupportedOperationException(); // TODO
}
@Override
- public W3CEndpointReference createW3CEndpointReference(String address, QName serviceName, QName portName, List<Element> metadata, String wsdlDocumentLocation,
- List<Element> referenceParameters)
+ public W3CEndpointReference createW3CEndpointReference(final String address, final QName serviceName,
+ final QName portName, final List<Element> metadata, final String wsdlDocumentLocation,
+ final List<Element> referenceParameters)
{
- NativeEndpointReference epr = new NativeEndpointReference();
+ final NativeEndpointReference epr = new NativeEndpointReference();
epr.setAddress(address);
epr.setServiceName(serviceName);
epr.setEndpointName(portName);
epr.setMetadata(metadata);
epr.setWsdlLocation(wsdlDocumentLocation);
epr.setReferenceParameters(referenceParameters);
+
return EndpointReferenceUtil.transform(W3CEndpointReference.class, epr);
}
@Override
- public <T> T getPort(EndpointReference epr, Class<T> sei, WebServiceFeature... features)
+ public <T> T getPort(final EndpointReference epr, final Class<T> sei, final WebServiceFeature... features)
{
- URL wsdlLocation = null;
- QName serviceName = null;
- NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
-
- wsdlLocation = nepr.getWsdlLocation();
- serviceName = nepr.getServiceName();
- ServiceDelegate delegate = createServiceDelegate(wsdlLocation, serviceName, Service.class);
+ final NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
+ final URL wsdlLocation = nepr.getWsdlLocation();
+ final QName serviceName = nepr.getServiceName();
+ final ServiceDelegate delegate = createServiceDelegate(wsdlLocation, serviceName, Service.class);
+
return delegate.getPort(epr, sei, features);
}
@Override
- public EndpointReference readEndpointReference(Source eprInfoset)
+ public EndpointReference readEndpointReference(final Source eprInfoset)
{
if (eprInfoset == null)
throw new NullPointerException("Provided eprInfoset cannot be null");
+
try
{
//we currently support W3CEndpointReference only
@@ -158,4 +164,38 @@
throw new WebServiceException(e);
}
}
+
+ private String getBindingFromAddress(final String address)
+ {
+ try
+ {
+ final URL url = new URL(address);
+ final String protocol = url.getProtocol();
+
+ if (protocol.toLowerCase().startsWith("http"))
+ {
+ return SOAPBinding.SOAP11HTTP_BINDING;
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ throw new IllegalArgumentException("Invalid endpoint address: " + address);
+ }
+
+ throw new IllegalArgumentException("Unsupported protocol: " + address);
+ }
+
+ private String getBindingId(final String bindingId, final Class<?> implementorClass)
+ {
+ if (bindingId != null)
+ {
+ return bindingId;
+ }
+ else
+ {
+ final BindingType bindingType = implementorClass.getAnnotation(BindingType.class);
+ return (bindingType != null) ? bindingType.value() : SOAPBinding.SOAP11HTTP_BINDING;
+ }
+ }
+
}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2009-09-21 07:37:56 UTC (rev 10721)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2009-09-21 12:36:40 UTC (rev 10722)
@@ -106,10 +106,18 @@
private HandlerResolver handlerResolver;
// The executor service
private ExecutorService executor;
+ // The features
+ private WebServiceFeature[] features;
// A list of annotated ports
private List<QName> annotatedPorts = new ArrayList<QName>();
+ public ServiceDelegateImpl(URL wsdlURL, QName serviceName, Class serviceClass, WebServiceFeature[] features)
+ {
+ this(wsdlURL, serviceName, serviceClass);
+ this.features = features;
+ }
+
public ServiceDelegateImpl(URL wsdlURL, QName serviceName, Class serviceClass)
{
// If this Service was constructed through the ServiceObjectFactory
@@ -470,6 +478,7 @@
public <T> Dispatch<T> createDispatch(QName portName, Class<T> type, Mode mode, WebServiceFeature... features)
{
Dispatch<T> dispatch = createDispatch(portName, type, mode);
+ initWebserviceFeatures(dispatch, this.features);
initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -483,6 +492,7 @@
Dispatch<T> dispatch = createDispatch(portName, type, mode);
initAddressingProperties(dispatch, epr);
+ initWebserviceFeatures(dispatch, this.features);
initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -491,6 +501,7 @@
public Dispatch<Object> createDispatch(QName portName, JAXBContext context, Mode mode, WebServiceFeature... features)
{
Dispatch<Object> dispatch = createDispatch(portName, context, mode);
+ initWebserviceFeatures(dispatch, this.features);
initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -504,6 +515,7 @@
Dispatch<Object> dispatch = createDispatch(portName, context, mode);
initAddressingProperties(dispatch, epr);
+ initWebserviceFeatures(dispatch, this.features);
initWebserviceFeatures(dispatch, features);
return dispatch;
}
@@ -512,6 +524,7 @@
public <T> T getPort(QName portName, Class<T> sei, WebServiceFeature... features)
{
T port = getPort(portName, sei);
+ initWebserviceFeatures(port, this.features);
initWebserviceFeatures(port, features);
return port;
}
@@ -521,6 +534,7 @@
{
T port = getPort(sei);
initAddressingProperties((BindingProvider)port, epr);
+ initWebserviceFeatures(port, this.features);
initWebserviceFeatures(port, features);
return port;
}
@@ -529,6 +543,7 @@
public <T> T getPort(Class<T> sei, WebServiceFeature... features)
{
T port = getPort(sei);
+ initWebserviceFeatures(port, this.features);
initWebserviceFeatures(port, features);
return port;
}
15 years, 3 months