Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341560

Summary: Namespace prefix ignored in @XmlListBinding.Mapping and @XmlElementBinding.Mapping
Product: z_Archived Reporter: Konstantin Komissarchik <konstantin>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: ling.hao
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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.