TestCases for the SCA POJO Component Implementation Specification Version 1.1

Committee Specification Draft 02 /
Public Review Draft 02

15 August 2011

Specification URIs

This version:

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases-csprd02.pdf (Authoritative)

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases-csprd02.html

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases-csprd02.odt

Previous version:

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases-1.0-csprd01.pdf (Authoritative)

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases-1.0-csprd01.html

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases-1.0-csprd01.odt

Latest version:

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases.pdf (Authoritative)

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases.html

http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases.odt

Technical Committee:

OASIS Service Component Architecture / J (SCA-J) TC

Chairs:

David Booz (booz@us.ibm.com), IBM

Anish Karmarkar (Anish.Karmarkar@oracle.com), Oracle

Editors:

David Booz (booz@us.ibm.com), IBM

Mike Edwards (mike_edwards@uk.ibm.com), IBM

Anish Karmarkar (Anish.Karmarkar@oracle.com), Oracle

Additional artifacts:

This prose specification is one component of a Work Product which also includes:

Related work:

This specification is related to:

Declared XML namespaces:

Abstract:

This document defines the TestCases for the SCA POJO Component Implementation Specification Version 1.1.

The TestCases represent a series of tests that an SCA runtime must pass in order to claim conformance to the requirements of the SCA POJO Component Implementation Specification Version 1.1.

Status:

This document was last revised or approved by the OASIS Service Component Architecture / J (SCA-J) TC on the above date. The level of approval is also listed above. Check the “Latest version” location noted above for possible later revisions of this document.

Technical Committee members should send comments on this Work Product to the Technical Committee’s email list. Others should send comments to the Technical Committee by using the “Send A Comment” button on the Technical Committee’s web page at http://www.oasis-open.org/committees/sca-j/.

