TestCases for the SCA_J Common Annotations and APIs Version 1.1 Specification

Committee Draft 01

19 July 2010

Specification URIs:

This Version:

http://docs.oasis-open.org/opencsa/sca-j/sca-j-caa-1.1-testcases-cd01.html

http://docs.oasis-open.org/opencsa/sca-j/sca-j-caa-1.1-testcases-cd01.odt

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

Previous Version:

N/A

Latest Version:

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

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

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

Technical Committee:

OASIS Service Component Architecture / J (SCA-J) TC
 http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=sca-j

Chair(s):

David Booz, IBM
Mark Combellack Avaya Inc

Editor(s):

Mike Edwards, IBM
David Booz, IBM

Related Work:

This document is related to:

·     Service Component Architecture Java Common Annotations and APIs Specification Version 1.1
http://docs.oasis-open.org/opencsa/sca-j/sca-javacaa-1.1-spec-cd04.pdf

Declared XML Namespace(s):

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

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

Abstract:

This document defines the TestCases for the SCA Java Common Annotations and APIs Assembly specification.

The TestCases represent a series of tests that an SCA runtime must pass in order to claim conformance to the requirements of the SCA Java Common Annotations and APIsAssembly specification.

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” or “Latest Approved Version” location noted above for possible later revisions of this document.

Technical Committee members should send comments on this specification 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 specification, 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.

The non-normative errata page for this specification is located at

http://www.oasis-open.org/committees/sca-j/

 

Notices

Copyright © OASIS® 2010. 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 names "OASIS", "Service Component Architecture" are trademarks 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..................................................................................... 7

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 3................................................................................................................................ 13

2.3 Section 4................................................................................................................................ 21

2.4 Section 5................................................................................................................................ 26

2.5 Section 8................................................................................................................................ 30

2.6 Section 9................................................................................................................................ 36

2.7 Section 10.............................................................................................................................. 47

2.8 Section 11.............................................................................................................................. 59

3 Cross Mapping of Test Assertions to TestCases............................................................................. 69

4 Catalog of Test Artifacts................................................................................................................ 77

4.1 Composite Files - lower level................................................................................................... 77

4.2 Java Interfaces........................................................................................................................ 77

4.3 Java Implementation Classes................................................................................................... 79

4.4 WSDL Interface Files............................................................................................................... 90

5 Conformance................................................................................................................................. 91

Appendix A.Acknowledgments.......................................................................................................... 92

Appendix B.Revision History............................................................................................................. 93


 

1      Introduction

This document defines the TestCases for the SCA Assembly specification.

The tests described in this document are related to the Test Assertions described in the SCA Assembly Test Assertions document [CAA-TA].

1.1    TestCase Structure

The SCA J CAA 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) should 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.

All of the components in the top level composite are implemented by composites.  These second level composites then contain typically one component, implemented using a specific technology such as Java POJO. In some cases the implementation may be a third level composite. 

The application is structured so that alternative technologies can be used.  For example, replacing the contents of the second-level or third-level composites allows different Java implementation technologies to be tested – eg POJOs or Spring Application Contexts may be used.  Similarly, the binding used to connect from the top level composite to the client application may be changed from Web services to JMS if required, simply by changing the binding on the <service/> of the top level composite.

Which implementation language to use for test artifacts is controlled by a system variable or environment variable which is read by the test client application, with the name "OASIS_TESTENV_IMPL_LANG".  This variable can have one of the following values:

·         "POJO"       - for Java implementations

·         "Spring"            - for Spring implementations

The testcases are designed so that the range of implementation types can be expanded

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:

·         JCA_nnnn   - a contribution that is specific for a particular testcase, where "nnnn" is the number of the testcase.  Often this is required because a particular testcase involves artifacts that contain errors that are statically checkable - an SCA runtime is permitted to reject such artifacts when they are contributed and deployed and it is important to ensure that contributions containing deliberate errors for one testcase do not interfere with the operation of other testcases.

·         JCA_nnnn_POJO - a contribution for a specific testcase where there is a need for language specific artifacts that relate to that testcase alone

·         JCA_General - a shared contribution containing implementation type independent artifacts that can be used by many testcases.

·         JCA_General_POJO - a shared contribution containing implementation type dependent artifacts  for Java POJOs.  These artifacts can include both Java classes and also SCA composites that directly use Java classes.

