Author: jlaskowski
Date: Tue Jan 6 14:37:23 2009
New Revision: 732158
URL: http://svn.apache.org/viewvc?rev=732158&view=rev
Log:
OPENEJB-981 Specify a list of protected HTTP methods for secure web services
Modified:
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceBindingType.java
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceSecurityType.java
Modified:
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceBindingType.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceBindingType.java?rev=732158&r1=732157&r2=732158&view=diff
==============================================================================
---
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceBindingType.java
(original)
+++
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceBindingType.java
Tue Jan 6 14:37:23 2009
@@ -97,7 +97,8 @@
"securityRealmName",
"realmName",
"transportGuarantee",
- "authMethod"
+ "authMethod",
+ "httpMethod"
})
public static class WebServiceSecurityType {
@@ -109,6 +110,8 @@
protected TransportGuaranteeType transportGuarantee;
@XmlElement(name = "auth-method", required = true)
protected AuthMethodType authMethod;
+ @XmlElement(name = "http-method")
+ protected List<String> httpMethod;
public WebServiceSecurityType() {
}
@@ -118,6 +121,7 @@
this.realmName = s.getRealmName();
this.transportGuarantee = s.getTransportGuarantee();
this.authMethod = s.getAuthMethod();
+ this.httpMethod = s.httpMethod;
}
public String getSecurityRealmName() {
@@ -151,5 +155,12 @@
public void setAuthMethod(AuthMethodType value) {
this.authMethod = value;
}
+
+ public List<String> getHttpMethod() {
+ if (httpMethod == null) {
+ httpMethod = new ArrayList<String>();
+ }
+ return this.httpMethod;
+ }
}
}
Modified:
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceSecurityType.java
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceSecurityType.java?rev=732158&r1=732157&r2=732158&view=diff
==============================================================================
---
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceSecurityType.java
(original)
+++
openejb/trunk/openejb3/container/openejb-jee/src/main/java/org/apache/openejb/jee/oejb2/WebServiceSecurityType.java
Tue Jan 6 14:37:23 2009
@@ -17,6 +17,8 @@
package org.apache.openejb.jee.oejb2;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@@ -37,6 +39,7 @@
* <element name="realm-name"
type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="transport-guarantee"
type="{http://openejb.apache.org/xml/ns/openejb-jar-2.2}transport-guaranteeType"/>
* <element name="auth-method"
type="{http://openejb.apache.org/xml/ns/openejb-jar-2.2}auth-methodType"/>
+ * <element name="http-method"
type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"
minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
@@ -50,7 +53,8 @@
"securityRealmName",
"realmName",
"transportGuarantee",
- "authMethod"
+ "authMethod",
+ "httpMethod"
})
public class WebServiceSecurityType {
@@ -62,6 +66,8 @@
protected TransportGuaranteeType transportGuarantee;
@XmlElement(name = "auth-method", required = true)
protected AuthMethodType authMethod;
+ @XmlElement(name = "http-method")
+ protected List<String> httpMethod;
/**
* Gets the value of the securityRealmName property.
@@ -159,4 +165,33 @@
this.authMethod = value;
}
+ /**
+ * Gets the value of the httpMethod property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the httpMethod
property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getHttpMethod().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {...@link String }
+ *
+ *
+ */
+ public List<String> getHttpMethod() {
+ if (httpMethod == null) {
+ httpMethod = new ArrayList<String>();
+ }
+ return this.httpMethod;
+ }
+
}