For information on whether any patents have been disclosed that may be essential to implementing this Work Product, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the Technical Committee web page (http://www.oasis-open.org/committees/sca-j/ipr.php).

Citation format:

When referencing this Work Product the following citation format should be used:

[SCA-POJO-CI-V1.1-Testcases]

TestCases for the SCA POJO Component Implementation Specification Version 1.1. 15 August 2011. OASIS Committee Specification Draft 02 / Public Review Draft 02. http://docs.oasis-open.org/opencsa/sca-j/sca-j-pojo-ci-1.1-testcases-csprd02.html.


Notices

Copyright © OASIS Open 2011. All Rights Reserved.

All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Committee Specification or OASIS Standard, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification.

OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this specification by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this specification. OASIS may include such claims on its website, but disclaims any obligation to do so.

OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Committee Specification or OASIS Standard, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.

The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see http://www.oasis-open.org/who/trademark.php for above guidance.



Table of Contents

1 Introduction 5

1.1 TestCase Structure 5

1.2 Namespaces and Java Package Names 6

1.3 Terminology 7

1.4 Normative References 7

1.5 Non-normative References 7

2 TestCases 8

2.1 Section 2 8

2.2 Section 5 9

2.3 Section 8 13

2.4 Section 8 14

2.5 Section 9 34

2.6 Section 10 36

3 Catalog of Test Artifacts 42

3.1 Java Interfaces 42

3.2 Java Implementation Classes 42

3.3 WSDL Interface Files 47

4 Conformance 48

Appendix A Test Assertions for the SCA POJO Component Implementation Specification 49

Appendix A.1 Example Test Assertion 49

Appendix A.2 Test Assertions for SCA POJO Component Implementation Specification Section 2 49

Appendix A.3 Test Assertions for SCA POJO Component Implementation Specification Section 4 50

Appendix A.4 Test Assertions for SCA POJO Component Implementation Specification Section 5 51

Appendix A.5 Test Assertions for SCA POJO Component Implementation Specification Section 6 54

Appendix A.6 Test Assertions for SCA POJO Component Implementation Specification Section 8 55

Appendix A.7 Test Assertions for SCA POJO Component Implementation Specification Section 9 68

Appendix A.8 Test Assertions for SCA POJO Component Implementation Specification Section 10 71

Appendix B Cross Mapping of Normative Statements to Test Assertions 75

Appendix C Cross Mapping of Test Assertions to TestCases 77

Appendix D Acknowledgments 80

Appendix E Revision History 81





1Introduction

This document defines the TestCases for the SCA SCA POJO Component Implementation Specification Version 1.1 specification.

The tests described in this document are derived from the normative statements in SCA POJO Component Implementation Specification Version 1.1 via Test Assertions which are described in Appendix A.Test Assertions for the SCA POJO Component Implementation Specification.

1.1TestCase Structure

The SCA J POJO-CI testcases follow a standard structure. They are divided into two main parts:

  1. Test Client, which drives the test and checks that the results are as expected

  2. Test Application, which forms the bulk of the testcase and which consists of Composites, WSDL files, XSDs and code artifacts such as Java classes, organized into a series of SCA contributions

The basic idea is that the Test Application runs on the SCA runtime that is under test, while the Test Client runs as a standalone application, invoking the Test Application through one or more service interfaces.

Test Client

The test client is designed as a standalone application. The version built here is a Java application which uses the JUnit test framework, although in principle, the client could be built using another implementation technology.

The test client is structured to contain configuration information about the testcase, which consists of:

  1. metadata identifying the Test Application in terms of the SCA Contributions that are used and the Composites that must be deployed and run

  2. data indicating which service operation(s) must be invoked with input data and expected output data (including exceptions for expected failure cases)

The Java test client consists of a base runtime class, BaseJAXWSTestCase.java. Each actual testcase is implemented by a small class which extends the base runtime class. The bulk of the code required to run a test is held in the base runtime class. The small testcase class contains the configuration for the specific test, which it provides to the code in the base runtime class through a standard interface.

The Java test client base runtime class is structured so that there is a replaceable class called the RuntimeBridge, which is used to communicate with the SCA runtime under test, for the purposes of deploying and running the test application. Each SCA runtime provider can produce a version of this class. The code within the runtime bridge is likely to be highly proprietary and specific to the SCA runtime for which it is written. Which runtime bridge class is used at runtime is controlled by an environment variable or system variable with the name "OASIS_TESTENV_RUNTIME_BRIDGE_CLASS", which is read by the code in BaseJAXWSTestCase.

The Test Client defaults to using Web services to communicate with the test application. The client is structured to permit Web services to be replaced by some other binding (eg JMS) in the case that the SCA runtime under test not support Web services as a binding technology.

Test Application

Each Test Application consists of one top level SCA Composite file and one or more other SCA Composite files and their associated artifacts (implementations, interface files), plus test client invocation application described above.

A typical test application has a design where the top level composite offers a single service to the client application over a Web services binding. The top level composite contains one component which offers the service that is used by the client application. The top level composite then contains one or more other components which are used by the first component.

The components in the composites are typically implemented by Java POJO classes.

Test Artifacts Organization

Note that the design of these testcases promotes reuse of artifacts between testcases, so that many testcases share components. For example, components implementing simple invokable services are all implemented using a single parameterized implementation artifact.

All the test artifacts are contained in a number of Contributions, which are simply filesystem directories which are all peers in the filesystem hierarchy. The names of the directories are the names of the Contributions and the names are significant. The names of Contributions containing implementation type specific artifacts (such as Java classes) are also specially structured to allow for replacement of one type of implementation artifact with another.

Broadly, Contribution names are as follows:

1.2Namespaces and Java Package Names

The SCA POJO-CI testcase suite makes use of some XML namespaces and Java package names, as follows:

SCA Artifact Namespaces

These apply to artifacts such as Composites

http://docs.oasis-open.org/ns/opencsa/scatests/200903

http://docs.oasis-open.org/ns/opencsa/scatests/2009032

WSDL Namespace

http://test.sca.oasisopen.org/

Java Package name

For Java interface classes and for Java implementation classes

org.oasisopen.sca.test

1.3Terminology

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this specification are to be interpreted as described in IETF RFC 2119 [RFC 2119]

1.4Normative References

[RFC 2119] S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. IETF RFC 2119, March 1997.
http://www.ietf.org/rfc/rfc2119.txt.

[JAVACI] OASIS Committee Specification Draft 04, SCA-J POJO Component Implementation Specification V1.1, August 2011
http://docs.oasis-open.org/opencsa/sca-j/sca-javaci-spec-v1.1-csd04.pdf

[JAX-B] JAXB 2.1 Specification,

http://www.jcp.org/en/jsr/detail?id=222

[TA-GUIDE] OASIS Committee Draft 05, Test Assertions Guidelines Version 1.0, August 2010 http://docs.oasis-open.org/tag/guidelines/v1.0/cd05/testassertionsguidelines-cd-05.pdf

1.5Non-normative References

N/A



2TestCases

2.1Section 2

POJO_2001_TestCase



Testcase ID

POJO_2001_TestCase

Test Assertion

JCI-TA-2001

Description

Tests that a Java POJO implementation can define a service interface using a Java interface

Artifacts

POJO_2001_TestCase.java

Test_POJO_2001.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1Impl.java

Expected output

Positive test:

POJO_2001 request service1 operation1 invoked”


POJO_2002_TestCase



Testcase ID

POJO_2002_TestCase

Test Assertion

JCI-TA-2001

Description

Tests that a Java POJO implementation can define a service interface using a Java class

Artifacts

POJO_2002_TestCase.java

Test_POJO_2002.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

serviceImplClass.java

Expected output

Positive test:

POJO_2002 request service1 operation1 invoked”


POJO_2003_TestCase



Testcase ID

POJO_2003_TestCase

Test Assertion

JCI-TA-2002

Description

Tests that a Java POJO implementation class implements all the operations defined by its service interface

Artifacts

POJO_2003_TestCase.java

Test_POJO_2003.composite

TestInvocation.wsdl

TestClient_0002.composite

MultiOperationService1.java

incompleteOperationsImpl.java

Expected output

Negative test:

"exception"


2.2Section 5

POJO_5001_TestCase


Testcase ID

POJO_5001_TestCase

Test Assertion

JCI-TA-5001

Description

Tests that a Java POJO implementation class has either a public or a protected constructor

Artifacts

POJO_5001_TestCase.java

Test_POJO_5001.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1PrivateConstructorImpl.java

Expected output

Negative test:

exception”



POJO_5002_TestCase


Testcase ID

POJO_5002_TestCase

Test Assertion

JCI-TA-5002

Description

Tests that where a POJO implementation has a constructor annotated with @Constructor, that this constructor is invoked when the implementation class is instantiated

Artifacts

POJO_5002_TestCase.java

Test_POJO_5002.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1AnnotatedConstructorImpl.java

Expected output

Positive test:

POJO_5002 request service1 operation1 invoked @Constructor was invoked”



POJO_5003_TestCase


Testcase ID

POJO_5003_TestCase

Test Assertion

JCI-TA-5003

Description

Tests that where a POJO implementation has no constructor annotated with @Constructor but has a constructor with all its parameters either annotated with @Property or annotated with @Reference, that this constructor is invoked when the implementation class is instantiated

Artifacts

POJO_5003_TestCase.java

Test_POJO_5003.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1AnnotatedParameterConstructorImpl.java

Expected output

Positive test:

POJO_5003 request service1 operation1 invoked fullAnnotated constructor was invoked”



POJO_5004_TestCase


Testcase ID

POJO_5004_TestCase

Test Assertion

JCI-TA-5004

Description

Tests that where a POJO implementation has no constructor annotated with @Constructor and no constructor with all its parameters either annotated with @Property or annotated with @Reference, but it has a no-arg constructor, that the no-arg constructor is invoked when the implementation class is instantiated

Artifacts

POJO_5004_TestCase.java

Test_POJO_5004.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1NoArgConstructorImpl.java

Expected output

Positive test:

POJO_5004 request service1 operation1 invoked no-arg constructor was invoked”



POJO_5005_TestCase


Testcase ID

POJO_5005_TestCase

Test Assertion

JCI-TA-5005

Description

Tests that where a POJO implementation has no constructor annotated with @Constructor and no constructor with all its parameters either annotated with @Property or annotated with @Reference and does not have a no-arg constructor, that no constructor is invoked and an error is thrown by the SCA runtime

Artifacts

POJO_5005_TestCase.java

Test_POJO_5005.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1NoValidConstructorsImpl.java

Expected output

Negative test:

"exception"



POJO_5006_TestCase


Testcase ID

POJO_5006_TestCase

Test Assertion

JCI-TA-5006

Description

Tests that a POJO implementation class has no more than 1 constructor annotated with @Constructor

Artifacts

POJO_5006_TestCase.java

Test_POJO_5006.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1MultipleConstructorAnnotationsImpl.java

Expected output

Negative test:

"exception"



POJO_5007_TestCase


Testcase ID

POJO_5007_TestCase

Test Assertion

JCI-TA-5007

Description

Tests that a POJO implementation class containing no @Constructor annotations has no more than 1 constructor with a non-empty parameter list where all the parameters are annotated with either @Property or with @Reference

Artifacts

POJO_5007_TestCase.java

Test_POJO_5007.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1MultipleAnnotatedConstructorsImpl.java

Expected output

Negative test:

"exception"



2.3Section 8

POJO_6001_TestCase



Testcase ID

POJO_6001_TestCase

Test Assertion

JCA-TA-6001

Description

Tests that a POJO implementation annotated with @Scope("STATELESS") runs with the operational characteristics of a STATELESS scoped implementation.

Artifacts

POJO_6001_TestCase.java

Test_POJO_6001.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl2java

Expected output

Positive test:

"POJO_6001 request service1 operation1 invoked target stateless scope service invoked successfully"





Testcase ID

POJO_6002_TestCase

Test Assertion

Tests that a POJO implementation annotated with @Scope("COMPOSITE") runs with the operational characteristics of a COMPOSITE scoped implementation.

Description

Tests that

Artifacts

POJO_6002_TestCase.java

Test_POJO_6002.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1CoordinatorImpl.java

service1CompositeImpl.java

Expected output

Positive test:

"POJO_6002 request service1 operation1 invoked target composite scope service invoked successfully"



2.4Section 8

POJO_8001_TestCase



Testcase ID

POJO_8001_TestCase

Test Assertion

JCI-TA-8001

Description

Tests that when a POJO implementation class has a @Service annotation with a single interface class in its value attribute and no name attribute, that its componentType has a <service/> subelement with a @name attribute which is the simple name of the Java interface class

Artifacts

POJO_8001_TestCase.java

Test_POJO_8001.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1Superset.java

service1SupersetImpl.java

Expected output

Positive test:

"POJO_8001 request service1 operation1 invoked"



POJO_8002_TestCase



Testcase ID

POJO_8002_TestCase

Test Assertion

JCA-TA-8002

Description

Tests that when a POJO implementation class has a @Service annotation with a single interface class in its value attribute and no name attribute, that its componentType has a <service/> subelement with an <interface.java/> subelement with the @interface attribute set to the fully qualified name of the interface class in the @Service annotation

Artifacts

POJO_8002_TestCase.java

Test_POJO_8002.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1Superset.java (1st copy in org.oasisopen.sca.test package)

Service1Superset.java (2nd copy in default package)

service1SupersetImpl.java

Expected output

Negative test:

"exception"



POJO_8003_TestCase



Testcase ID

POJO_8003_TestCase

Test Assertion

JCI-TA-8003

Description

Tests that an SCA POJO implementation with an @Requires annotation on the class and a @Service annotation, has a <service/> element in its componentType which has a @requires attribute containing the set of intents contained in the @Requires annotation

Artifacts

POJO_8003_TestCase.java

Test_POJO_8003.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

PropagatesTransaction.java

service1WithIntentImpl.java

Expected output

Negative test:

"exception"



POJO_8004_TestCase



Testcase ID

POJO_8004_TestCase

Test Assertion

JCI-TA-8004

Description

Tests that a POJO implementation with no @Service annotation that implements an interface where the interface class is annotated with @Remotable has a componentType with a <service/> subelement with @name set to the simple name of the interface class and with an <interface.java/> subelement that is set to the fully qualified name of the interface class

Artifacts

POJO_8004_TestCase.java

Test_POJO_8004.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1NoServiceAnnotationImpl.java

Expected output

Positive test:

"POJO_8004 request service1 operation1 invoked"



POJO_8005_TestCase



Testcase ID

POJO_8005_TestCase

Test Assertion

JCI-TA-8005

Description

Tests that where a POJO implementation class has no @Service annotations and does not implement an interface class which is annotated with @Remotable, that the componentType of the implementation has a single <service/> element with @name set to the simple name of the implementation class and an <interface.java/> sublement with @interface set to the fully qualified name of the implementation class

Artifacts

POJO_8005_TestCase.java

Test_POJO_8005.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

plainClassImpl.java

Expected output

Positive test:

"POJO_8005 request service1 operation1 invoked"



POJO_8006_TestCase



Testcase ID

POJO_8006_TestCase

Test Assertion

JCI-TA-8006

Description

Tests that where a POJO implementation class has a @Reference annotation with the @name parameter, that the componentType of the implementation has a <reference/> element with its @name attribute set to the value of the @name parameter of the @Reference annotation

Artifacts

POJO_8006_TestCase.java

Test_POJO_8006.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

service1RefWithNameImpl.java

Expected output

Positive test:

"POJO_8006 request service1 operation1 invoked service2 operation1 invoked"



POJO_8007_TestCase



Testcase ID

POJO_8007_TestCase

Test Assertion

JCI-TA-8008

Description

Tests that where a POJO implementation has a @Reference annotation with @required=false and the annotation annotates a field with an interface type, that the componentType of the implementation has a <reference/> element with @multiplicity set to "0..1"

Artifacts

POJO_8007_TestCase.java

Test_POJO_8007.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl6.java

Expected output

Positive test:

"POJO_8007 request service1 operation1 invoked reference is null"



POJO_8008_TestCase



Testcase ID

POJO_8008_TestCase

Test Assertion

JCI-TA-8009

Description

Tests that where a POJO implementation has a @Reference annotation which annotates a field which also has a @Requires annotation that the componentType of the implementation as a <reference/> element with a @requires attribute set to the value of the @Requires annotation

Artifacts

POJO_8008_TestCase.java

Test_POJO_8008.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

service1WithRefIntentImpl.java

Expected output

Negative test:

"exception"



POJO_8009_TestCase



Testcase ID

POJO_8009_TestCase

Test Assertion

JCI-TA-8010

Description

Tests that a POJO implementation with a @Property annotation which annotates a setter method and the setter method parameter has a type which is not an array or a collection type has a componentType <property/> element with @name set to the JavaBeans property name derived from the name of the setter method and has @type set to the JAXB mapping of the parameter of the setter method

Artifacts

POJO_8009_TestCase.java

Test_POJO_8009.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1PropertySetterImpl.java

Expected output

Positive test:

"POJO_8009 request service1 operation1 invoked 2002.09.13 09:00:00"



POJO_8010_TestCase



Testcase ID

POJO_8010_TestCase

Test Assertion

JCI-TA-8011

Description

Tests that a POJO implementation with no @Reference annotations and also with no @Property annotations and which has a public setter method which is not part of a service interface and which has a parameter typed by an interface which is annotated with @Remotable has a componentType with a <reference/> element with @name set to the Javabeans property name derived from the setter method name and @multiplicity of 1..1 and with an <interface.java/> subelement which references the fully qualified name of the interface class

Artifacts

POJO_8010_TestCase.java

Test_POJO_8010.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

service1UnannotatedRefSetterImpl.java

Expected output

Positive test:

"POJO_8010 request service1 operation1 invoked service2 operation1 invoked"

POJO_8011_TestCase



Testcase ID

POJO_8011_TestCase

Test Assertion

JCI-TA-8012

Description

Tests that a POJO implementation with no @Reference annotations and also with no @Property annotations and which has a public setter method which is not part of a service interface and which has a parameter which is not typed by an interface annotated with @Remotable or an array or a parameterized java.util.Collection has a componentType with a <property/> element with @name set to the Javabeans property name derived from the setter method name and @type set to the JAXB mapping of the type of the setter method and with @many set to "false"

Artifacts

POJO_8011_TestCase.java

Test_POJO_8011.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1UnannotatedPropertySetterImpl.java

Expected output

Positive test:

"POJO_8011 request service1 operation1 invoked"



POJO_8012_TestCase



Testcase ID

POJO_8012_TestCase

Test Assertion

JCI-TA-8013

Description

Tests that a POJO implementation with a @Requires attribute on the class that the componentType has an <implementation.java/> subelement with a @requires attribute with the same value as the @Requires attribute

Artifacts

POJO_8012_TestCase.java

Test_POJO_8012.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1WithIntentImpl.java

Expected output

Negative test:

"exception"





POJO_8013_TestCase



Testcase ID

POJO_8013_TestCase

Test Assertion

JCI-TA-8014

Description

Tests that a POJO implementation class with 2 setter methods annotated with @Property have unique JavaBeans property names for the methods

Artifacts

POJO_8013_TestCase.java

Test_POJO_8013.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1DupPropertySettersImpl.java

Expected output

Negative test:

"exception"



POJO_8014_TestCase



Testcase ID

POJO_8014_TestCase

Test Assertion

JCI-TA-8015

Description

Tests that a POJO implementation class with 2 setter methods annotated with @Reference have unique JavaBeans property names for the methods

Artifacts

POJO_8014_TestCase.java

Test_POJO_8014.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1DupReferenceSettersImpl.java

Expected output

Negative test:

"exception"



POJO_8015_TestCase



Testcase ID

POJO_8015_TestCase

Test Assertion

JCI-TA-8007

Description

Tests that where a POJO implementation has a @Reference annotation with @required=true and the annotation annotates a field which is an array type, that the componentType of the implementation has a <reference/> element with @multiplicity set to "1..n"

Artifacts

POJO_8015_TestCase.java

Test_POJO_8015.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1Impl.java

Service1Impl3.java

Expected output

Positive test:

"POJO_8015 request service1 operation1 invoked service2 operation1 invokedservice3 operation1 invoked"



POJO_8016_TestCase



Testcase ID

POJO_8016_TestCase

Test Assertion

JCI-TA-8016

Description

Tests that a POJO implementation class with @Service annotation and @Remotable annotation, where the @Service annotation references an interface which does not contain an @Remotable annotation has a componentType with a <service/> element with <interface.java/> set with @interface set to the fully qualified name of the interface class in the value attribute of the @Service annotation and the @remotable attribute set to "true"

Artifacts

POJO_8016_TestCase.java

Test_POJO_8016.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1NoRemotable.java

Service1NoRemotableImpl.java

Expected output

Positive test:

"POJO_8016 request service1 operation1 invoked"



POJO_8017_TestCase



Testcase ID

POJO_8017_TestCase

Test Assertion

JCI-TA-8017

Description

Tests that a POJO implementation class with @Reference annotation on a setter method where the interface type of the method has no @Remotable annotation but the setter method has a @Remotable annotation, the implementation has a componentType with a <reference/> element with <interface.java/> set with @interface set to the fully qualified name of the interface class which types the parameter of the setter method and the @remotable attribute set to "true"

Artifacts

POJO_8017_TestCase.java

Test_POJO_8017.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1NoRemotable.java

Service1NoRemotableRefImpl.java

Expected output

Positive test:

"POJO_8017 request service1 operation1 invoked service2 operation1 invoked"



POJO_8018_TestCase



Testcase ID

POJO_8018_TestCase

Test Assertion

JCI-TA-8018

Description

Tests that an implementation class with a setter method that takes an interface type parameter and is annotated with @Reference has a componentType with a <reference/> element with an <interface.java/> subelement with @interface set to the fully qualified name of the interface type

Artifacts

POJO_8018_TestCase.java

Test_POJO_8018.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1ReferenceSetterImpl.java

Expected output

Positive test:

"POJO_8018 request service1 operation1 invoked service2 operation1 invoked"



POJO_8019_TestCase



Testcase ID

POJO_8019_TestCase

Test Assertion

JCI-TA-8019

Description

Tests that an implementation class with a constructor parameter which has an interface type and is annotated with @Reference has a componentType with a <reference/> element with an <interface.java/> subelement with @interface set to the fully qualified name of the interface type

Artifacts

POJO_8019_TestCase.java

Test_POJO_8019.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1ReferenceConstructorImpl.java

Expected output

Positive test:

"POJO_8019 request service1 operation1 invoked service2 operation1 invoked"



POJO_8020_TestCase



Testcase ID

POJO_8020_TestCase

Test Assertion

JCI-TA-8020

Description

Tests that an implementation class with a @Service annotation and a @PolicySets annotation with a policySet declared has a componentType with a <service/> element with the @policySets attribute containing the policySet from the @PolicySets annotation

Artifacts

POJO_8020_TestCase.java

Test_POJO_8020.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1ServicePolicySetsImpl.java

test:PolicySet3 in definitions.xml of contribution

Expected output

Positive test:

"POJO_8020 request service1 operation1 invoked"



POJO_8021_TestCase



Testcase ID

POJO_8021_TestCase

Test Assertion

JCI-TA-8021

Description

Tests that an implementation class with a @Reference annotation and a @PolicySets annotation with a policySet declared has a componentType with a <reference/> element with the @policySets attribute containing the policySet from the @PolicySets annotation

Artifacts

POJO_8021_TestCase.java

Test_POJO_8021.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1ReferencePolicySetsImpl.java

Expected output

Positive test:

"POJO_8021 request service1 operation1 invoked service2 operation1 invoked"



POJO_8022_TestCase



Testcase ID

POJO_8022_TestCase

Test Assertion

JCI-TA-8022

Description

Tests that an implementation class with zero @Service, @Reference, @Property annotations and a @PolicySets annotation on the class with one policy set declared, has a componentType with a <service/> element with a @policySets attribute present containing the policy set declared in the @PolicySets annotation

Artifacts

POJO_8022_TestCase.java

Test_POJO_8022.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1UnannotatedWithPolicySetsImpl.java

Expected output

Positive test:

"POJO_8022 request service1 operation1 invoked service2 operation1 invoked"



POJO_8023_TestCase



Testcase ID

POJO_8023_TestCase

Test Assertion

JCI-TA-8023

Description

Tests that an implementation class with zero @Service, @Reference, @Property annotations and a @PolicySets annotation on a public field, typed by an interface annotated with @Remotable, with one policy set declared, has a componentType with a <reference/> element with a @policySets attribute present containing the policy set declared in the @PolicySets annotation

Artifacts

POJO_8023_TestCase.java

Test_POJO_8023.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1UnannotatedWithRefPolicySetsImpl.java

Expected output

Positive test:

"POJO_8023 request service1 operation1 invoked service2 operation1 invoked"



POJO_8024_TestCase



Testcase ID

POJO_8024_TestCase

Test Assertion

JCI-TA-8024

Description

Tests that an implementation class has a @PolicySets annotation on the class with one policy set declared, has a componentType with a <implementation.java/> element with a @policySets attribute present containing the policy set declared in the @PolicySets annotation

Artifacts

POJO_8024_TestCase.java

Test_POJO_8024.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1ReferencePolicySetsImpl.java

Expected output

Positive test:

"POJO_8024 request service1 operation1 invoked service2 operation1 invoked"



POJO_8025_TestCase



Testcase ID

POJO_8025_TestCase

Test Assertion

JCI-TA-8025

Description

Tests that an implementation class with zero @Service, @Reference, @Property annotations, which has a public setter method, not part of a service interface, with a parameter type which is an array of interface classes annotated with @Remotable has a componentType with a <reference/> element with @name set to the JavaBeans property name from the setter method name, @multiplicity set to 1..n and an <interface.java/> subelement which references the fully qualified name of the interface class

Artifacts

POJO_8025_TestCase.java

Test_POJO_8025.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1ReferencePolicySetsImpl.java

Expected output

Positive test:

"POJO_8025 request service1 operation1 invoked service2 operation1 invoked"



POJO_8026_TestCase



Testcase ID

POJO_8026_TestCase

Test Assertion

JCI-TA-8026

Description

Tests that an implementation class with zero @Service, @Reference, @Property annotations, which has a public setter method, not part of a service interface, with a parameter type which is a java.util.Collection parameterized by an interface class annotated with @Remotable has a componentType with a <reference/> element with @name set to the JavaBeans property name from the setter method name, @multiplicity set to 1..n and an <interface.java/> subelement which references the fully qualified name of the interface class

Artifacts

POJO_8026_TestCase.java

Test_POJO_8026.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1ReferencePolicySetsImpl.java

Expected output

Positive test:

"POJO_8026 request service1 operation1 invoked service2 operation1 invoked"



POJO_8027_TestCase



Testcase ID

POJO_8027_TestCase

Test Assertion

JCI-TA-8027

Description

Tests that an implementation class with zero @Service, @Reference, @Property annotations, which has a public setter method, not part of a service interface, with a parameter type which is a java.util.Collection not parameterized by an interface class annotated with @Remotable has a componentType with a <property/> element with @name set to the JavaBeans property name from the setter method name, @type set to the JAXB mapping of the type of the setter parameter and @many set to "true"

Artifacts

POJO_8027_TestCase.java

Test_POJO_8027.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Service1UnannotatedManyPropertySetterImpl.java

Expected output

Positive test:

"POJO_8027 request service1 operation1 invoked 2002.09.13 09:00:00 2010.10.28 23:05:13";



POJO_8028_TestCase



Testcase ID

POJO_8028_TestCase

Test Assertion

JCI-TA-8028

Description

Tests that an implementation class with a javax.jws.WebService annotation and no @Service annotation has a component type with a <service/> element with @name set to the name property on the @WebService annotation and an <interface.java/> subelement with the @interface attribute set to the fully qualified name of the implementation class

Artifacts

POJO_8028_TestCase.java

Test_POJO_8028.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebServiceImpl.java

Expected output

Positive test:

"POJO_8028 request service1 operation1 invoked";



POJO_8029_TestCase



Testcase ID

POJO_8029_TestCase

Test Assertion

JCI-TA-8029

Description

Tests that an implementation class with a javax.jws.WebService annotation and no @Service annotation, where the @EndpointInterface annotation property is set to the name of a Java interface class, has a component type with a <service/> element with @name set to the name property on the @WebService annotation and an <interface.java/> subelement with the @interface attribute set to the value of the EndpointInterface property

Artifacts

POJO_8029_TestCase.java

Test_POJO_8029.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebServiceEPImpl.java

Expected output

Positive test:

"POJO_8029 request service1 operation1 invoked";



POJO_8030_TestCase



Testcase ID

POJO_8030_TestCase

Test Assertion

JCI-TA-8030

Description

Tests that an implementation class with a javax.jws.WebService annotation and no @Service annotation, where the @WsdlLocation annotation property is set to a WSDL document, has a component type with a <service/> element with @name set to the name property on the @WebService annotation and an <interface.wsdl/> subelement with the @interface attribute set to the portType referenced by the value of the WsdlLocation property

Artifacts

POJO_8030_TestCase.java

Test_POJO_8030.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebServiceWSDLImpl.java

Expected output

Negative test:

"exception"



POJO_8031_TestCase



Testcase ID

POJO_8031_TestCase

Test Assertion

JCI-TA-8031

Description

Tests that an implementation class with a service method with javax.jws.WebParam annotation on a parameter with the @header property set to "true", has a component type with a <service/> element with @requires attribute containing the "sca:SOAP" intent

Artifacts

POJO_8031_TestCase.java

Test_POJO_8031.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebParamImpl.java

Expected output

Negative test:

"exception"



POJO_8032_TestCase



Testcase ID

POJO_8032_TestCase

Test Assertion

JCI-TA-8032

Description

Tests that an implementation class with a service method with javax.jws.WebResult annotation on a parameter with the @header property set to "true", has a component type with a <service/> element with @requires attribute containing the "sca:SOAP" intent

Artifacts

POJO_8032_TestCase.java

Test_POJO_8032.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebResultImpl.java

Expected output

Negative test:

"exception"



POJO_8033_TestCase



Testcase ID

POJO_8033_TestCase

Test Assertion

JCI-TA-8033

Description

Tests that an implementation class annotated with a javax.jws.soap.SOAPBinding annotation has a component type with a <service/> element with @requires attribute containing the "sca:SOAP" intent

Artifacts

POJO_8033_TestCase.java

Test_POJO_8033.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSSOAPBindingImpl.java

Expected output

Negative test:

"exception"



POJO_8034_TestCase



Testcase ID

POJO_8034_TestCase

Test Assertion

JCI-TA-8034

Description

Tests that an implementation class with a javax.xml.ws.WebServiceProvider annotation, has a component type with a <service/> element with an <interface.java/> subelement set to the fully qualified name of the interface class

Artifacts

POJO_8034_TestCase.java

Test_POJO_8034.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebServiceProviderImpl.java

Expected output

Positive test:

"POJO_8034 request service1 operation1 invoked";



POJO_8035_TestCase



Testcase ID

POJO_8035_TestCase

Test Assertion

JCI-TA-8035

Description

Tests that an implementation class with a javax.xml.ws.WebServiceProvider annotation which has a wsdlLocation property set, pointing to a WSDL document, has a component type with a <service/> element with an <interface.wsdl/> subelement set to the portType referenced by the value of the wsdlLocation property

Artifacts

POJO_8035_TestCase.java

Test_POJO_8035.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebServiceProviderImpl.java

Expected output

Negative test:

"exception"



POJO_8036_TestCase



Testcase ID

POJO_8036_TestCase

Test Assertion

JCI-TA-8036

Description

Tests that an implementation class annotated with any JAX-WS annotation has a component type with a <service/> element with a <binding.ws/> subelement with the @wsdlElement attribute set to point to a WSDL document that uses the SOAP/HTTP binding

Artifacts

POJO_8036_TestCase.java

Test_POJO_8036.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSWebServiceImpl.java

Expected output

Positive test:

"POJO_8036 request service1 operation1 invoked";



POJO_8037_TestCase



Testcase ID

POJO_8037_TestCase

Test Assertion

JCI-TA-8037

Description

Tests that an implementation class annotated with a javax.xml.ws.BindingType annotation, where the value of the @BindingType annotation is http://www.w3.org/2003/05/soap/bindings/HTTP/, has a component type with a <binding.ws/> element with an @requires attribute which contains the intent "SOAP.v1_2"

Artifacts

POJO_8037_TestCase.java

Test_POJO_8037.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1JWSBindingTypeImpl.java

Expected output

Negative test:

"exception"




2.5Section 9

POJO_9001_TestCase



Testcase ID

POJO_9001_TestCase

Test Assertion

JCI-TA-9001

Description

Tests that if an SCA <component/> element has an <implementation.java/> subelement, that the <implementation.java/> element conforms to the sca-implementation-java.xsd schema

Artifacts

POJO_9001_TestCase.java

Test_POJO_9001.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1Impl.java

Expected output

Negative test:

"exception"



POJO_9002_TestCase



Testcase ID

POJO_9002_TestCase

Test Assertion

JCI-TA-9002

Description

Tests that where a <component/> has an <implementation.java/> subelement with a @class attribute that has the fully qualified name of a Java class that is contained in the same contribution as the composite file containing the <component/>, that the Java class is found and instantiated

Artifacts

POJO_9002_TestCase.java

Test_POJO_9002.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

x.service1Impl.java

Expected output

Positive test:

"POJO_9002 request service1 operation1 invoked"



POJO_9003_TestCase



Testcase ID

POJO_9003_TestCase

Test Assertion

JCI-TA-9003

Description

Tests that if an <implementation.java/> element has a @class attribute which references a Java POJO implementation class and that class is imported by the contribution containing the composite from a second contribution, the version of the class from the second contribution is loaded and used even where a version of the same class is available in the contribution containing the composite

Artifacts

POJO_9003_TestCase.java

Test_POJO_9003.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

x.service1.java (2 copies #1 = contribution POJO_General; #2 = contribution POJO_9003)

Expected output

Positive test:

"POJO_9003 request service1 operation1"



POJO_9004_TestCase



Testcase ID

POJO_9004_TestCase

Test Assertion

JCI-TA-9004

Description

Tests that for an <implementation.java/> element in a composite file that specifies the name of a Java POJO class in its @class attribute, where a Java class of that fully qualified name exists a) in the same contribution (A) as the composite file b) in two other contributions in the Domain (B & C), both of which export the namespace of the Java class and where contribution A imports the namespace with <import.java/> specifying @location referencing only one of the Contributions (C) that the Java class is loaded from Contribution C.