Note that the names of Contributions containing implementation specific artifacts ends with a name that is specific to the implementation type - so "_POJO" is used for Java POJO implementations, "_Spring" is used for Spring implementations (and so on).  Note that the name following the underscore matches the name used in the "OASIS_TESTENV_IMPL_LANG" variable used to control execution of the test client.  The concept is that where there is an implementation type specific contribution, each implementation type must provide its own versions of the same basic artifacts.  Typically, this means that each contribution must contain the same set of Composites, but that the implementation type dependent artifacts that these composites use will differ from implementation type to implementation type.

Basically, the setting of the variable is used to select the suffix used for implementation type dependent contributions. If the variable is set to "POJO" then the contribution "JCA_General_POJO" is selected, whereas if the variable is set to "Spring", the contribution "JCA_General_Spring" is selected.

1.2    Namespaces and Java Package Names

The SCA Assembly 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.3    Terminology

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.4    Normative 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.

[CAA-TA]                OASIS Committee Draft 01, "Test Assertions for the SCA_J Common Annotations and APIs Version 1.1 Specification", July 2010.
http://docs.oasis-open.org/opencsa/sca-j/sca-j-caa-1.1-test-assertions-cd01.pdf

 

1.5    Non-normative References

N/A

 

2      TestCases

2.1    Section 2

JCA_2001_TestCase

 

Testcase ID

JCA_2001_TestCase

Test Assertion

JCA-TA-2001

Description

Tests that a Java service which is marked remotable does not use method overloading

Artifacts

JCA_2001_TestCase.java

Test_JCA_2001.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1Overload.java

service1OverloadImpl.java

Expected output

Negative test:

“exception”

 

JCA_2002_TestCase

 

Testcase ID

JCA_2002_TestCase

Test Assertion

JCA-TA-2002

Description

Tests that a stateless scoped Java implementation instance is not dispatched on more than a single thread at one time

Artifacts

JCA_2002_TestCase.java

Test_JCA_2002.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

ParallelService.java

parallelServiceClientImpl.java

parallelServiceImpl.java

Expected output

Positive test:

"JCA_2002 request service1 parallel service invocation successful"

 

JCA_2003_TestCase

 

Testcase ID

JCA_2003_TestCase

Test Assertion

JCA-TA-2003

Description

Tests that an implementation instance annotated with @Scope("STATELESS") is invoked only once through one business method during the lifetime of the implementation instance

Artifacts

JCA_2003_TestCase.java

Test_JCA_2003.composite

TestInvocation.wsdl

TestClient_0002.composite

MultipleService.java

multipleServiceClientImpl.java

multipleServiceImpl.java

Expected output

Positive test:

"JCA_2003 request service1 multiple service invocation successful"

 

JCA_2004_TestCase

 

Testcase ID

JCA_2004_TestCase

Test Assertion

JCA-TA-2004

Description

Tests that where there is a Domain-level component implementation marked as COMPOSITE scope, that all its clients appear to interact with a single runtime instance of the class.

Artifacts

JCA_2004_TestCase.java

Test_JCA_2004.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1CoordinatorImpl.java

service1Impl2.java

service1CompositeImpl.java

Expected output

Positive test:

"JCA_2004 request serviceCoordinator operation1 invoked service1 operation1 invoked serviceComposite operation1 Initial service2 operation1 invoked serviceComposite operation1 1 service3 operation1 invoked serviceComposite operation1 2 service4 operation1 invoked serviceComposite operation1 3"

 

JCA_2005_TestCase

 

Testcase ID

JCA_2005_TestCase

Test Assertion

JCA-TA-2005

Description

Tests that where a component implementation is marked with COMPOSITE scope and with @EagerInit, that the implementation instance is created and initialized when the component is started.

Artifacts

JCA_2005_TestCase.java

Test_JCA_2005.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

compositeEagerInitImpl.java

service1CompositeImpl.java

Expected output

Positive test:

"JCA_2005 request serviceComposite2 operation1 EagerInit called"

 

JCA_2006_TestCase

 

Testcase ID

JCA_2006_TestCase

Test Assertion

JCA-TA-2006

Description

Tests that where a component implementation has a method marked with @Init, that this method is called when the implementation instance is created

Artifacts

JCA_2006_TestCase.java

Test_JCA_2006.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1InitCheckerImpl.java

service1InitImpl.java

Expected output

Positive test:

