Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341560 - Namespace prefix ignored in @XmlListBinding.Mapping and @XmlElementBinding.Mapping
Summary: Namespace prefix ignored in @XmlListBinding.Mapping and @XmlElementBinding.Ma...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 19:34 EDT by Konstantin Komissarchik CLA
Modified: 2021-11-19 09:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Komissarchik CLA 2011-03-31 19:34:20 EDT
Sapphire XML namespace support somehow missed list and element binding, or at least the mapping specification. You can can reference namespace in the path() attribute, but not in the element() attribute of the mappings.

Sample scenario:

@GenerateImpl
@XmlRootBinding( namespace = "urn:switchyard-config:switchyard:1.0", elementName = "switchyard" )
@XmlNamespace( uri = "http://docs.oasis-open.org/ns/opencsa/sca/200912", prefix = "sca" )

public interface ISwitchyard extends IModelElement 
{
    ModelElementType TYPE = new ModelElementType( ISwitchyard.class );

    // *** Composites ***

    @Type( base = IComposite.class )
    @XmlListBinding( mappings = @XmlListBinding.Mapping( element = "sca:composite", type = IComposite.class ) )
    
    ListProperty PROP_COMPOSITES = new ListProperty( TYPE, "Composites" );
    
    ModelElementList<IComposite> getComposites();
}
Comment 1 Konstantin Komissarchik CLA 2011-03-31 19:42:52 EDT
Fixed. Need to add unit tests.
Comment 2 Konstantin Komissarchik CLA 2011-04-01 16:40:44 EDT
Implemented test case TestXmlBinding0003 to cover variety of ways that namespaces can be utilized in xml binding, including the scenarios described in this bug.

Marking as fixed.
Comment 3 Ling Hao CLA 2011-06-10 17:58:57 EDT
Verified in unit test.