Artifacts

POJO_9004_TestCase.java

Test_POJO_9004.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1ContributionImpl.java

contribution POJO_9004

contribution ContributionB

contribution ContributionC

Expected output

Positive test:

"POJO_9004 request service1 operation1 invoked contributionC"




2.6Section 10

POJO_10001_TestCase



Testcase ID

POJO_10001_TestCase

Test Assertion

JCI-TA-10001

Description

Tests that where an sca-contribution.xml file contains multiple <import.java/> elements, that the value of the @package attribute of each element is unique across all the <import.java/> elements

Artifacts

POJO_10001_TestCase.java

Test_POJO_10001.composite

TestInvocation.wsdl

TestClient_0002.composite

TestComposite1.composite

Service1.java

service1Impl.java

Expected output

Negative test:

"exception"



POJO_10002_TestCase



Testcase ID

POJO_10002_TestCase

Test Assertion

JCI-TA-10002

Description

Tests that where a contribution contains an SCA component that references classes from a Java package not contained in the contribution, and where the sca-contribution.xml contains an <import.java/> for that Java package, and there is a second contribution in the Domain that contains the classes of the package and which exports the package, that the SCA component can be instantiated and that it uses the Java classes from the second contribution.

Artifacts

POJO_10002_TestCase.java

Test_POJO_10002.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1Impl.java