"JCA_2006 request serviceComposite1 operation1 Init check succeeded"

 

JCA_2007_TestCase

 

Testcase ID

JCA_2007_TestCase

Test Assertion

JCA-TA-2007

Description

Tests that for a Java implementation with COMPOSITE scope, that multiple invocations of service operations which overlap in time can run within a single instance of the implementation on separate Java threads.

Artifacts

JCA_2007_TestCase.java

Test_JCA_2007.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

ParallelService.java

parallelCompositeClientImpl.java

parallelCompositeServiceImpl.java

Expected output

Positive test:

"JCA_2007 request serviceCompositeClient COMPOSITE service invocation successfully used by multiple threads simultaneously"

 

JCA_2008_TestCase

 

Testcase ID

JCA_2008_TestCase

Test Assertion

JCA-TA-2008

Description

Tests that for a Java implementation class with COMPOSITE scope offering a service, used as the implementation of a component within a composite which is itself the implementation of a Domain level component, all clients of the component service appear to interact with a single instance of the implementation class

Artifacts

JCA_2008_TestCase.java

Test_JCA_2008.composite

TestInvocation.wsdl

TestClient_0002.composite

CompositeScope.composite

Service1.java

service1CoordinatorImpl.java

service1Impl2.java

service1CompositeImpl.java

Expected output

Positive test:

"JCA_2008 request serviceComposite operation1 invoked service1 operation1 invoked serviceComposite operation1 Initial service2 operation1 invoked serviceComposite operation1 1 service3 operation1 invoked serviceComposite operation1 2 service4 operation1 invoked serviceComposite operation1 3"

 

JCA_2009_TestCase

 

Testcase ID

JCA_2009_TestCase

Test Assertion

JCA-TA-2011, JCA-TA-10004

Description

Tests that where one component is a client of a service provided by a second component, both with Java implementations and which both run in the same JVM, and the client reference is marked with @AllowsPassByReference but the service implementation methods are not marked with @AllowsPassByReference that invocations of the service use "pass by value" semantics.

Artifacts

JCA_2009_TestCase.java

Test_JCA_2009.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

Service4.java

service1Impl7.java

service4Impl.java

Expected output

Positive test:

"JCA_2009 request service1 operation1 invoked service2 operation1 invoked request+1"

 

JCA_2010_TestCase

 

Testcase ID

JCA_2010_TestCase

Test Assertion

JCA-TA-2011, JCA-TA-10004

Description

Tests that where one component is a client of a service provided by a second component, both with Java implementations and which both run in the same JVM, and the service implementation methods are not marked with @AllowsPassByReference but the client reference is not marked with @AllowsPassByReference that invocations of the service use "pass by value" semantics.

Artifacts

JCA_2010_TestCase.java

Test_JCA_2010.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

Service4.java

service1Impl7b.java

service4Impl1.java

Expected output

Positive test:

"JCA_2010 request service1 operation1 invoked service2 operation1 invoked request+1"

 

 

2.2    Section 3

JCA_3001_TestCase

 

Testcase ID

JCA_3001_TestCase

Test Assertion

JCA-TA-3001

Description

Tests that a Java Interface class name is fully qualified on a service <interface.java> element

Artifacts

JCA_3001_TestCase.java

Test_JCA_3001.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1Impl.java

Expected output

Negative test:

“exception”

 

JCA_3002_TestCase

 

Testcase ID

JCA_3002_TestCase

Test Assertion

JCA-TA-3001

Description

Tests that a Java Interface is fully qualified on a reference <interface.java> element

Artifacts

JCA_3002_TestCase.java

Test_JCA_3002.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1Impl.java

Service1Impl2.java

Expected output

Negative test:

“exception”

 

JCA_3003_TestCase

 

Testcase ID

JCA_3003_TestCase

Test Assertion

JCA-TA-3002, JCA-TA-10031

Description

Tests that callback interfaces on a service are specified in their fully qualified form

Artifacts

JCA_3003_TestCase.java

Test_JCA_3003.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1CalbackImpl.java

Service3WithCallback.java

Service3Callback.java

service3Impl1.java

Expected output

Negative test:

“exception”

 

JCA_3004_TestCase

 

Testcase ID

JCA_3004_TestCase

Test Assertion

JCA-TA-3002, JCA-TA-10031

Description

Tests that callback interfaces on a reference are specified in their fully qualified form

Artifacts

JCA_3004_TestCase.java

