Author: jim.ma
Date: 2014-10-14 05:53:24 -0400 (Tue, 14 Oct 2014)
New Revision: 18984
Added:
spi/trunk/src/main/resources/schema/jboss_web_services_1.3.xsd
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossPortComponentMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java
Log:
[JBWS-2680]:Support configure realm-name in jboss-webservices.xml
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java 2014-10-14
09:52:09 UTC (rev 18983)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/ParserConstants.java 2014-10-14
09:53:24 UTC (rev 18984)
@@ -38,6 +38,8 @@
public static final String J2EE_NS = "http://java.sun.com/xml/ns/j2ee";
public static final String AUTH_METHOD = "auth-method";
+
+ public static final String REALM_NAME = "realm-name";
public static final String CHAIN_PORT_PATTERN = "port-name-pattern";
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java 2014-10-14
09:52:09 UTC (rev 18983)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java 2014-10-14
09:53:24 UTC (rev 18984)
@@ -30,12 +30,19 @@
public class EJBSecurityMetaData
{
private final String authMethod;
+ private final String realmName;
private final String transportGuarantee;
private final boolean secureWSDLAccess;
public EJBSecurityMetaData(String authMethod, String transportGuarantee, boolean
secureWSDLAccess)
{
+ this(authMethod, null, transportGuarantee, secureWSDLAccess);
+ }
+
+ public EJBSecurityMetaData(String authMethod, String realmName, String
transportGuarantee, boolean secureWSDLAccess)
+ {
this.authMethod = authMethod;
+ this.realmName = realmName;
this.transportGuarantee = transportGuarantee;
this.secureWSDLAccess = secureWSDLAccess;
}
@@ -54,4 +61,9 @@
{
return secureWSDLAccess;
}
+
+ public String getRealmName()
+ {
+ return realmName;
+ }
}
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossPortComponentMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossPortComponentMetaData.java 2014-10-14
09:52:09 UTC (rev 18983)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossPortComponentMetaData.java 2014-10-14
09:53:24 UTC (rev 18984)
@@ -34,14 +34,22 @@
private final String authMethod;
private final String transportGuarantee;
private final Boolean secureWSDLAccess;
+ private final String realmName;
public JBossPortComponentMetaData(String ejbName, String portComponentName, String
portComponentURI,
String authMethod, String transportGuarantee, Boolean secureWSDLAccess)
{
+ this(ejbName, portComponentName, portComponentURI, authMethod, null,
transportGuarantee, secureWSDLAccess);
+ }
+
+ public JBossPortComponentMetaData(String ejbName, String portComponentName, String
portComponentURI,
+ String authMethod, String realmName, String transportGuarantee, Boolean
secureWSDLAccess)
+ {
this.ejbName = ejbName;
this.portComponentName = portComponentName;
this.portComponentURI = portComponentURI;
this.authMethod = authMethod;
+ this.realmName = realmName;
this.transportGuarantee = transportGuarantee;
this.secureWSDLAccess = secureWSDLAccess;
}
@@ -69,5 +77,9 @@
public Boolean getSecureWSDLAccess() {
return secureWSDLAccess;
}
+
+ public String getRealmName () {
+ return realmName;
+ }
}
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java 2014-10-14
09:52:09 UTC (rev 18983)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/JBossWebservicesFactory.java 2014-10-14
09:53:24 UTC (rev 18984)
@@ -29,6 +29,7 @@
import static org.jboss.wsf.spi.metadata.ParserConstants.CONFIG_FILE;
import static org.jboss.wsf.spi.metadata.ParserConstants.CONFIG_NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.CONTEXT_ROOT;
+import static org.jboss.wsf.spi.metadata.ParserConstants.REALM_NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.EJB_NAME;
import static org.jboss.wsf.spi.metadata.ParserConstants.JBOSSEE_NS;
import static org.jboss.wsf.spi.metadata.ParserConstants.NAME;
@@ -211,6 +212,7 @@
String portComponentName = null;
String portComponentURI = null;
String authMethod = null;
+ String realmName = null;
String transportGuarantee = null;
Boolean secureWsdlAccess = null;
while (reader.hasNext()) {
@@ -218,7 +220,7 @@
case XMLStreamConstants.END_ELEMENT: {
if (match(reader, nsUri, PORT_COMPONENT)) {
return new JBossPortComponentMetaData(ejbName, portComponentName,
portComponentURI,
- authMethod, transportGuarantee, secureWsdlAccess);
+ authMethod, realmName, transportGuarantee,
secureWsdlAccess);
} else {
throw MESSAGES.unexpectedEndTag(getDescriptorForLogs(),
reader.getLocalName());
}
@@ -232,6 +234,8 @@
portComponentURI = getElementText(reader);
} else if (match(reader, nsUri, AUTH_METHOD)) {
authMethod = getElementText(reader);
+ } else if (match(reader, nsUri, REALM_NAME)) {
+ realmName = getElementText(reader);
} else if (match(reader, nsUri, TRANSPORT_GUARANTEE)) {
transportGuarantee = getElementText(reader);
} else if (match(reader, nsUri, SECURE_WSDL_ACCESS)) {
Added: spi/trunk/src/main/resources/schema/jboss_web_services_1.3.xsd
===================================================================
--- spi/trunk/src/main/resources/schema/jboss_web_services_1.3.xsd
(rev 0)
+++ spi/trunk/src/main/resources/schema/jboss_web_services_1.3.xsd 2014-10-14 09:53:24 UTC
(rev 18984)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema
+
targetNamespace="http://www.jboss.com/xml/ns/javaee"
+
xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.3">
+
+ <xsd:element name="webservices"
type="jboss:webservicesType"/>
+
+ <xsd:complexType name="webservicesType">
+ <xsd:sequence>
+ <xsd:element name="context-root" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="config-name" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="config-file" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="property"
type="jboss:webservicePropertyType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="port-component"
type="jboss:portComponentType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="webservice-description"
type="jboss:webserviceDescriptionType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="portComponentType">
+ <xsd:sequence>
+ <xsd:element name="ejb-name" type="xsd:token"/>
+ <xsd:element name="port-component-name"
type="xsd:token"/>
+ <xsd:element name="port-component-uri" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="auth-method" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="realm-name" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="transport-guarantee" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="secure-wsdl-access" type="xsd:boolean"
minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="webserviceDescriptionType">
+ <xsd:sequence>
+ <xsd:element name="webservice-description-name"
type="xsd:token"/>
+ <xsd:element name="wsdl-publish-location" type="xsd:token"
minOccurs="0"/>
+ <xsd:element name="port-component"
type="jboss:portComponentType" minOccurs="1"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="webservicePropertyType">
+ <xsd:sequence>
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="value" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
Property changes on: spi/trunk/src/main/resources/schema/jboss_web_services_1.3.xsd
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native