Expected output

Positive test:

"POJO_10002 request service1 operation1 invoked"

POJO_10003_TestCase



Testcase ID

POJO_10003_TestCase

Test Assertion

JCI-TA-10003

Description

Tests that where a contribution A contains a component with an implementation from a Java package not found in contribution A and where the sca-contribution.xml has an <import.java/> for that package with a @location attribute pointing at a contribution B and contribution B both contains classes for that Java package and also exports that package, that the classes from contribution B satisfy the import from contribution A and that the component is instantiated.

Artifacts

POJO_10003_TestCase.java

Test_POJO_10003.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1ContributionImpl.java

<POJO_ContributionB>

Expected output

Positive test:

"POJO_10003 request service1 operation1 invoked ContributionB"



POJO_10004_TestCase



Testcase ID

POJO_10004_TestCase

Test Assertion

JCI-TA-10004

Description

Tests that where a contribution A has references to Java artifacts from 2 different Java packages X and Y and where both of these packages are imported, and where package X is exported by a contribution B with a uses statement specifying a specific version of package Y, that import of Y in contribution A must import the same version of Y as specified in the uses attribute in contribution B.

Artifacts

POJO_10004_TestCase.java

Test_POJO_10004.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1ContributionImpl.java

<POJO_ContributionC>

<POJO_ContributionD>

Expected output

Negative test:

"exception"



POJO_10005_TestCase



Testcase ID

POJO_10005_TestCase

Test Assertion

JCI-TA-10005

Description

Tests that where a contribution has an sca-contribution.xml file with multiple <export.java/> elements, that the @package attribute value of each element is unique

Artifacts

POJO_10005_TestCase.java

Test_POJO_10005.composite

TestInvocation.wsdl

TestClient_0002.composite

TestComposite1.composite

Service1.java

service1Impl.java

Expected output

Negative test:

"exception"



POJO_10006_TestCase



Testcase ID

POJO_10006_TestCase

Test Assertion

JCI-TA-10006

Description

Tests that where a contribution has an sca-contribution.xml file with an <export.java/> element which references a given Java package, that the files of that package are contained within the contribution

Artifacts

POJO_10006_TestCase.java

Test_POJO_10006.composite

TestInvocation.wsdl

TestClient_0002.composite

TestComposite1.composite

Service1.java

service1Impl.java

Expected output

Negative test:

"exception"



POJO_10007_TestCase



Testcase ID

POJO_10007_TestCase

Test Assertion

JCI-TA-10007

Description

Tests that all Java classes loaded from a Contribution are loaded by a class loader that is unique to the contribution

Artifacts

POJO_10007_TestCase.java

Test_POJO_10007.composite

TestInvocation.wsdl

TestClient_0002.composite

TestComposite1.composite

Service1.java

x.service1ComplexClient.java

x.serviceComplex1Impl.java

y.ServiceComplex1.java

z.ComplexClass.java

<POJO_10007 contribution>

<POJO_ContributionE contribution>

<POJO_ContributionF contribution>

Expected output

Positive test:

"POJO_10007 request service1 operation1 invoked service2 operation1 invoked Service interface classloader same as Impl class classloader ComplexClass classloader different from Impl class classloader"



POJO_10008_TestCase



Testcase ID

POJO_10008_TestCase

Test Assertion

JCI-TA-10008

Description

Tests that where a contribution A uses one or more Java classes that are imported from a contribution B, that contribution B's classloader is used to load the classes imported into contribution A

Artifacts

POJO_10008_TestCase.java

Test_POJO_10008.composite

TestComposite1.composite (contribution POJO_ContributionE)

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1ComplexClient.java (contribution POJO_10008)

x.serviceComplex1Impl.java

y.ServiceComplex1.java

z.ComplexClass.java

<POJO_10008 contribution>

<POJO_ContributionE contribution>

Expected output

Positive test:

"POJO_10008 request service1 operation1 invoked classloaders set correctly"



POJO_10009_TestCase



Testcase ID

POJO_10009_TestCase

Test Assertion

JCI-TA-10009

Description

Tests that the thread context classloader of the thread used to invoke an operation of a Java POJO component implementation is the class loader of the contribution that contains the POJO implementation class.

Artifacts

POJO_10009_TestCase.java

Test_POJO_10009.composite

TestInvocation.wsdl

TestClient_0002.composite

TestComposite1.composite

Service1.wsdl

Expected output

Positive test:

"POJO_10009 request service1 operation1 invoked thread context classloader is correct"



3Catalog of Test Artifacts



3.1Java Interfaces



Name

Description

MultipleService.java

Service interface for checking multiple service invocations of a stateless Java implementation

Service1.java

Service1 interface

Service1NoRemotable.java

Service1 interface without a @Remotable annotation

Service1Superset.java

Interface with 2 operations

- each with String as input and String response

ServiceComplex1.java

Interface with 2 operations

- 1 with Java class as input and String response

- 1 with void input and String response

3.2Java Implementation Classes



Name

Description