Test_JCA_3004.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1CalbackImpl.java

Service3WithCallback.java

Service3Callback.java

service3Impl1.java

Expected output

Negative test:

“exception”

 

JCA_3005_TestCase

 

Testcase ID

JCA_3005_TestCase

Test Assertion

JCA-TA-3003, JCA-TA-10031

Description

Tests that callback interfaces specified in the composite match the callback interface specified in the service interface class

Artifacts

JCA_3005_TestCase.java

Test_JCA_3005.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1CalbackImpl.java

Service3WithCallback.java

Service3Callback.java

service3Impl1.java

Expected output

Positive test:

"JCA_3005 request service1 operation1 invoked service3 operation1 invoked service1 callback1 invoked"

 

JCA_3006_TestCase

 

Testcase ID

JCA_3006_TestCase

Test Assertion

JCA-TA-3003, JCA-TA-10031

Description

Tests that callback interfaces specified in the composite match the callback interface specified in the service interface class

Artifacts

JCA_3006_TestCase.java

Test_JCA_3006.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1CalbackImpl.java

Service3WithCallback.java

Service3Callback.java

service3Impl1.java

Expected output

Negative test:

"exception"

 

JCA_3007_TestCase

 

Testcase ID

JCA_3007_TestCase

Test Assertion

JCA-TA-3003, JCA-TA-10031

Description

Tests that callback interfaces specified in the composite match the callback interface specified in the reference interface class

Artifacts

JCA_3007_TestCase.java

Test_JCA_3007.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1CalbackImpl.java

Service3WithCallback.java

Service3Callback.java

service3Impl1.java

Expected output

Negative test:

"exception"

 

JCA_3008_TestCase

 

Testcase ID

JCA_3008_TestCase

Test Assertion

JCA-TA-3004

Description

Tests that <interface.java/> conforms to the schema

Artifacts

JCA_3008_TestCase.java

Test_JCA_3008.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Expected output

Negative test:

"exception"

 

JCA_3009_TestCase

 

Testcase ID

JCA_3009_TestCase

Test Assertion

JCA-TA-3005

Description

Tests that remotable attribute matches @Remotable annotation

Artifacts

JCA_3009_TestCase.java

Test_JCA_3009.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Expected output

Negative test:

"exception"

 

JCA_3010_TestCase

 

Testcase ID

JCA_3010_TestCase

Test Assertion

JCA-TA-3005

Description

Tests that remotable attribute matches @Remotable annotation

Artifacts

JCA_3010_TestCase.java

Test_JCA_3010.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1Impl.java

Expected output

Positive test:

"JCA_3010 request service1 operation1 invoked"

 

JCA_3011_TestCase

 

Testcase ID

JCA_3011_TestCase

Test Assertion

JCA-TA-3006

Description

Tests that a service interfaces doesn't contain forbidden annotations

Artifacts

JCA_3011_TestCase.java

Test_JCA_3011.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

JCA3011Service.java

JCA3011serviceImpl.java

Expected output

Negative test:

"exception"

 

JCA_3012_TestCase

 

Testcase ID

JCA_3012_TestCase

Test Assertion

JCA-TA-3007

Description

Tests that callback interfaces don't contain forbidden annotations

Artifacts

JCA_3012_TestCase.java

Test_JCA_3012.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service3WithCallback.java

Service1.java

service1CallbackImpl.java

Service3Callback.java

JCA3012Service3WithCallback.java

JCA3012Service3Callback.java

JCA3012service3Impl1.java

Expected output

Negative test:

"exception"

 

JCA_3013_TestCase

 

Testcase ID

JCA_3013_TestCase

Test Assertion

JCA-TA-3008

Description

Tests that where two Java interfaces are otherwise compatible, every method present in both interfaces where annotated with @OneWay in one interface is also annotated with @OneWay in the other interface

Artifacts

JCA_3013_TestCase.java

Test_JCA_3013.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

ServiceOneWayMissing.java

serviceOneWayImpl.java

Service1OneWayMissingCallerImpl.java

ServiceOneWay.java

Expected output

Negative test:

"exception"

 

JCA_3014_TestCase

 

Testcase ID

JCA_3014_TestCase

Test Assertion

JCA-TA-3009

Description

Tests that where an <interface.java/> element references a Java interface class which contains a @WebService annotation with a non-empty wsdlLocation property pointing at a WSDL document, it is treated as if it were an <interface.wsdl/> element with an @interface attribute identifying the portType in the WSDL document mapped from the Java interface class

