sca-assembly message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: [NEW ISSUE] Problems with Assembly testcases ASM_8014, ASM_12006
- From: Mike Edwards <mike_edwards@uk.ibm.com>
- To: "OASIS Assembly" <sca-assembly@lists.oasis-open.org>
- Date: Tue, 3 Aug 2010 14:18:44 +0100
1) ASM_8014
a) Incorrect description text in client
runner class
b) no policySet is applied to satisfy
sca:confidentiality
...with the result that the SCA runtime
can validly raise an exception
c) The test relies on sca:confidentiality
on a reference being matched with sca:confidentiality on a service
but in reality it is the policySets
and/or bindings that do this, so the presence or absence of the intent
on the
service is actually moot.
- as a result the current testcase is
not valid and needs adjusting to achieve its goals.
2) ASM_12006
Test_ASM_12006.composite contains a
component TestComponent1 that has a spurious intent attached to its service:
<component
name="TestComponent1">
<implementation.composite
name="test:TestComposite1"/>
<!--
Service is a potential target for the reference of TestClient -->
<service
name="Service1"
requires="test:Fred">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property
name="serviceName">service1</property>
</component>
The intent test:Fred has no purpose
in this testcase and its presence causes a valid SCA runtime to raise an
exception that the intent
is not satisfied, since no policySet
is provided for it. This causes the test to fail when it should not
fail.
Proposal:
1) ASM_8014
Update the client runner text and make
it a negative test, based on mutual exclusion between an intent introspected
from the
interface artifact and an intent present
on the service that uses that interface:
/**
*
Client
for
ASM_8014_TestCase
*
Tests
that
when
an
<interface/>
element
of
a
<service/>
has
one
or
more
intents
attached
to
it,
*
those
intents
apply
to
the
<service/>
*/
public
class
ASM_8014_TestCase extends
BaseJAXWSTestRunner {
protected
TestConfiguration getTestConfiguration() {
TestConfiguration config = new
TestConfiguration();
config.testName
=
this.getClass().getSimpleName().substring(0,
8);
config.input
= "request";
config.output[0]
=
"exception"
;
config.composite
=
"Test_"
+ config.testName
+ ".composite";
config.testServiceName
= "TestClient";
config.contributionNames
= new
String[] { "General",
"General"
+ _Lang
};
config.serviceInterface
= TestInvocation.class;
return
config;
}
} //
end class Test_ASM_8014
Update the Test_ASM_8014.composite to
instead place a mutually exclusive intent on the service of Component2:
<composite
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:sca="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_8014">
<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="TestComponent1/Service1"
/>
<property
name="testName">ASM_8014</property>
</component>
<component
name="TestComponent1">
<implementation.composite
name="test:TestComposite4"/>
<service
name="Service1">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property
name="serviceName">service1</property>
<reference
name="Reference1"
target="TestComponent2/Service1">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</reference>
</component>
<component
name="TestComponent2">
<implementation.composite
name="test:TestComposite66"/>
<!--
Service requires an intent test:Joe that is mutually exclusive with sca:confidentiality
-->
<service
name="Service1"
requires="test:Joe"
policySets="test:PolicySet2">
<!--
Uses modified Service1 interface with Confidentiality intent attached in
interface definition -->
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1_Intent)"/>
</service>
<property
name="serviceName">service2</property>
</component>
</composite>
Associated with this is the creation
of the test:Joe intent, which is made mutually exclusive with the sca:confidentiality
intent plus the creation of an (empty)
policy set which provides BOTH of these
intents:
(definitions.xml for General contribution):
<definitions
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:test="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903">
<!--
A user-defined intent for the purposes of testing the intent resolution
mechanism -->
<intent
name="Fred"
constrains="sca:binding"
intentType="interaction"/>
<!--
A user-defined intent mutually exclusive with the sca:confidentiality intent
-->
<intent
name="Joe"
constrains="sca:binding"
intentType="interaction"
excludes="sca:confidentiality"/>
<!--
A policySet which claims to satisfy the user-defined intent "Fred"
-->
<policySet
name="PolicySet1"
provides="test:Fred"
appliesTo="//service|//reference">
<!--
This policySet intentionally left empty -->
<!--
...it is valid for a policySet to contain no concrete policy statements
-->
</policySet>
<!--
A policySet which claims to satisfy the user-defined intent "Joe"
-->
<policySet
name="PolicySet2"
provides="test:Joe
sca:confidentiality" appliesTo="//service|//reference">
<!--
This policySet intentionally left empty -->
<!--
...it is valid for a policySet to contain no concrete policy statements
-->
</policySet>
<externalAttachment
policySets="test:PolicySet1"
attachTo="//sca:reference[IntentRefs('Fred')]"/>
<externalAttachment
policySets="test:PolicySet1"
attachTo="//sca:service[IntentRefs('Fred')]"/>
<externalAttachment
policySets="test:PolicySet2"
attachTo="//sca:service[IntentRefs('Joe')]"/>
</definitions>
simplify TestComposite66 so that the
interface with the added intent is only used on the composite service,
not on the component:
<composite
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
targetNamespace="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
xmlns:sample="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="TestComposite66">
<service
name="Service1"
promote="TestComposite66TestComponent1/Service1">
<interface.java
interface="org.oasisopen.sca.test.Service1_Intent"/>
</service>
<property
name="serviceName"
type="xsd:string"/>
<component
name="TestComposite66TestComponent1">
<implementation.java
class="org.oasisopen.sca.test.Service1Impl"/>
<service
name="Service1">
<interface.java
interface="org.oasisopen.sca.test.Service1"/>
</service>
<property
name="serviceName"
source="$serviceName"/>
</component>
</composite>
2) ASM_12006
Remove the spurious intent from TestComponent1
<component
name="TestComponent1">
<implementation.composite
name="test:TestComposite1"/>
<!--
Service is a potential target for the reference of TestClient -->
<service
name="Service1">
<interface.wsdl
interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
</service>
<property
name="serviceName">service1</property>
</component>
Yours, Mike.
Strategist - Emerging Technologies, SCA & SDO.
Co Chair OASIS SCA Assembly TC.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014 Mobile: +44-7802-467431
Email: mike_edwards@uk.ibm.com
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]