All classes in the org.oasisopen.sca.test package unless noted

 

incompleteOperationsImpl.java

<POJO_2003>

1 service with Service1Superset. interface

- operation2 is not implemented

multipleServiceClientImpl.java

1 service with Service1 interface

1 reference with ParallelService interface

multipleServiceImpl.java

1 service with MultipleService interface

plainClassImpl.java

1 service with interface defined by the class itself

service1AnnotatedConstructorImpl.java

1 service with Service1 interface

one constructor annotated with @Constructor

service1AnnotatedParameterConstructorImpl.java

1 service with Service1 interface

one constructor annotated with @Constructor and all parameters annotated with either @Property or @Reference

service1ClassLoaderCheckImpl.java

1 service with Service1 interface

Performs a check on the ThreadContextClassLoader used to invoke a service operation

service1ComplexClientImpl.java

<POJO_10008>

1 service with Service1 interface

1 reference with ServiceComplex1 interface

x.service1ComplexClientImpl.java

<POJO_ContributionE>

1 service with Service1 interface

1 reference with ServiceComplex1 interface

x.serviceComplex1Impl

<POJO_ContributionE>

1 service with ServiceComplex1 interface

- operation1 checks the classloaders of the class, the interface class and the complex Java class

- operation2 returns the hashCode of the classloader of the class

service1CompositeImpl.java

1 service with Service1 interface

The implementation is COMPOSITE scope

- it holds state information from one invocation of Service1.operation1 to the next invocation

- the input String from one invocation is returned in the result of the next invocation

x.service1ContributionImpl.java

<POJO_ContributionD>

1 service with Service1 interface

- operation1 responds with a string ending in the contribution name

service1ContributionImpl.java

<POJO_ContributionC>

1 service with Service1 interface

- operation1 responds with a string ending in the contribution name

service1ContributionImpl.java

<POJO_ContributionB>

1 service with Service1 interface

- operation1 responds with a string ending in the contribution name

service1ContributionImpl.java

<POJO_9004>

1 service with Service1 interface

- operation1 responds with a string ending in the name = "ContributionA"

service1CoordinatorImpl.java

1 service with Service1 interface

1 reference (1..n) with Service1 interface

all configured wires get called when service1 operation1 is invoked

This implementation acts as a coordinator between each of the invocations

- it sends different data as input to each reference invocation

- it records all the output data from all the invocations

x.service1Impl.java

<POJO_9003>

<POJO_General>

1 service with Service1 interface

service1Impl.java

1 service with Service1 interface

service1Impl3.java

1 service with Service1 interface

1 reference (1..n) with Service1 interface

all configured wires get called when service1 operation1 is invoked

service1Imp6l.java

1 service with Service1 interface

1 reference (0..1) with Service1 interface

configured wire gets called when service1 operation1 is invoked, if present

otherwise, this implementation reports its absence

service1DupPropertySettersImpl.java

<POJO_8013>

1 service with Service1 interface

has a 2 setter methods annotated with @Property and the Javabeans names of these two methods is the same

service1DupReferenceSettersImpl.java

<POJO_8014>

1 service with Service1 interface

has a 2 setter methods annotated with @Reference and the Javabeans names of these two methods is the same

Service1JWSSOAPBindingImpl.java

1 service with Service1 interface

class is annotated with @SOAPBinding

Service1JWSWebParamImpl.java

1 service with Service1 interface

method is annotated with @WebParam

Service1JWSWebResultImpl.java

1 service with Service1 interface

class is annotated with @WebResult

Service1JWSWebServiceEPImpl.java

1 service with Service1 interface

class is annotated with @WebService with the EndpointInterface attrribute set

Service1JWSWebServiceImpl.java

1 service with Service1 interface

class is annotated with @WebService

Service1JWSWebServiceProviderImpl.java

1 service with Service1 interface

class is annotated with @WebServiceProvider

Service1JWSWebServiceProviderWSDLImpl.java

1 service with Service1 interface

class is annotated with @WebServiceProvider with the wsdlLocation attrribute set

Service1JWSWebServiceWSDLImpl.java

1 service with Service1 interface

class is annotated with @WebService with the wsdlLocation attrribute set

Service1MultipleAnnotatedConstructors.java

<POJO_5007>

1 service with Service1 interface

multiple constructors annotated with @Constructor and all parameters annotated with either @Property or @Reference

service1MultipleConstructorAnnotations.java

<POJO_5006>

1 service with Service1 interface

multiple constructors annotated with @Constructor

service1NoArgConstructorImpl.java

1 service with Service1 interface

has a no argument constructor

Service1NoRemotableImpl.java

1 service with Service1 interface

class is annotated with @Remotable

Service1NoRemotableRefImpl.java

1 service with Service1 interface

1 reference with Service1NoRemotable interface

reference setter is annotated with @Remotable

service1NoServiceAnnotationImpl.java

1 service with Service1 interface

no @Service annotation implements a @Remotable interface

service1NoValidConstructor.java

<POJO_5005>

1 service with Service1 interface

only constructor is not invokable by SCA

service1PrivateConstructor.java

<POJO_5001>

1 service with Service1 interface

only constructor is private

service1PropertySetterImpl.java

1 service with Service1 interface

setter is annotated with @Property

Service1ReferenceConstructorImpl.java

1 service with Service1 interface

1 reference with Service1 interface

constructor parameter annotated with @Reference

Service1ReferencePolicySetsImpl.java

1 service with Service1 interface

1 reference with Service1 interface

reference is annotated with @PolicySets

Service1ReferenceSetterImpl.java

1 service with Service1 interface

1 reference with Service1 interface

reference is set by a setter method

Service1RefWithNameImpl..java

1 service with Service1 interface

1 reference with Service1 interface

@Reference has name value

Service1ServicePolicySetsImpl.java

1 service with Service1 interface

class is annotated with @PolicySets

service1SupersetImpl.java

1 service with Service1Superset interface

Service1UnannotatedManyPropertySetterImpl.java

1 service with Service1 interface

No @Service, @Property or @Reference annotations but a setter with a collection type that that does not have a @Remotable annotation

Service1UnannotatedMultiRefCollSetterImpl.java

1 service with Service1 interface

1 reference (1..n) with Service1 interface

No @Service, @Property or @Reference annotations but a setter with a collection type that has a @Remotable annotation

Service1UnannotatedMultiRefSetterImpl.java

1 service with Service1 interface

1 reference (1..n) with Service1 interface

No @Service, @Property or @Reference annotations but a setter with an array type that has a @Remotable annotation

service1UnannotatedPropertySetterImpl.java

1 service with Service1 interface

No @Service, @Property or @Reference annotations but a setter with a type that that does not have a @Remotable annotation

service1UnannotatedRefSetterImpl.java

1 service with Service1 interface

1 reference with Service1 interface

No @Service, @Property or @Reference annotations but a setter with a type that has a @Remotable annotation

Service1UnannotatedWithPolicySetsImpl.java

1 service with Service1 interface

1 reference with Service1 interface

No @Service, @Property or @Reference annotations but a setter with a type that has a @Remotable annotation and class has a @PolicySets annotation

Service1UnannotatedWithRefPolicySetsImpl.java

1 service with Service1 interface

1 reference with Service1 interface

No @Service, @Property or @Reference annotations but a public field with a type that has a @Remotable annotation and class has a @PolicySets annotation

Service1WithImplPolicySetsImpl.java

1 service with Service1 interface

class is annotated with @PolicySets

Service1WithIntentImpl.java

<POJO_8003>

1 service with Service1 interface

class @Requires PropagatesTransaction

Service1WithIntentImpl.java

<POJO_8012>

1 service with Service1 interface

class @Requires managedTransaction

Service1WithRefIntentImpl.java

<POJO_8008>

1 service with Service1 interface

1 reference with Service1 interface

reference @Requires PropagatesTransaction

serviceImplClass.java

1 service with interface defined by the class itself that is compatible with Service 1 interface

z.ComplexClass.java

<POJO_ContributionF>

ComplexClass class

- used in a service operation with a Java class as its input parameter

3.3WSDL Interface Files



Name

Description

Service1.wsdl

Service1 interface



4Conformance

The artifacts contained in the sca-j-pojo-ci-1.1-testcases-package.zip file are considered to be authoritative and take precedence over the artifacts described in this document.

An implementation that claims to conform to this specification MUST be able to run all test cases in Section 2 TestCases, producing the 'Expected Output'.



  1. Test Assertions for the SCA POJO Component Implementation Specification

This document defines the Test Assertions for the SCA POJO Component Implementation Specification Version 1.1 [JAVACI].

The test assertions in this document follow the format defined in the OASIS Test Assertion Guidelines specification [TA-GUIDE].

    1. Example Test Assertion

Test assertions are presented in a tabular format with rows corresponding to the entry types defined in [TA-GUIDE].



Assertion ID

JCI-TA-xxxx

Source

[JCIx00yy]

Target

<kitchenSink/> element of composite file

Prerequisites

The <kitchenSink/> element has a @drain attribute

Predicate

The @drain attribute value of the <kitchenSink/> element is a URI that identifies a portal into the drainage system of the Domain.

Prescription Level

Mandatory

Tags

kitchenSink drain Domain



Assertion ID: Is a unique ID for the test assertion. Its format starts with a 3 letter string that identifies the specification to which it relates - "JCI" is for the SCA POJO Component Implementation specification. This is followed by "-TA-" to indicate that this identifier is for a test assertion. This is then followed by a unique 4 digit number.

Source: Is the identifier(s) of the normative statement(s) in the specification to which this assertion relates.

Target: Identifies the target which is addressed by this assertion. This is typically some SCA document element, or other SCA artefact but possibly could identify an SCA runtime and its behaviour.

Prerequisites: Defines any prerequisites for this test assertion. The prerequisites can be defined in terms of one or more other test assertions that have to be true.

Predicate: The meat of the assertion - something that evaluates to true or false for the given target.

Prescription Level: Mandatory (for “MUST” requirements) or Preferred (for “SHOULD” requirements) or Permitted (for “MAY” requirements).

Tags: Zero or more labels to be attached to this test assertion - these tags can be used to group sets of assertions.

    1. Test Assertions for SCA POJO Component Implementation Specification Section 2





Assertion ID

JCI-TA-2001

Source

[JCI20001]

Target

Introspected service interface of an SCA POJO component implementation

Prerequisites

 

Predicate

The introspected interface is one of:

  • Java Interface

  • Java Class

  • Java Interface generated from a WSDL document

Prescription Level

mandatory

Tags

interface”





Assertion ID

JCI-TA-2002

Source

[JCI20002]

Target

SCA POJO component implementation class

Prerequisites

SCA component provides a service interface

Predicate

The implementation class implements all the methods in the service interface.

Prescription Level

mandatory

Tags