Artifacts

JCA_3014_TestCase.java

Test_JCA_3014.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service3Operations.java

Service3OperationsWSDL.java

Service3OperationsWSDLImpl.java

Service1Calls3OperationsImpl.java

Service3OperationsWSDL.wsdl

Expected output

Negative test:

"exception"

 

 

2.3    Section 4

JCA_4001_TestCase

 

Testcase ID

JCA_4001_TestCase

Test Assertion

JCA-TA-4001, JCA-TA-10005, JCA-TA-10006

Description

Tests that for a stateless Java implementation, that all lifecycle stages are performed in the correct sequence and that no stage occurs out of sequence.

Artifacts

JCA_4001_TestCase.java

Test_JCA_4001.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1StatelessLifecycleImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4001 request Constructing property1 injected reference1 injected property2 injected reference2 injected Init invoked Init completed serviceLifecycle operation1 invoked service1 operation1 invoked service2 operation1 invoked service3 operation1 invoked prop1 prop2 prop3 Destroy invoked"

 

JCA_4002_TestCase

 

Testcase ID

JCA_4002_TestCase

Test Assertion

JCA-TA-4004

Description

Tests that where a stateless Java implementation throws an exception from its Constructor method, that the implementation transitions to the Terminating state

Artifacts

JCA_4002_TestCase.java

Test_JCA_4002.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1LifecycleExceptionsImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4002 request Constructing exception thrown"

 

JCA_4003_TestCase

 

Testcase ID

JCA_4003_TestCase

Test Assertion

JCA-TA-4010

Description

Tests that when a stateless Java implementation throws an exception when a property is injected, that the implementation transitions to the Destroying state

Artifacts

JCA_4003_TestCase.java

Test_JCA_4003.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1LifecycleExceptionsImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4003 request Constructing property1 injected reference1 injected property2 injected exception thrown Destroy invoked"

 

JCA_4004_TestCase

 

Testcase ID

JCA_4004_TestCase

Test Assertion

JCA-TA-4012

Description

Tests that where a Java implementation invokes an injected reference while in the initializing phase and the target of the reference has not been initialized, that the implementation receives a ServiceUnavailableException

Artifacts

JCA_4004_TestCase.java

Test_JCA_4004.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1LifecycleExceptionsImpl.java

service1UninitImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4004 request Constructing property1 injected reference1 injected property2 injected reference2 injected Init invoked calling uninitialized service ServiceUnavailable exception received Init completed serviceLifecycle operation1 invoked service1 operation1 invoked service2 operation1 invoked service3 operation1 invoked prop1 prop2 prop3 Destroy invoked"

 

JCA_4005_TestCase

 

Testcase ID

JCA_4005_TestCase

Test Assertion

JCA-TA-4015

Description

Tests that where a Java implementation throws an exception from the method marked with the @Init annotation, that the implementation transitions to the Destroying state

Artifacts

JCA_4005_TestCase.java

Test_JCA_4005.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1LifecycleExceptionsImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4005 request Constructing property1 injected reference1 injected property2 injected reference2 injected Init invoked exception thrown Destroy invoked"

 

JCA_4006_TestCase

 

Testcase ID

JCA_4006_TestCase

Test Assertion

JCA-TA-4019

Description

Tests that a Java implementation in the Destroying state which invokes a method on a reference whose target service has already been destroyed receives an InvalidServiceException

Artifacts

JCA_4006_TestCase.java

Test_JCA_4006.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1StatelessLifecycleImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4006 request Constructing property1 injected reference1 injected property2 injected reference2 injected Init invoked Init completed serviceLifecycle operation1 invoked service1 operation1 invoked service2 operation1 invoked service3 operation1 invoked prop1 prop2 prop3 Destroy invoked"

 

JCA_4007_TestCase

 

Testcase ID

JCA_4007_TestCase

Test Assertion

JCA-TA-4022

Description

Tests that where a Java implementation throws an exception from its method marked with the @Destroy annotation, that the implementation transitions to the terminated state

Artifacts

JCA_4007_TestCase.java

Test_JCA_4007.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1LifecycleExceptionsImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4007 request Constructing property1 injected reference1 injected property2 injected reference2 injected Init invoked Init completed serviceLifecycle operation1 invoked service1 operation1 invoked service2 operation1 invoked service3 operation1 invoked prop1 prop2 prop3 Destroy invoked exception thrown"

 

