[jboss-jira] [JBoss JIRA] (AS7-5936) jboss-ejb-iiop_1_0.xsd does not match Java implementation

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Mon Feb 11 20:44:56 EST 2013


     [ https://issues.jboss.org/browse/AS7-5936?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas updated AS7-5936:
--------------------------------

       Assignee: Stefan Guilhen
    Component/s: IIOP
                     (was: Documentation)

    
> jboss-ejb-iiop_1_0.xsd does not match Java implementation
> ---------------------------------------------------------
>
>                 Key: AS7-5936
>                 URL: https://issues.jboss.org/browse/AS7-5936
>             Project: Application Server 7
>          Issue Type: Task
>          Components: IIOP
>    Affects Versions: 7.1.3.Final (EAP)
>            Reporter: david.boeren
>            Assignee: Stefan Guilhen
>            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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list