implementation” “interface”



    1. Test Assertions for SCA POJO Component Implementation Specification Section 4



Assertion ID

JCI-TA-4001

Source

[JCI40001]

Target

SCA Runtime

Prerequisites

The implementation class with an unannotated field that is introspected as a property and the Java type of the field is a JAXB annotated class

Predicate

The SCA Runtime converts the property value into an instance of the property's Java type as defined by the XML to Java mappings in the JAXB specification [JAX-B] with XML schema validation enabled.

Prescription Level

mandatory

Tags

implementation” “property”





Assertion ID

JCI-TA-4002

Source

[JCI40001]

Target

SCA Runtime

Prerequisites

The implementation class with an unannotated setter method that is introspected as a property and the Java type of the field is a JAXB annotated class

Predicate

The SCA Runtime converts the property value into an instance of the property's Java type as defined by the XML to Java mappings in the JAXB specification [JAX-B] with XML schema validation enabled.

Prescription Level

mandatory

Tags

implementation” “property”



    1. Test Assertions for SCA POJO Component Implementation Specification Section 5



Assertion ID

JCI-TA-5001

Source

[JCI50001]

Target

SCA POJO component implementation class

Prerequisites

 

Predicate

The implementation class has a public or protected constructor.

Prescription Level

mandatory

Tags

implementation” “constructor”





Assertion ID

JCI-TA-5002

Source

[JCI50004]

Target

SCA POJO component implementation class constructor

Prerequisites

a) SCA Java component implementation class has a constructor annotated with @Constructor

b) SCA Java component implementation class has a constructor which is not annotated with @Constructor but where all its parameters are annotated with either @Property or with @Reference

c) SCA POJO implementation class has a no-arg constructor which is not annotated with @Constructor

d) SCA POJO implementation has other constructors with arguments which are not annotated with @Constructor and which do not have all parameters marked with either @Reference or @Property

e) An SCA component using the implementation class is instantiated

Predicate

The SCA Runtime invokes the constructor annotated with @Constructor

Prescription Level

mandatory

Tags

implementation” “constructor”





Assertion ID

JCI-TA-5003

Source

[JCI50004]

Target

SCA POJO component implementation class constructor

Prerequisites

a) SCA Java component implementation class does not have a constructor annotated with @Constructor

b) SCA Java component implementation class has a constructor which is not annotated with @Constructor but where all its parameters are annotated with either @Property or with @Reference

c) SCA POJO implementation class has a no-arg constructor which is not annotated with @Constructor

d) SCA POJO implementation has other constructors with arguments which are not annotated with @Constructor and which do not have all parameters marked with either @Reference or @Property

e) An SCA component using the implementation class is instantiated

Predicate

The SCA Runtime invokes the constructor which is not marked with @Constructor but which has all of its parameters marked with @Property or with @Reference

Prescription Level

mandatory

Tags

implementation” “constructor”





Assertion ID

JCI-TA-5004

Source

[JCI50004]

Target

SCA POJO component implementation class constructor

Prerequisites

a) SCA Java component implementation class does not have a constructor annotated with @Constructor

b) SCA Java component implementation class does not have a constructor which is not annotated with @Constructor but where all its parameters are annotated with either @Property or with @Reference

c) SCA POJO implementation class has a no-arg constructor which is not annotated with @Constructor

d) SCA POJO implementation has other constructors with arguments which are not annotated with @Constructor and which do not have all parameters marked with either @Reference or @Property

e) An SCA component using the implementation class is instantiated

Predicate

The SCA Runtime invokes the no-arg constructor

Prescription Level

mandatory

Tags

implementation” “constructor”





Assertion ID

JCI-TA-5005

Source

[JCI50004]

Target

SCA POJO component implementation class constructor

Prerequisites

a) SCA Java component implementation class does not have a constructor annotated with @Constructor

b) SCA Java component implementation class does not have a constructor which is not annotated with @Constructor but where all its parameters are annotated with either @Property or with @Reference

c) SCA POJO implementation class does not have a no-arg constructor

d) SCA POJO implementation has other constructors with arguments which are not annotated with @Constructor and which do not have all parameters marked with either @Reference or @Property

e) An SCA component using the implementation class is instantiated

Predicate

The SCA Runtime does not invoke any constructor and an error is thrown

Prescription Level

mandatory

Tags

implementation” “constructor”





Assertion ID

JCI-TA-5006

Source

[JCI50002]

Target

SCA POJO component implementation class constructor

Prerequisites

 

Predicate

At most one constructor is annotated with the @Constructor annotation

Prescription Level

mandatory

Tags

implementation” “constructor”





Assertion ID

JCI-TA-5007

Source

[JCI50005]

Target

SCA POJO component implementation class constructor

Prerequisites

a) The implementation class has no @Constructor annotations

Predicate

The implementation class has at most one constructor that has a non-empty parameter list and all parameters are annotated with either @Property or @Reference

Prescription Level

mandatory

Tags

implementation” “constructor”



    1. Test Assertions for SCA POJO Component Implementation Specification Section 6



Assertion ID

JCI-TA-6001

Source

[JCI60001]

Target

SCA POJO implementation annotated with @Scope("STATELESS")

Prerequisites

 

Predicate

POJO implementation is run and has the operational characteristics of a STATELESS scoped implementation

Prescription Level

mandatory

Tags

implementation” “scope”





Assertion ID

JCI-TA-6002

Source

[JCI60001]

Target

SCA POJO implementation with @Scope("COMPOSITE")

Prerequisites

 

Predicate

POJO implementation is run and has the operational characteristics of a COMPOSITE scoped implementation

Prescription Level

mandatory

Tags

implementation” “scope”



    1. Test Assertions for SCA POJO Component Implementation Specification Section 8



Assertion ID

JCI-TA-8001

Source

[JCI80001]

Target

SCA POJO implementation class with a @Service annotation

Prerequisites

@Service annotation has a single interface class in its value attribute and no name attribute

Predicate

Introspected <componentType> has a <service> element with @name equal to the simple name of the interface class in the @Service annotation

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8002

Source

[JCI80001]

Target

SCA POJO implementation class with a @Service annotation

Prerequisites

@Service annotation has a single interface class in its value attribute and no name attribute

The interface class contains the @Remotable annotation

Predicate

Introspected <componentType> has a <service> element with an <interface.java/> subelement with the @interface attribute set to the fully qualified name of the interface class in the value attribute of the @Service annotation

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8003

Source

[JCI80001]

Target

SCA POJO implementation class with a @Service annotation and a @Requires annotation with one or more intents declared

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with @requires attribute containing the set of intents in the @Requires annotation

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8004

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations and zero @Property annotations

Prerequisites

Implementation class implements an Interface where the interface class is annotated with @Remotable

Predicate

Introspected <componentType> has a <service> element with

a) @name set to the simple name of the interface class

b) an <interface.java/> subelement with @interface attribute set to the fully qualified name of the interface class

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8005

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations and zero @Property annotations

Prerequisites

Implementation class does not implement any interfaces where the interface class is annotated with @Remotable

Predicate

Introspected <componentType> has a <service> element with

a) @name set to the simple name of the implementation class

b) an <interface.java/> subelement with @interface attribute set to the fully qualified name of the implementation class

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8006

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation

Prerequisites

@Reference annotation has a @name parameter

Predicate

Introspected <componentType> has a <reference> element with @name attribute set to the value of the @name parameter of the @Reference annotation

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8007

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation

Prerequisites

1) @Reference annotation annotates a field which is an array type

2) @Reference annotation has @required=true

Predicate

Introspected <componentType> has a <reference> element with @multiplicity set to 1..n

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8008

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation

Prerequisites

1) @Reference annotation has a @required=false

2) @Reference annotation annotates a field with an interface type

Predicate

Introspected <componentType> has a <reference> element with @multiplicity set to 0..1

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8009

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation

Prerequisites

@Reference annotation annotates a field which is also annotated with a @Requires annotation

Predicate

Introspected <componentType> has a <reference> element with @requires set to the value of the @Requires annotation

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8010

Source

[JCI80001]

Target

SCA POJO implementation class with a @Property annotation

Prerequisites

1) @Property annotation annotates a setter method

2) Setter method parameter has a type which is not an array or collection type

Predicate

Introspected <componentType> has a <property> element with

a) @name set to the JavaBeans property name derived from the setter method name

b) @type set to the JAXB mapping of the type of the parameter of the setter method

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8011

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations and zero @Property annotations

Prerequisites

Class has a public setter method which is not part of a service interface and which has a parameter typed by an interface class which is annotated with @Remotable

Predicate

Introspected <componentType> has a <reference> element with

a) @name set to the JavaBeans property name derived from the setter method name

b) @multiplicity is 1..1

c) <interface.java/> subelement referencing the fully qualified name of the interface class

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8012

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations and zero @Property annotations

Prerequisites

Class has a public field or setter with a type which is not a Java interface, array or parameterized java.util.Collection

Predicate

Introspected <componentType> has a <property> element with:

a) @name set to the name of the public field or setter method

b) @type set to the JAXB mapping of the type of the field or setter

c) @many set to “false:

Prescription Level

mandatory

Tags

componentType” “property”





Assertion ID

JCI-TA-8013

Source

[JCI80001]

Target

SCA POJO implementation class

Prerequisites

Implementation class has a @Requires attribute

Predicate

Introspected <componentType> has an <implementation.java/> subelement with @requires attribute present with a value equal to the value of the @Requires annotation

Prescription Level

mandatory

Tags

componentType” “implementation”





Assertion ID

JCI-TA-8014

Source

[JCI80002]

Target

SCA POJO implementation class with 2 or more setter methods annotated with @Property

Prerequisites

 

Predicate

The JavaBeans property name for each property setter method is unique.

Prescription Level

mandatory

Tags

implementation” “property”





Assertion ID

JCI-TA-8015

Source

[JCI80002]

Target

SCA POJO implementation class with 2 or more setter methods annotated with @Reference

Prerequisites

 

Predicate

The JavaBeans property name for each reference setter method is unique.

Prescription Level

mandatory

Tags

implementation” “reference”





Assertion ID

JCI-TA-8016

Source

[JCI80001]

Target

SCA POJO implementation class with a @Service annotation and @Remotable annotation

Prerequisites

@Service annotation has a single interface class in its value attribute and no name attribute

The interface class does not contain the @Remotable annotation

Predicate

Introspected <componentType> has a <service> element with an <interface.java/> subelement where:

  • the @interface attribute set to the fully qualified name of the interface class in the value attribute of the @Service annotation

  • the @remotable attribute set to “true”.

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8017

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation

Prerequisites

  1. @Reference annotation annotates a field, setter or constructor parameter with an interface type

  2. Interface type has no @Remotable annotation

  3. @Remotable annotation on the same field, setter or constructor parameter as the @Reference annotation