JCA_4008_TestCase

 

Testcase ID

JCA_4008_TestCase

Test Assertion

JCA-TA-4024

Description

Tests that when a stateless Java implementation throws an exception when a  reference is injected, that the implementation transitions to the Destroying state

Artifacts

JCA_4008_TestCase.java

Test_JCA_4008.composite

TestInvocation.wsdl

TestClient_0002.composite

JCA_0002_Client.java

Service1.wsdl

DataStore.java

lifecycleControllerImpl.java

service1LifecycleExceptionsImpl.java

service1Impl.java

dataStoreCompositeImpl.java

Expected output

"JCA_4008 request Constructing property1 injected reference1 injected property2 injected reference2 injected exception thrown Destroy invoked"

 

2.4    Section 5

JCA_7001_TestCase

 

Testcase ID

JCA_7001_TestCase

Test Assertion

JCA-TA-7001
JCA-TA-7002

Description

Tests that where a Java implementation offers a bidirectional service and has fields and setter methods annotated with @Callback, when the bidirectional service is invoked, a callback reference object is injected into those fields and setter methods which have a type which is the interface for the callback service but null is injected into fields and setter methods which have a different type.

Artifacts

JCA_7001_TestCase.java

Test_JCA_7001.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

Service3WithCallback.java

Service3Callback.java

Service7WithCallback.java

Service7Callback.java

service1CallbackImpl.java

MultipleCallbacksImpl.java

Expected output

"JCA_7001 request service1 operation1 invoked service2 operation1 invoked callback1 invoked other callbacks null";

 

JCA_7002_TestCase

 

Testcase ID

JCA_7002_TestCase

Test Assertion

JCA-TA-7002

Description

Tests that where a Java implementation offers a bidirectional service and also has one non-bidirectional service and has fields and setter methods annotated with @Callback, when the non-bidirectional service is invoked, null is injected into all the fields and setter methods annotated with @Callback

Artifacts

JCA_7002_TestCase.java

Test_JCA_7002.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

Service3WithCallback.java

Service3Callback.java

Service7WithCallback.java

Service7Callback.java

service1CallbackImpl.java

MultipleCallbacksImpl.java

Expected output

"JCA_7002 request service1 operation1 invoked service2 operation1 invoked callback1 invoked other callbacks null";

 

JCA_7003_TestCase

 

Testcase ID

JCA_7003_TestCase

Test Assertion

JCA-TA-7003
JCA-TA-7004
JCA-TA-7005
JCA-TA-7007

Description

Tests that where a Java interface class is an asynchronous service mapping of a WSDL portType containing request/response operations that the class is annotated with the "asyncInvocation" intent

Artifacts

JCA_7003_TestCase.java

Test_JCA_7003.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1AsyncServer.java

Service1AsyncServerImpl.java

Expected output

"JCA_7003 request service1 operation1 invoked asynchronously"

 

JCA_7004_TestCase

 

Testcase ID

JCA_7004_TestCase

Test Assertion

JCA-TA-7003

Description

Tests that where a Java interface class is an asynchronous service mapping of a WSDL portType containing request/response operations that the class is annotated with the "asyncInvocation" intent - this is the negative version of JCA_7003_Testcase where the asyncInvocation intent is left off the interface class

Artifacts

JCA_7004_TestCase.java

Test_JCA_7004.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1AsyncServerError.java

Service1AsyncServerErrorImpl.java

Expected output

"exception"

 

JCA_7005_TestCase

 

Testcase ID

JCA_7005_TestCase

Test Assertion

JCA-TA-7006

Description

Tests that when an asynchronous service implementation invokes the sendResponse method of the supplied ResponseDispatch.object when that method has already been called once, the method throws an IllegalStateException

Artifacts

JCA_7005_TestCase.java

Test_JCA_7005.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1AsyncServer.java

Service1AsyncServerMultiReponseImpl.java

asyncControllerImpl.java

dataStoreCompositeImpl.java

Expected output

"JCA_7005 request service1 operation1 invoked asynchronously IllegalStateException thrown on second invocation of ResponseDispatch.sendResponse() method"

 

JCA_7006_TestCase

 

Testcase ID

JCA_7006_TestCase

Test Assertion

