Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » XER: Untagged optional union decoding
XER: Untagged optional union decoding [message #1850273] Wed, 23 February 2022 14:38 Go to next message
Moritz Klass is currently offline Moritz KlassFriend
Messages: 22
Registered: August 2020
Junior Member
Hello,
I got the following situation:
I have an untagged optional union, followed by an untagged union.
Like that:
type record ChargeParameterDiscoveryResType
{
	ResponseCodeType responseCode,
	EVSEProcessingType eVSEProcessing,
	SASchedules_group sASchedules optional,
	EVSEChargeParameter_group eVSEChargeParameter
}
with {
  variant (responseCode) "name as capitalized";
  variant (eVSEProcessing) "name as capitalized";
  variant (sASchedules) "name as capitalized";
  variant (sASchedules) "namespace as 'urn:iso:15118:2:2013:MsgDataTypes' prefix 'v2gci_t'";
  variant (eVSEChargeParameter) "name as capitalized";
  variant (eVSEChargeParameter) "namespace as 'urn:iso:15118:2:2013:MsgDataTypes' prefix 'v2gci_t'";
};


while the elements in question look like this:

type union SASchedules_group
{
	SASchedulesType sASchedules,
	SAScheduleList sAScheduleList
}
with {
  variant "untagged";
  variant (sASchedules) "name as capitalized";
  variant (sASchedules) "form as qualified";
  variant (sASchedules) "abstract";
  variant (sAScheduleList) "name as capitalized";
};

type union EVSEChargeParameter_group
{
	EVSEChargeParameterType eVSEChargeParameter,
	AC_EVSEChargeParameter aC_EVSEChargeParameter,
	DC_EVSEChargeParameter dC_EVSEChargeParameter
}
with {
  variant "untagged";
  variant (eVSEChargeParameter) "name as capitalized";
  variant (eVSEChargeParameter) "form as qualified";
  variant (eVSEChargeParameter) "abstract";
  variant (aC_EVSEChargeParameter) "name as capitalized";
  variant (dC_EVSEChargeParameter) "name as capitalized";
};


The error occurs while XER decoding the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<ns7:V2G_Message xmlns:ns7="urn:iso:15118:2:2013:MsgDef" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://www.w3.org/2001/XMLSchema" xmlns:ns4="http://www.w3.org/2000/09/xmldsig#" xmlns:ns5="urn:iso:15118:2:2013:MsgBody" xmlns:ns6="urn:iso:15118:2:2013:MsgDataTypes" xmlns:ns8="urn:iso:15118:2:2013:MsgHeader">
    <ns7:Header>
        <ns8:SessionID>C9251236900EE3F8
        </ns8:SessionID>
    </ns7:Header>
    <ns7:Body>
        <ns5:ChargeParameterDiscoveryRes>
            <ns5:ResponseCode>FAILED_UnknownSession</ns5:ResponseCode>
            <ns5:EVSEProcessing>Finished</ns5:EVSEProcessing>
            <ns6:AC_EVSEChargeParameter>
                <ns6:AC_EVSEStatus>
                    <ns6:NotificationMaxDelay>0</ns6:NotificationMaxDelay>
                    <ns6:EVSENotification>None</ns6:EVSENotification>
                    <ns6:RCD>false</ns6:RCD>
                </ns6:AC_EVSEStatus>
                <ns6:EVSENominalVoltage>
                    <ns6:Multiplier>0</ns6:Multiplier>
                    <ns6:Unit>V</ns6:Unit>
                    <ns6:Value>230</ns6:Value>
                </ns6:EVSENominalVoltage>
                <ns6:EVSEMaxCurrent>
                    <ns6:Multiplier>0</ns6:Multiplier>
                    <ns6:Unit>A</ns6:Unit>
                    <ns6:Value>32</ns6:Value>
                </ns6:EVSEMaxCurrent>
            </ns6:AC_EVSEChargeParameter>
        </ns5:ChargeParameterDiscoveryRes>
    </ns7:Body>
</ns7:V2G_Message


The error is the following:
 Dynamic test case error: While XER-decoding type '@urn_iso_15118_2_2013_MsgDef.V2G_Message': Component 'body': Component 'bodyElement': Alternative 'chargeParameterDiscoveryRes': Component 'sASchedules':  'AC_EVSEChargeParameter' does not match any alternative 


The decoder seems to look at plcaing the AC_EVSEChargeParameter into the sASchedules component which is wrong since it is not present.

It looks kind of similar like this really old bug:
https://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/212

Please tell me which information you need addionally so that I can provide it.
I am on Titan 7.2.1-final since I can not upgrade due to this behavior:
https://www.eclipse.org/forums/index.php/t/1109877/

But on first glance it does not seem that this is fixed in the newer version.

Thank you, best regards
Moritz
Re: XER: Untagged optional union decoding [message #1850383 is a reply to message #1850273] Mon, 28 February 2022 17:37 Go to previous messageGo to next message
Botond Baranyi is currently offline Botond BaranyiFriend
Messages: 55
Registered: February 2016
Member
Hi,

I've managed to reproduce the issue. We are looking into it.
See: https://gitlab.eclipse.org/eclipse/titan/titan.core/-/issues/585

Best regards,
Botond
Re: XER: Untagged optional union decoding [message #1850477 is a reply to message #1850383] Fri, 04 March 2022 09:58 Go to previous messageGo to next message
Botond Baranyi is currently offline Botond BaranyiFriend
Messages: 55
Registered: February 2016
Member
The issue has been fixed.
Re: XER: Untagged optional union decoding [message #1850955 is a reply to message #1850477] Wed, 23 March 2022 11:03 Go to previous messageGo to next message
Moritz Klass is currently offline Moritz KlassFriend
Messages: 22
Registered: August 2020
Junior Member
Hey Botond,
thank you for fixing that issue so fast!

Could you also give a short update on this issue:
https://www.eclipse.org/forums/index.php/t/1109877/

This prevents me from testing your fix.

Thank you
Re: XER: Untagged optional union decoding [message #1855813 is a reply to message #1850955] Fri, 04 November 2022 09:10 Go to previous message
Moritz Klass is currently offline Moritz KlassFriend
Messages: 22
Registered: August 2020
Junior Member
Hello Botond, I could now verify: The issue is indeed fixed. Thanks
Previous Topic:XML Encoding issue with namespaces
Next Topic:GRE-in-UDP for MCData IP Connectivity
Goto Forum:
  


Current Time: Sat Oct 12 16:09:03 GMT 2024

Powered by FUDForum. Page generated in 0.05546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top