Predicate

Introspected <componentType> has a <reference> element with @multiplicity set to 0..1 and a child <interface.java> element with

  • @interface attribute set to the fully qualified name of the interface type

  • @remotable attribute set to true

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8018

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation

Prerequisites

@Reference annotation annotates a setter which takes an interface type parameter

Predicate

Introspected <componentType> has a <reference> element with a child <interface.java> element with @interface attribute set to the fully qualified name of the interface type

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8019

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation

Prerequisites

@Reference annotation annotates a constructor parameter which is an interface type

Predicate

Introspected <componentType> has a <reference> element with a child <interface.java> element with @interface attribute set to the fully qualified name of the interface type

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8020

Source

[JCI80001]

Target

SCA POJO implementation class with a @Service annotation and a @PolicySets annotation with one or more policySets declared

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with @policySets attribute containing the set of policySets in the @PolicySets annotation

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8021

Source

[JCI80001]

Target

SCA POJO implementation class with a @Reference annotation and a @PolicySets annotation with one or more policySets declared

Prerequisites

 

Predicate

Introspected <componentType> has a <reference> element with @policySets attribute containing the set of policySets in the @PolicySets annotation

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8022

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations, zero @Property annotations, and a @PolicySets annotation on the class itself with one or more policySets declared

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with @policySets attribute containing the set of policySets in the @PolicySets annotation

Prescription Level

mandatory

Tags

componentType” “service”





Assertion ID

JCI-TA-8023

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations, zero @Property annotations, and a @PolicySets annotation on a public field, typed by an interface annotated with @Remotable, with one or more policySets declared

Prerequisites

 

Predicate

Introspected <componentType> has a <reference> element with @policySets attribute containing the set of policySets in the @PolicySets annotation

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8024

Source

[JCI80001]

Target

SCA POJO implementation class

Prerequisites

Implementation class has a @PolicySets attribute

Predicate

Introspected <componentType> has an <implementation.java/> subelement with @policySets attribute present with a value equal to the value of the @PolicySets annotation

Prescription Level

mandatory

Tags

componentType” “implementation”





Assertion ID

JCI-TA-8025

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations and zero @Property annotations

Prerequisites

Class has a public setter method which is not part of a service interface and which has a parameter typed by an array of interface classes which are annotated with @Remotable

Predicate

Introspected <componentType> has a <reference> element with

a) @name set to the JavaBeans property name derived from the setter method name

b) @multiplicity is 1..n

c) <interface.java/> subelement referencing the fully qualified name of the interface class

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8026

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations and zero @Property annotations

Prerequisites

Class has a public setter method which is not part of a service interface and which has a parameter typed by a java.util.Collection which is parameterized by an interface class which is annotated with @Remotable

Predicate

Introspected <componentType> has a <reference> element with

a) @name set to the JavaBeans property name derived from the setter method name

b) @multiplicity is 1..n

c) <interface.java/> subelement referencing the fully qualified name of the interface class

Prescription Level

mandatory

Tags

componentType” “reference”





Assertion ID

JCI-TA-8027

Source

[JCI80001]

Target

SCA POJO implementation class with zero @Service annotations, zero @Reference annotations and zero @Property annotations

Prerequisites

Class has a public field or setter with a type which is not a Java interface, but is an array or parameterized (non-interface) java.util.Collection

Predicate

Introspected <componentType> has a <property> element with:

a) @name set to the name of the public field

b) @type set to the JAXB mapping of the type of the field or setter

c) @many set to “true”

Prescription Level

mandatory

Tags

componentType” “property”





Assertion ID

JCI-TA-8028

Source

[JCI80001]

Target

SCA POJO implementation class with javax.jws.WebService annotation

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with:

a) @name set to the value of the name property on the @WebService annotation

b) <interface.java> child element with the @interface attribute set to the fully qualified name of the implementation class

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8029

Source

[JCI80001]

Target

SCA POJO implementation class with javax.jws.WebService annotation

Prerequisites

EndpointInterface annotation property is set to a Java interface class

Predicate

Introspected <componentType> has a <service> element with:

a) @name set to the value of the name property on the @WebService annotation

b) <interface.java> child element with the @interface attribute set to the value of the endpointInterface property

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8030

Source

[JCI80001]

Target

SCA POJO implementation class with javax.jws.WebService annotation

Prerequisites

WsdlLocation property is set and points to a WSDL document

Predicate

Introspected <componentType> has a <service> element with:

a) @name set to the value of the name property on the @WebService annotation

b) <interface.wsdl> child element with the @interface attribute set to the portType referenced by the value of the wsdlLocation property

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8031

Source

[JCI80001]

Target

SCA POJO implementation class with javax.jws.WebParam annotation that has the header property set to “true”

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with a @requires attribute set to “SOAP”.

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8032

Source

[JCI80001]

Target

SCA POJO implementation class with javax.jws.WebResult annotation that has the header property set to “true”

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with a @requires attribute set to “SOAP”.

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8033

Source

[JCI80001]

Target

SCA POJO implementation class with javax.jws.soap.SOAPBinding annotation

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with a @requires attribute set to “SOAP”.

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8034

Source

[JCI80001]

Target

SCA POJO implementation class with javax.xml.ws.WebServiceProvider annotation

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with an <interface.java> child element with the @interface attribute set to the fully qualified name of the implementation class

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8035

Source

[JCI80001]

Target

SCA POJO implementation class with javax.xml.ws.WebServiceProvider annotation

Prerequisites

WsdlLocation property is set and points to a WSDL document

Predicate

Introspected <componentType> has a <service> element with an <interface.wsdl> child element with the @interface attribute set to the portType referenced by the value of the wsdlLocation property

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8036

Source

[JCI80001]

Target

SCA POJO implementation class with any JAX-WS annotation

Prerequisites

 

Predicate

Introspected <componentType> has a <service> element with a <binding.ws> child element with the @wsdlElement attribute set to point to a WSDL document that uses the SOAP/HTTP binding (http://schemas.xmlsoap.org/wsdl/soap/http )

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”





Assertion ID

JCI-TA-8037

Source

[JCI80001]

Target

SCA POJO implementation class with javax.xml.ws.BindingType annotation

Prerequisites

The value of the @BindingType annotation is http://www.w3.org/2003/05/soap/bindings/HTTP/

Predicate

Introspected <componentType> has a <service> element with a <binding.ws> child element with the @requires attribute set to “SOAP.v1_2”

Prescription Level

mandatory

Tags

componentType” “service” “jax-ws”



    1. Test Assertions for SCA POJO Component Implementation Specification Section 9



Assertion ID

JCI-TA-9001

Source

[JCI90001]

Target

SCA <component> using <implementation.java/>

Prerequisites

 

Predicate

The <implementation.java/> element conforms to the sca-implementation-java.xsd schema

Prescription Level

mandatory

Tags

implementation” “schema”





Assertion ID

JCI-TA-9002

Source

[JCI90002, JCI100008]

Target

SCA POJO component implementation class

Prerequisites

a) An SCA component that uses the @class attribute to specify its Java implementation class

b) The Java implementation class is contained within the same contribution as the component

c) The SCA component is instantiated

Predicate

The Java class specified on the @class attribute is found

Prescription Level

mandatory

Tags

implementation” “resolution”





Assertion ID

JCI-TA-9003

Source

[JCI90002, JCI100008]

Target

SCA POJO component implementation class

Prerequisites

a) An SCA component that uses the @class attribute to specify its Java implementation class

b) The Java implementation class is exported by a contribution (Contribution B) in the SCA Domain

c) The Java implementation class is also contained within the same contribution (Contribution A) as the component

d) Contribution A imports the Java package of the implementation class

e) The SCA component is instantiated

Predicate

The Java class specified on the @class attribute is loaded from Contribution B

Prescription Level

mandatory

Tags

implementation” “resolution”





Assertion ID

JCI-TA-9004

Source

[JCI90002, JCI100008]

Target

SCA POJO component implementation class

Prerequisites

a) An SCA component that uses the @class attribute to specify its Java implementation class

b) The Java implementation class is contained within another contribution (Contribution C) in the SCA Domain

c) The Java implementation class is exported by another contribution (Contribution B) in the SCA Domain

d) The Java implementation class is also contained within the same contribution (Contribution A) as the component

e) Contribution A imports the Java package of the implementation class and uses the @location attribute of <import.java/> to specify Contribution C

f) The SCA component is instantiated

Predicate

The Java class specified on the @class attribute is loaded from Contribution C

Prescription Level

mandatory

Tags

implementation” “resolution”





Assertion ID

JCI-TA-9005

Source

[JCI90002, JCI100008]

Target

SCA POJO component implementation class

Prerequisites

a) An SCA component that uses the @class attribute to specify its Java implementation class

b) The Java implementation class is contained within another contribution (Contribution C) in the SCA Domain

c) The Java implementation class is exported by another contribution (Contribution B) in the SCA Domain

d) The Java implementation class is also contained within the same contribution (Contribution A) as the component

e) Contribution A uses a Java language specific mechanism to specify the location of the implementation class

f) The SCA component is instantiated

Predicate

The Java class specified on the @class attribute is loaded by the Java language specific mechanism

Prescription Level

mandatory

Tags

implementation” “resolution”





Assertion ID

JCI-TA-9006

Source

[JCI90003]

Target

Java class referenced by @class attribute of <implementation.java/>

Prerequisites

 

Predicate

The Java class conforms to Java SE 5.0

Prescription Level

mandatory

Tags

implementation” “Java”



    1. Test Assertions for SCA POJO Component Implementation Specification Section 10



Assertion ID

JCI-TA-10001

Source

[JCI100001]

Target

<import.java/> element of sca-contribution.xml

Prerequisites

 

Predicate

The value of the @package attribute on the <import.java/> element is unique across all other <import.java/> elements within the contribution.

Prescription Level

mandatory

Tags

import”





Assertion ID

JCI-TA-10002

Source

[JCI100002]

Target

Java package with version referenced by <import.java/>

Prerequisites

a) An SCA component and implementation that uses the Java package specified in the <import.java/> element contained with Contribution A

b) The Java implementation class is exported by another contribution (Contribution B) in the SCA Domain

c) The SCA component is instantiated

Predicate

The Java classes in the package that is loaded, satisfy the <import.java/>

Prescription Level

mandatory

Tags

import” “resolution”





Assertion ID

JCI-TA-10003

Source

[JCI100002]

Target

Java package with version referenced by <import.java/>

Prerequisites

a) An SCA component and implementation that uses the Java package specified in the <import.java/> element contained with Contribution A

b) The Java implementation class is contained within contribution (Contribution B) in the SCA Domain

c) The @location attribute on <import.java/> points to Contribution B

c) The SCA component is instantiated

Predicate