JCA-TA-9068
JCA-TA-9069

Description

Tests that when an asynchronous service implementation invokes the sendFault method of the supplied ResponseDispatch.object that the exception is sent to the client of the service operation and if the sendFault method is subsequently invoked a second time when that method has already been called once for a given ResponseDispatch object, the method throws an IllegalStateException

Artifacts

JCA_7006_TestCase.java

Test_JCA_7006.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1AsyncServer.java

Service1AsyncServerMultiFaultImpl.java

asyncControllerImpl.java

dataStoreCompositeImpl.java

Expected output

"JCA_7005 request service1 operation1 invoked asynchronously IllegalStateException thrown on second invocation of ResponseDispatch.sendResponse() method"

 

 

 

2.5    Section 8

JCA_8001_TestCase

 

Testcase ID

JCA_8001_TestCase

Test Assertion

JCA-TA-8001

Description

Tests that intent annotations use the @Intent annotation in the definition of the annotation.  In this testcase, two mutually exclusive intents are defined in the domain. One of them is also defined as a Java annotation using the @Intent definition. TEST_JCA_8001Component1 requires both mutually exclusive intents (one in the SCDL, one in the Java implementation class) and should flag an error that mutually exclusive intents are not allowed.

Artifacts

JCA_8001_TestCase.java

Test_JCA_8001.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

Service1Intent.java

TestIntent2.java

definitions.xml

Expected output

Negative test:

"exception"

 

JCA_8002_TestCase

 

Testcase ID

JCA_8002_TestCase

Test Assertion

JCA-TA-8002

Description

Tests that intent annotations cannot be used on methods which are not reference setter methods.

Artifacts

JCA_8002_TestCase.java

Test_JCA_8002.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

TestIntent2.java

service1BadIntent.java

Expected output

Negative test:

"exception"

 

JCA_8003_TestCase

 

Testcase ID

JCA_8003_TestCase

Test Assertion

JCA-TA-8003

Description

Tests that intent annotations cannot be used on fields which are not references.

Artifacts

JCA_8003_TestCase.java

Test_JCA_8003.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

TestIntent2.java

service1BadIntent.java

Expected output

Negative test:

"exception"

 

JCA_8004_TestCase

 

Testcase ID

JCA_8004_TestCase

Test Assertion

JCA-TA-8004

Description

Tests that intent annotations cannot be used on constructor parameters  which are not references.

Artifacts

JCA_8004_TestCase.java

Test_JCA_8004.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

TestIntent2.java

service1BadIntent.java

Expected output

Negative test:

"exception"

 

JCA_8005_TestCase

 

Testcase ID

JCA_8005_TestCase

Test Assertion

JCA-TA-8002, JCA-TA-8003, JCA-TA-8004

Description

Tests that intent annotations can be used to annotate every place that a reference is allowed (setter method, field, or constructor parameter).

Artifacts

JCA_8005_TestCase.java

Test_JCA_8005.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

TestIntent2.java

service1GoodIntent.java

Expected output

Positive test:

"JCA_8005 request service1 operation1 invoked service2 operation1 invoked service3 operation1 invoked service4 operation1 invoked"

 

JCA_8006_TestCase

 

Testcase ID

JCA_8006_TestCase

Test Assertion

JCA-TA-8005

Description

Tests that intent annotations are merged together (unioned) when present on the same Java element.  In this testcase, two mutually exclusive intents are placed on the same Java element. When the runtime correctly merges them, an error should result.

Artifacts

JCA_8006_TestCase.java

Test_JCA_8006.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

TestIntent1.java

TestIntent2.java

service1BadIntent.java

definitions.xml

Expected output

Negative test:

"exception"

 

JCA_8007_TestCase

 

Testcase ID

JCA_8007_TestCase

Test Assertion

JCA-TA-8006

Description

Tests that intent annotations are correctly merged when they appear at different levels in a Java interface class. PolicySet1 satisfies testIntent3 which is the only intent that should be applicable to the service after the intents in Service5Intents are normalized.

Artifacts

JCA_8007_TestCase.java

Test_JCA_8007.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

TestIntent3.java

TestIntent4.java

service5Impl2.java

service5Impl.java

Service5Intents.java

definitions.xml

Expected output

Positive test:

"JCA_8007 request service1 operation1 invoked service2 operation1 invoked"

 

JCA_8008_TestCase

 

Testcase ID

