[
https://issues.apache.org/jira/browse/TUSCANY-3548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12865195#action_12865195
]
Mike Edwards commented on TUSCANY-3548:
---------------------------------------
Here is an example of a composite using Entity references:
<?xml version="1.0" encoding="UTF-8"?>
<!--
*
* Copyright(C) OASIS(R) 2005,2009. All Rights Reserved.
* OASIS trademark, IPR and other policies apply.
*
-->
<!-- Tests that where a <component/> <service/> has no <binding/> subelements
and the corresponding <service/> element of the <componentType/> of the
<component/> <implementation/> has one or more <binding/> subelements,
the <component/> <service/> is made available with all the bindings
declared on the <service/> element of the <componentType/> -->
<!DOCTYPE sca_assembly SYSTEM "sca_variables.dtd">
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
xmlns:test="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="TEST_ASM_5032">
<component name="TestClient">
<implementation.composite name="test:TestClient_0002"/>
<service name="TestInvocation">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(TestInvocation)"/>
<binding.ws/>
</service>
<reference name="reference1" target="TEST_ASM_5032Component1/Service1"
/>
<property name="testName">ASM_5032</property>
</component>
<!-- Implementation with a single reference with multiplicity 1..n which
has multiple concrete bindings applied to it -->
<component name="TEST_ASM_5032Component1">
<implementation.composite name="test:TestComposite6"/>
<service name="Service1">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property name="serviceName">service1</property>
<reference name="Reference1">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
<binding.sca uri="TEST_ASM_5032Component2/Service1"/>
<binding.ws uri="&ws_addr_5032;" name="binding2"/>
</reference>
</component>
<!-- A component with a service that has no bindings but where the service
in the
componentType has multiple bindings explicitly set on it -->
<component name="TEST_ASM_5032Component2">
<implementation.composite name="test:TestComposite15"/>
<service name="Service1">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property name="serviceName">service2</property>
</component>
</composite>
...and the referenced DTD file:
<!--
*
* Copyright(C) OASIS(R) 2005,2010. All Rights Reserved.
* OASIS trademark, IPR and other policies apply.
*
-->
<!--
* This DTD forms part of the SCA Assembly Test Suite.
* It declares a number of XML Entities which are used in Entity References in
some of the
* composites that are artifacts used in the testcases.
*
* The values declared in the Entity References are intended to reflect SCA
runtime specific
* values for certain aspects of the composites at runtime - in particular
addresses of some
* services.
*
* It is permitted - indeed it is expected - that an SCA runtime provider will
MODIFY the values
* declared for the Entity References to match the values which would be
expected when running the
* SCA Assembly test suite against a given SCA runtime. The values held in the
this file are
* examples, derived from running the test suite against the Apache Tuscany SCA
runtime.
-->
<!-- Address of the Web service provided by component "TEST_ASM_5032Component2"
in Test_ASM_5032 composite -->
<!ENTITY ws_addr_5032
"http://localhost:8080/TEST_ASM_5032Component2/Service1/binding2">
<!-- Address of the Web service provided by component "TestComponent2" in
Test_ASM_5034 composite -->
<!ENTITY ws_addr_5034 "http://localhost:8080/TestComponent2/Service1/second">
> Extend handling of Composites to deal with DTDs, Entity Declarations and
> Entity References
> ------------------------------------------------------------------------------------------
>
> Key: TUSCANY-3548
> URL: https://issues.apache.org/jira/browse/TUSCANY-3548
> Project: Tuscany
> Issue Type: New Feature
> Components: Java SCA Core Runtime
> Affects Versions: Java-SCA-2.0-M4
> Reporter: Mike Edwards
> Assignee: Mike Edwards
> Fix For: Java-SCA-Next
>
>
> Currently, processing of SCA composite files ignores any content that appears
> before the <composite> element.
> In particular, this means that any DTD declarations and any Entity
> Declarations within a DTD are simply ignored.
> This prevents the parameterization of composite files using Entity References.
> This Issue calls for the enhancement of the SCA runtime to support DTD
> declarations and Entity Declarations and so support the use of Entity
> References within composite files.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.