The Java classes in the package that is loaded from contribution B, satisfy the <import.java/>

Prescription Level

mandatory

Tags

import” “resolution”





Assertion ID

JCI-TA-10004

Source

[JCI100003]

Target

<export.java> with @package that uses the “uses” directive

Prerequisites

a) An SCA component and implementation contained within Contribution A that imports the Java packages specified in the <import.java/> element

b) Contribution A also imports one or more of the packages specified in the uses directive of <import.java/>

c) Another contribution (Contribution B) contains the <export.java/> element

d) A third contribution (Contribution C) also exports the the same Java package as Contribution B, but it does not contain the “uses” directive

e) The SCA component is instantiated

Predicate

The Java classes required by Contribution A are all loaded from Contribution B

Prescription Level

mandatory

Tags

export” “resolution”





Assertion ID

JCI-TA-10005

Source

[JCI100004]

Target

<export.java/> element of a contribution

Prerequisites

 

Predicate

The value of the @package attribute on the <export.java/> element is unique across all other <export.java/> elements within the contribution.

Prescription Level

mandatory

Tags

export”





Assertion ID

JCI-TA-10006

Source

[JCI100007]

Target

@package attribute of <export.java/>

Prerequisites

 

Predicate

The Java package specified on the @package attribute is contained with the same contribution as the <export.java/>

Prescription Level

mandatory

Tags

export” “resolution”





Assertion ID

JCI-TA-10007

Source

[JCI100010]

Target

SCA Runtime

Prerequisites

 

Predicate

All classes loaded from a contribution are loaded by a contribution unique class loader.

Prescription Level

mandatory

Tags

class-loader”





Assertion ID

JCI-TA-10008

Source

[JCI100011]

Target

SCA Runtime

Prerequisites

a) Contribution A imports Java classes

b) Contribution B exports the same Java classes

Predicate

Contribution B's class loader loads classes from Contribution A

Prescription Level

mandatory

Tags

class-loader”





Assertion ID

JCI-TA-10009

Source

[JCI100009]

Target

SCA Runtime

Prerequisites

a) SCA POJO component contained within Contribution A

b) The SCA component is instantiated

Predicate

SCA Runtime's thread context class loader is the class loader for Contribution A

Prescription Level

mandatory

Tags

class-loader”



  1. Cross Mapping of Normative Statements to Test Assertions

This section contains a list of normative statements in the SCA POJO Component Implementation specification and the corresponding Test Assertions.

Conformance statement

Test Assertion

JCI20001

JCI-TA-2001

JCI20002

JCI-TA-2002




Conformance statement

Test Assertion

JCI40001

JCI-TA-4001

JCI-TA-4002





Conformance statement

Test Assertion

JCI50001

JCI-TA-5001

JCI50002

JCI-TA-5006

JCI50004

JCI-TA-5002

JCI-TA-5003

JCI-TA-5004

JCI-TA-5005

JCI50005

JCI-TA-5007




Conformance statement

Test Assertion

JCI60001

JCI-TA-6001

JCI-TA-6002



Conformance statement

Test Assertion

JCI8001

JCI-TA-8001, JCI-TA-8002, JCI-TA-8003,

JCI-TA-8004, JCI-TA-8005, JCI-TA-8006,

JCI-TA-8007, JCI-TA-8008, JCI-TA-8009,

JCI-TA-8010, JCI-TA-8011, JCI-TA-8012,

JCI-TA-8013, JCI-TA-8016, JCI-TA-8017,

JCI-TA-8018, JCI-TA-8019, JCI-TA-8020,

JCI-TA-8021, JCI-TA-8022, JCI-TA-8023,

JCI-TA-8024, JCI-TA-8025, JCI-TA-8026,

JCI-TA-8027, JCI-TA-8028, JCI-TA-8029,

JCI-TA-8030, JCI-TA-8031, JCI-TA-8032,

JCI-TA-8033, JCI-TA-8034, JCI-TA-8035,

JCI-TA-8036, JCI-TA-8037

JCI8002

JCI-TA-8014

JCI-TA-8015





Conformance statement

Test Assertion

JCI90001

JCI-TA-9001

JCI90002

JCI-TA-9002

JCI-TA-9003

JCI-TA-9004

JCI-TA-9005

JCI90003

JCI-TA-9006



Conformance statement

Test Assertion

JCI100001

JCI-TA-10001

JCI100002

JCI-TA-10002

JCI-TA-10003

JCI100003

JCI-TA-10004

JCI100004

JCI-TA-10005

JCI100007

JCI-TA-10006

JCI100008

JCI-TA-9002

JCI-TA-9003

JCI-TA-9004

JCI-TA-9005

JCI100009

JCI-TA-10009

JCI100010

JCI-TA-10007

JCI100011

JCI-TA-10008


  1. Cross Mapping of Test Assertions to TestCases



Test Assertion

Test Cases

JCI-TA-2001

POJO_2001_TestCase

JCI-TA-2002

POJO_2002_TestCase



Test Assertion

Test Cases

JCI-TA-4001

POJO_4001_TestCase

JCI-TA-4002

POJO_4002_TestCase



Test Assertion

Test Cases

JCI-TA-5001

POJO_5001_TestCase

JCI-TA-5002

POJO_5002_TestCase

JCI-TA-5003

POJO_5003_TestCase

JCI-TA-5004

POJO_5004_TestCase

JCI-TA-5005

POJO_5005_TestCase

JCI-TA-5006

POJO_5006_TestCase

JCI-TA-5007

POJO_5007_TestCase



Test Assertion

Test Cases

JCI-TA-6001

POJO_6001_TestCase

JCI-TA-6002

POJO_6002_TestCase





Test Assertion

Test Cases

JCI-TA-8001

POJO_8001_TestCase

JCI-TA-8002

POJO_8002_TestCase

JCI-TA-8003

POJO_8003_TestCase

JCI-TA-8004

POJO_8004_TestCase

JCI-TA-8005

POJO_8005_TestCase

JCI-TA-8006

POJO_8006_TestCase

JCI-TA-8007

POJO_8015_TestCase

JCI-TA-8008

POJO_8007_TestCase

JCI-TA-8009

POJO_8008_TestCase

JCI-TA-8010

POJO_8009_TestCase

JCI-TA-8011

POJO_8010_TestCase

JCI-TA-8012

POJO_8011_TestCase

JCI-TA-8013

POJO_8012_TestCase

JCI-TA-8014

POJO_8013_TestCase

JCI-TA-8015

POJO_8014_TestCase

JCI-TA-8016

POJO_8016_TestCase

JCI-TA-8017

POJO_8017_TestCase

JCI-TA-8018

POJO_8018_TestCase

JCI-TA-8019

POJO_8019_TestCase

JCI-TA-8020

POJO_8020_TestCase

JCI-TA-8021

POJO_8021_TestCase

JCI-TA-8022

POJO_8022_TestCase

JCI-TA-8023

POJO_8023_TestCase

JCI-TA-8024

POJO_8024_TestCase

JCI-TA-8025

POJO_8025_TestCase

JCI-TA-8026

POJO_8026_TestCase

JCI-TA-8027

POJO_8027_TestCase

JCI-TA-8028

POJO_8028_TestCase

JCI-TA-8029

POJO_8029_TestCase

JCI-TA-8030

POJO_8030_TestCase

JCI-TA-8031

POJO_8031_TestCase

JCI-TA-8032

POJO_8032_TestCase

JCI-TA-8033

POJO_8033_TestCase

JCI-TA-8034

POJO_8034_TestCase

JCI-TA-8035

POJO_8035_TestCase

JCI-TA-8036

POJO_8036_TestCase

JCI-TA-8037

POJO_8037_TestCase





Test Assertion

Test Cases

JCI-TA-9001

POJO_9001_TestCase

JCI-TA-9002

POJO_9002_TestCase

JCI-TA-9003

POJO_9003_TestCase

JCI-TA-9004

POJO_9004_TestCase

JCI-TA-9005

untestable with current mandatory requirements

JCI-TA-9006

no obvious test available





Test Assertion

Test Cases

JCI-TA-10001

POJO_10001_TestCase

JCI-TA-10002

POJO_10002_TestCase

JCI-TA-10003

POJO_10003_TestCase

JCI-TA-10004

POJO_10004_TestCase

JCI-TA-10005

POJO_10005_TestCase

JCI-TA-10006

POJO_10006_TestCase

JCI-TA-10007

POJO_10007_TestCase

JCI-TA-10008

POJO_10008_TestCase

JCI-TA-10009

POJO_10009_TestCase



  1. Acknowledgments

The following individuals have participated in the creation of this specification and are gratefully acknowledged

Participants:


Participant Name

Affiliation

Bryan Aupperle

IBM

Vladislav Bezrukov

SAP AG*

David Booz

IBM

Martin Chapman

Oracle Corporation

Vamsavardhana Reddy Chillakuru

IBM

Mark Combellack

Avaya, Inc.

Mike Edwards

IBM

Anish Karmarkar

Oracle Corporation

Ashok Malhotra

Oracle Corporation

Plamen Pavlov

SAP AG*

Eric Wells

Hitachi, Ltd.




  1. Revision History



Revision

Date

Editor

Changes Made

1

09/25/09

Mike Edwards

Initial version

4

10/02/09

Dave Booz

Section 3 testcases

5

10/06/09

Dave Booz

Section 8, 8001-8005

7

10/07/09

Dave Booz

Complete Section 8

WD01

11/12/09

Mike Edwards

All sections complete

wd02

11/18/09

Mike Edwards

Added testcases in 8xxx range

wd03

07/26/10

Mike Edwards

Corrected cross-mapping tables

Added testcases POJO_8015, POJO_8016

wd04

 

 

 

wd05

07/29/10

Mike Edwards

Added testcases: POJO_8027_TestCase
POJO_8028_TestCase
POJO_8029_TestCase
POJO_8030_TestCase
POJO_8031_TestCase
POJO_8032_TestCase

wd06

 

 

 

Wd07

13/10/10

Bryan Aupperle

Fix cut/paste errors in test cases 8033-8036

Update artifact tables

wd08

10/19/10

Mike Edwards

Apply Issue 214:
- new testcase POJO_8037_TestCase

csdpr01

11/08/10

TC Admin

CSD01 & Public Review 01

wd011

06/27/11

Mike Edwards

Issue 222 - Section 1 & Frontmatter (Abstract)

wd12

06/27/11

Mike Edwards

Issue 236 - merge TestAssertions document into the Testcases document - major changes across the document.

wd13

08/15/11

Mike Edwards

All changes accepted

Frontmatter and references updated for cds02 draft



sca-j-pojo-ci-1.1-testcases-csprd02 15 August 2011

Standards Track Work Product Copyright © OASIS Open 2011. All Rights Reserved. Page 81 of 81