JCA_8008_TestCase

Test Assertion

JCA-TA-8007

Description

Tests that policySets cannot be used on methods which are not reference setter methods.

Artifacts

JCA_8008_TestCase.java

Test_JCA_8008.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1BadPolicySet.java

definitions.xml

Expected output

Negative test:

"exception"

 

JCA_8009_TestCase

 

Testcase ID

JCA_8009_TestCase

Test Assertion

JCA-TA-8008

Description

Tests that policySets cannot be used on fields which are not references.

Artifacts

JCA_8009_TestCase.java

Test_JCA_8009.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1BadPolicySet.java

definitions.xml

Expected output

Negative test:

"exception"

 

 

Testcase ID

JCA_8010_TestCase

Test Assertion

JCA-TA-8009

Description

Tests that policySets cannot be used on constructor parameters which are not references.

Artifacts

JCA_8010_TestCase.java

Test_JCA_8010.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service1BadPolicySet.java

definitions.xml

Expected output

Negative test:

"exception"

 

JCA_8011_TestCase

 

Testcase ID

JCA_8011_TestCase

Test Assertion

JCA-TA-8010

Description

Tests that policySet annotations are correctly merged when they appear at different levels in a Java interface class. PolicySet1 satisfies testIntent3 and PolicySet2 satisfies testIntent5.

Artifacts

JCA_8010_TestCase.java

Test_JCA_8010.composite

TestInvocation.wsdl

TestClient_0002.composite

ASM_0002_Client.java

Service1.java

service6Impl.java

service6Impl2.java

Service6PolicySets.java

TestIntent3.java

TestIntent4.java

definitions.xml

Expected output

Positive test:

"JCA_8011 request service1 operation1 invoked service2 operation1 invoked"

 

 

2.6    Section 9

JCA_9001_TestCase

 

Testcase ID

JCA_9001_TestCase

Test Assertion

JCA-TA-9001

Description

Tests that if an invocation of the getService() method of the ComponentContext API is made for a reference that is 0..n or 1..n multiplicity, that the caller receives an IllegalArgumentException

Artifacts

JCA_9001_TestCase.java

Test_JCA_9001.composite

TestInvocation.wsdl

TestClient_0002.composite

 

Service1.java

service1ContextImpl1.java

service1Impl.java

Expected output

Positive test:

"JCA_9001 request invokerService operation1 invoked IllegalArgumentException received"

 

JCA_9002_TestCase

 

Testcase ID

JCA_9002_TestCase

Test Assertion

JCA-TA-9002

Description

Tests that if an invocation of the getRequestContext() method of the ComponentContext API is made during the execution of a Java business method of a service operation on the same Java thread used to invoke the business method, then a non-null value is returned for the RequestContext

Artifacts

JCA_9002_TestCase.java

Test_JCA_9002.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

service1ContextImpl1.java

service1Impl.java

Expected output

Positive test:

"JCA_9002 request service1 operation1 invoked RequestContext - serviceName: Service1"

 

JCA_9003_TestCase

 

Testcase ID

JCA_9003_TestCase

Test Assertion

JCA-TA-9003

Description

Tests that if an invocation of the getServiceReference() method of the RequestContext API is made during the execution of a Java business method, then the method returns a ServiceReference object that represents the service that was invoked

Artifacts

JCA_9003_TestCase.java

Test_JCA_9003.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

Service1Superset.java

service1RequestContextImpl2.java

Expected output

Positive test:

"JCA_9003 request service1 operation1 invoked ServiceReference obtained: service1 checkService operation2 invoked"

 

JCA_9004_TestCase

 

Testcase ID

JCA_9004_TestCase

Test Assertion

JCA-TA-9004

Description

Tests that if an invocation of the getServiceReference() method of the RequestContext API is made during the execution of a Java business method of a callback, then the method returns a ServiceReference object that represents the callback that was invoked

Artifacts

JCA_9004_TestCase.java

Test_JCA_9004.composite

TestInvocation.wsdl

TestClient_0002.composite

Service1.java

Service3WithCallback.java

Service3Callback.java

service1CallbackContextImpl1.java

service3Impl1.java

Expected output

Positive test:

"JCA_9004 request serviceComposite1 operation1 invoked callbackService operation1 invokedserviceComposite1 callback1 invoked ServiceReference obtained: serviceComposite1 check callback1 invoked"

 

JCA_9005_TestCase