[jboss-jira] [JBoss JIRA] (WFLY-1223) jboss-ejb-iiop_1_0.xsd does not match Java implementation
Stefan Guilhen (Jira)
issues at jboss.org
Fri Nov 30 11:40:00 EST 2018
[ https://issues.jboss.org/browse/WFLY-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Guilhen reassigned WFLY-1223:
------------------------------------
Assignee: (was: Stefan Guilhen)
> jboss-ejb-iiop_1_0.xsd does not match Java implementation
> ---------------------------------------------------------
>
> Key: WFLY-1223
> URL: https://issues.jboss.org/browse/WFLY-1223
> Project: WildFly
> Issue Type: Task
> Components: IIOP
> Reporter: david.boeren
> Priority: Minor
>
> There's a mismatch between the schema file in
> docs/schema/jboss-ejb-iiop_1_0.xsd and the java classes that implement
> the parsing of this schema. As is usual in such cases, it's probably
> the documentation that is wrong.
> In the xsd file the children are described as attributes:
> <xs:complexType name="iorTransportConfigType">
> <xs:annotation>
> <xs:documentation>
> <![CDATA[
> The iorTransportConfigType specifies attributes that can
> be used to configure the transport requirements of
> an IIOP enabled EJB3 bean.
> * integrity: indicates if the server (target) supports
> integrity protected messages. The valid values are
> NONE, SUPPORTED or REQUIRED.
> * confidentiality: indicates if the server (target)
> supports privacy protected messages. The values are
> NONE, SUPPORTED or REQUIRED.
> * detect-misordering: indicates if the server (target)
> supports detection of message sequence errors. The
> values are NONE, SUPPORTED or REQUIRED.
> * detect-replay: indicates if the server (target) supports
> detection of message replay attempts. The values
> are NONE, SUPPORTED or REQUIRED.
> * establish-trust-in-client: indicates if the target is
> capable of authenticating a client. The values are
> NONE, SUPPORTED or REQUIRED.
> * establish-trust-in-target: indicates if the target is
> capable of authenticating to a client. The values
> are NONE or SUPPORTED.
> ]]>
> </xs:documentation>
> </xs:annotation>
> <xs:attribute name="integrity" type="xs:string" use="required"
> default="NONE"/>
> <xs:attribute name="confidentiality" type="xs:string"
> use="required" default="NONE"/>
> <xs:attribute name="detect-misordering" type="xs:string"
> use="optional" default="NONE"/>
> <xs:attribute name="detect-replay" type="xs:string"
> use="optional" default="NONE"/>
> <xs:attribute name="establish-trust-in-client" type="xs:string"
> use="required" default="NONE"/>
> <xs:attribute name="establish-trust-in-target" type="xs:string"
> use="required" default="NONE"/>
> </xs:complexType>
> However, in the class
> (org.jboss.metadata.ejb.parser.jboss.ejb3.IIOPMetaDataParser) it
> requires no attributes and expects to see these same children as elements:
> protected IORTransportConfigMetaData
> processTransportConfig(XMLStreamReader reader, final PropertyReplacer
> propertyReplacer) throws XMLStreamException {
> // the transport-config element doesn't have attributes.
> requireNoAttributes(reader);
> EnumSet<Element> requiredElements = EnumSet.of(Element.INTEGRITY,
> Element.CONFIDENTIALITY,
> Element.ESTABLISH_TRUST_IN_CLIENT, Element.ESTABLISH_TRUST_IN_TARGET);
> IORTransportConfigMetaData transportConfig = new
> IORTransportConfigMetaData();
> // process the transport config elements.
> while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
> Element element = Element.forName(reader.getLocalName());
> // set the element text in the transport config metadata.
> switch (element) {
> case INTEGRITY: {
> requireNoAttributes(reader);
> transportConfig.setIntegrity(getElementText(reader, propertyReplacer));
> break;
> }
> case CONFIDENTIALITY: {
> requireNoAttributes(reader);
> transportConfig.setConfidentiality(getElementText(reader,
> propertyReplacer));
> break;
> }
> case DETECT_MISORDERING: {
> requireNoAttributes(reader);
> transportConfig.setDetectMisordering(getElementText(reader,
> propertyReplacer));
> break;
> }
> case DETECT_REPLAY: {
> requireNoAttributes(reader);
> transportConfig.setDetectReplay(getElementText(reader, propertyReplacer));
> break;
> }
> case ESTABLISH_TRUST_IN_CLIENT: {
> requireNoAttributes(reader);
> transportConfig.setEstablishTrustInClient(getElementText(reader,
> propertyReplacer));
> break;
> }
> case ESTABLISH_TRUST_IN_TARGET: {
> requireNoAttributes(reader);
> transportConfig.setEstablishTrustInTarget(getElementText(reader,
> propertyReplacer));
> break;
> }
> default: {
> throw unexpectedElement(reader);
> }
> }
> requiredElements.remove(element);
> }
> // throw an exception if a required element wasn't found.
> if (!requiredElements.isEmpty()) {
> throw missingRequiredElement(reader, requiredElements);
> }
> return transportConfig;
> }
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list