summaryrefslogtreecommitdiffstats
path: root/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test')
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java83
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java104
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java31
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/GreetingCallback.java24
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java34
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java33
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Bar.java58
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java103
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Echo.java29
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoComponent.java33
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoImpl.java29
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Foo.java36
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.java29
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldComponent.java33
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldMultiService.java51
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java83
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM.java30
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM2.java30
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMComponent.java34
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMService.java41
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java64
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldService.java28
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java52
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java64
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java104
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java104
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java133
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java74
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java70
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiServiceTestCase.java24
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleServiceTestCase.java24
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURITestCase.java24
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURITestCase.java24
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java53
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferClient.java36
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCaseOFF.java81
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferService.java32
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java53
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java35
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java29
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java59
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java21
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCaseOFF.java70
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ClientPWCBHandler.java45
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/IntegrityPWCBHandler.java45
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ServerPWCBHandler.java45
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthenticationTestCaseFIXME.java24
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java42
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrityTestCaseOFF.java24
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCaseOFF.java73
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ClientPWCBHandler.java50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/IntegrityPWCBHandler.java50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ServerPWCBHandler.java49
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixedTestCase.java27
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCaseOFF.java70
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ClientPWCBHandler.java45
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/IntegrityPWCBHandler.java45
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ServerPWCBHandler.java45
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthenticationTestCaseOFF.java27
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java42
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrityTestCaseOFF.java27
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCaseOFF.java63
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCaseOFF.java144
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler20
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite47
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite53
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd36
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdefs.xsd27
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd31
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite53
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite51
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite51
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/helloworld-om-relative-uri.wsdl78
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite48
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-binding.wsdl45
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite43
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-porttype.wsdl59
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-uri.wsdl78
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite42
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.wsdl78
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite46
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.wsdl81
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld.wsdl86
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransfer.wsdl84
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.compositeOFF42
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite32
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite.OFF51
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite.OFF50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite.OFF50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml101
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties20
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jksbin0 -> 1379 bytes
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml32
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite.OFF53
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml323
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties20
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jksbin0 -> 1379 bytes
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite.OFF51
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite.OFF50
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite.OFF51
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml203
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jksbin0 -> 1379 bytes
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl70
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl49
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl94
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite31
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite31
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite33
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite.OFF72
-rw-r--r--tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite.OFF41
113 files changed, 6005 insertions, 0 deletions
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java
new file mode 100644
index 0000000000..2ce23bf2c4
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import junit.framework.TestCase;
+
+public class Axis2ReferenceTestCase extends TestCase {
+
+ public void testInvokeService() throws Exception {
+// Axis2ReferenceBinding axis2Reference = createAxis2Reference("testWebAppName", "testServiceName");
+// ServiceContract contract = new JavaServiceContract();
+// Operation operation = new Operation<Type>("sayHi", null, null, null, false, null, NO_CONVERSATION);
+// TargetInvoker targetInvoker = axis2Reference.createTargetInvoker(contract, operation);
+// assertNotNull(targetInvoker);
+// assertFalse(targetInvoker instanceof Axis2AsyncTargetInvoker);
+ }
+
+ public void testAsyncTargetInvoker() throws Exception {
+// Axis2ReferenceBinding axis2Reference = createAxis2Reference("testWebAppName", "testServiceName");
+// //Create a mocked InboundWire, make the call of ServiceBindingExtension.getInterface() returns a Class
+// Wire inboundWire = EasyMock.createNiceMock(Wire.class);
+// JavaServiceContract contract = new JavaServiceContract(Greeter.class);
+// contract.setCallbackName("");
+// contract.setCallbackClass(GreetingCallback.class);
+// Operation<Type> callbackOp =
+// new Operation<Type>("sayHiCallback", null, null, null, true, null, NO_CONVERSATION);
+// HashMap<String, Operation<Type>> callbackOps = new HashMap<String, Operation<Type>>();
+// callbackOps.put("sayHiCallback", callbackOp);
+// contract.setCallbackOperations(callbackOps);
+// EasyMock.expect(inboundWire.getTargetContract()).andReturn(contract).anyTimes();
+// EasyMock.replay(inboundWire);
+//
+// axis2Reference.setWire(inboundWire);
+// Operation operation = new Operation<Type>("sayHi", null, null, null, true, null, NO_CONVERSATION);
+// TargetInvoker asyncTargetInvoker = axis2Reference.createTargetInvoker(contract, operation);
+// assertNotNull(asyncTargetInvoker);
+// assertTrue(asyncTargetInvoker instanceof Axis2AsyncTargetInvoker);
+ }
+
+// @SuppressWarnings("unchecked")
+// private Axis2ReferenceBinding createAxis2Reference(String webAppName, String serviceName) throws Exception {
+// //Create WebServiceBindingDefinition
+// String wsdlLocation = "/wsdl/hello_world_doc_lit.wsdl";
+// URL url = getClass().getResource(wsdlLocation);
+// assertNotNull("Could not find wsdl " + url.toString(), url);
+//
+// WSDLFactory factory = WSDLFactory.newInstance();
+// WSDLReader reader = factory.newWSDLReader();
+// reader.setFeature("javax.wsdl.verbose", false);
+// InputSource input = new InputSource(url.openStream());
+// Definition wsdlDef = reader.readWSDL(url.toString(), input);
+// Service wsdlService = wsdlDef.getService(new QName("http://objectweb.org/hello_world_soap_http",
+// "SOAPService"));
+// Port port = wsdlService.getPort("SoapPort");
+// WebServiceBindingDefinition wsBinding =
+// new WebServiceBindingDefinition(wsdlDef, port, "uri", "portURI", wsdlService);
+// //Create a mocked WireService, make the call of ServiceBindingExtension.getServiceInstance() returns a proxy instance.
+// // TODO figure out what to do with the service contract
+// ServiceContract<?> contract = new WSDLServiceContract();
+// contract.setInterfaceClass(Greeter.class);
+// return new Axis2ReferenceBinding(URI.create(serviceName),
+// wsBinding,
+// contract,
+// null,
+// null);
+// }
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java
new file mode 100644
index 0000000000..d4d20414e5
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import junit.framework.TestCase;
+
+public class Axis2ServiceTestCase extends TestCase {
+
+ public void testInvokeService() throws Exception {
+// TestServletHost tomcatHost = new TestServletHost();
+// Axis2ServiceBinding axis2Service = createAxis2Service("testServiceName", tomcatHost, false);
+// axis2Service.start();
+//
+// if (true) return;
+// Servlet servlet = tomcatHost.getMapping("testWebAppName/serviceBindings/testServiceName");
+// assertNotNull(servlet);
+//
+// //Create mocked HttpRequest and HttpResponse object to test the Axis2Servlet
+// //To be done:
+
+ }
+
+ public void testAsyncMessageReceiver() throws Exception {
+
+// TestServletHost tomcatHost = new TestServletHost();
+// Axis2ServiceBinding axis2Service = createAxis2Service("testServiceName", tomcatHost, true);
+// axis2Service.start();
+ }
+
+// @SuppressWarnings("unchecked")
+// private Axis2ServiceBinding createAxis2Service(String serviceName, ServletHost tomcatHost, boolean callback)
+// throws Exception {
+// //Create WebServiceBindingDefinition
+// String wsdlLocation = "/wsdl/hello_world_doc_lit.wsdl";
+// URL url = getClass().getResource(wsdlLocation);
+// assertNotNull("Could not find wsdl " + url.toString(), url);
+//
+// WSDLFactory factory = WSDLFactory.newInstance();
+// WSDLReader reader = factory.newWSDLReader();
+// reader.setFeature("javax.wsdl.verbose", false);
+// InputSource input = new InputSource(url.openStream());
+// Definition wsdlDef = reader.readWSDL(url.toString(), input);
+// Service wsdlService = wsdlDef.getService(new QName("http://objectweb.org/hello_world_soap_http",
+// "SOAPService"));
+// Port port = wsdlService.getPort("SoapPort");
+// WebServiceBindingDefinition wsBinding = new WebServiceBindingDefinition(wsdlDef, port, "uri", "portURI", wsdlService);
+//
+// //Create a mocked WireService, make the call of ServiceBindingExtension.getServiceInstance() returns a proxy instance.
+//// WireService wireService = EasyMock.createNiceMock(WireService.class);
+//// wireService.createProxy(EasyMock.isA(Class.class), EasyMock.isA(Wire.class));
+//// EasyMock.expectLastCall().andReturn(null);
+//// EasyMock.replay(wireService);
+//
+// //Create a mocked InboundWire, make the call of ServiceBindingExtension.getInterface() returns a Class
+// Wire inboundWire = EasyMock.createNiceMock(Wire.class);
+// JavaServiceContract contract = new JavaServiceContract(Greeter.class);
+// Map<String, Operation<Type>> opMap = new HashMap<String, Operation<Type>>();
+// for (Method m : Greeter.class.getMethods()) {
+// opMap.put(m.getName(), new Operation<Type>(m.getName(), null, null, null));
+// }
+// contract.setOperations(opMap);
+// EasyMock.expect(inboundWire.getTargetContract()).andReturn(contract).anyTimes();
+// if (callback) {
+// contract.setCallbackName("");
+// }
+// EasyMock.replay(inboundWire);
+//
+// Wire outboundWire = EasyMock.createNiceMock(Wire.class);
+// Map<Operation<?>, InvocationChain> map = new HashMap<Operation<?>, InvocationChain>();
+// EasyMock.expect(outboundWire.getInvocationChains()).andReturn(map).once();
+// EasyMock.replay(outboundWire);
+//
+// TuscanyAxisConfigurator tuscanyAxisConfigurator = new TuscanyAxisConfigurator();
+// ConfigurationContext configurationContext = tuscanyAxisConfigurator.getConfigurationContext();
+// Axis2ServiceBinding axis2Service =
+// new Axis2ServiceBinding(URI.create(serviceName),
+// contract,
+// null,
+// wsBinding,
+// tomcatHost,
+// configurationContext, null);
+// axis2Service.setWire(inboundWire);
+//// axis2Service.setOutboundWire(outboundWire);
+//
+// return axis2Service;
+// }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java
new file mode 100644
index 0000000000..767f59646f
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+public interface Greeter {
+
+ String sayHi();
+
+ String greetMe(String requestType);
+
+ void greetMeOneWay(String requestType);
+
+ void greetMeWithCallback(String requestType);
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/GreetingCallback.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/GreetingCallback.java
new file mode 100644
index 0000000000..e5e76af0b7
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/GreetingCallback.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+public interface GreetingCallback {
+
+ void greetMeCallback(String greetMeResponse);
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java
new file mode 100644
index 0000000000..40d769d83a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Account {
+
+ CustomerProfileData getCustomerProfile(String loginID);
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java
new file mode 100644
index 0000000000..5edb4ddc5a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class AccountService implements Account {
+
+ public CustomerProfileData getCustomerProfile(String loginID) {
+ return new CustomerProfileData(loginID);
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Bar.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Bar.java
new file mode 100644
index 0000000000..2dc7d8dee4
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Bar.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import java.io.Serializable;
+
+public class Bar implements Serializable {
+ private static final long serialVersionUID = 1249963611910502668L;
+
+ private String s;
+ private int x;
+ private Integer y;
+
+ private Boolean b;
+
+ public Boolean getB() {
+ return b;
+ }
+ public void setB(Boolean b) {
+ this.b = b;
+ }
+ public String getS() {
+ return s;
+ }
+ public void setS(String s) {
+ this.s = s;
+ }
+ public int getX() {
+ return x;
+ }
+ public void setX(int x) {
+ this.x = x;
+ }
+ public Integer getY() {
+ return y;
+ }
+ public void setY(Integer y) {
+ this.y = y;
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java
new file mode 100644
index 0000000000..5c1ee6a435
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class CustomerProfileData {
+
+ private String firstName;
+ private String lastName;
+ private String address;
+ private String email;
+ private String loginID;
+ private String password;
+ private int id;
+
+ public CustomerProfileData(String loginID) {
+ firstName = "John";
+ lastName = "Doe";
+ address = "345 Main Street";
+ email = "john@doe.org";
+ this.loginID = loginID;
+ password = "hello";
+ id = 1234;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String firstName) {
+ this.lastName = lastName;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getLoginID() {
+ return loginID;
+ }
+
+ public void setLoginID(String loginID) {
+ this.loginID = loginID;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Echo.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Echo.java
new file mode 100644
index 0000000000..4e1e7dbdad
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Echo.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Echo {
+
+ Foo echoFoo(Foo foo);
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoComponent.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoComponent.java
new file mode 100644
index 0000000000..3e96480c20
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoComponent.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class EchoComponent implements Echo {
+
+ @Reference
+ public Echo echoWS;
+
+ public Foo echoFoo(Foo foo) {
+ return echoWS.echoFoo(foo);
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoImpl.java
new file mode 100644
index 0000000000..d028ced69e
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/EchoImpl.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+
+public class EchoImpl implements Echo {
+
+ public Foo echoFoo(Foo foo) {
+ return foo;
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Foo.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Foo.java
new file mode 100644
index 0000000000..c7b503af17
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Foo.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import java.io.Serializable;
+
+public class Foo implements Serializable {
+ private static final long serialVersionUID = 4879476066850018458L;
+
+ private Bar[] bars;
+
+ public Bar[] getBars() {
+ return bars;
+ }
+
+ public void setBars(Bar[] bars) {
+ this.bars = bars;
+ }
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.java
new file mode 100644
index 0000000000..3ac30780b3
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ String getGreetings(String s);
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldComponent.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldComponent.java
new file mode 100644
index 0000000000..0dd6e90c72
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldComponent.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldComponent implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ return helloWorldWS.getGreetings(s);
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldMultiService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldMultiService.java
new file mode 100644
index 0000000000..f30286feea
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldMultiService.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+
+public class HelloWorldMultiService implements HelloWorldOM, HelloWorldOM2 {
+
+ public OMElement getGreetings(OMElement requestOM) {
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello " + name));
+
+ return responseOM;
+ }
+
+ public OMElement getGreetings2(OMElement requestOM) {
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello2 " + name));
+
+ return responseOM;
+ }
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java
new file mode 100644
index 0000000000..09b414b2d8
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDLTestCase.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests ;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloWorldNoWSDLTestCase extends TestCase {
+
+ private Node node;
+
+ public void testHelloWorld() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ /**
+ * Test a a WS call with a complex type
+ */
+ public void testEchoFoo() throws Exception {
+ Echo echo = node.getService(Echo.class, "EchoComponent");
+
+ Foo f = new Foo();
+ Bar b1 = new Bar();
+ b1.setS("petra");
+ b1.setX(1);
+ b1.setY(new Integer(2));
+ b1.setB(Boolean.TRUE);
+ Bar b2 = new Bar();
+ b2.setS("beate");
+ b2.setX(3);
+ b2.setY(new Integer(4));
+ b2.setB(Boolean.FALSE);
+ f.setBars(new Bar[] { b1, b2} );
+
+ Foo f2 = echo.echoFoo(f);
+
+ assertEquals("petra", f2.getBars()[0].getS());
+ assertEquals(1, f2.getBars()[0].getX());
+ assertEquals(2, f2.getBars()[0].getY().intValue());
+ assertTrue(f2.getBars()[0].getB().booleanValue());
+ assertEquals("beate", f2.getBars()[1].getS());
+ assertEquals(3, f2.getBars()[1].getX());
+ assertEquals(4, f2.getBars()[1].getY().intValue());
+ assertFalse(f2.getBars()[1].getB().booleanValue());
+
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM.java
new file mode 100644
index 0000000000..13a16c8e8a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldOM {
+
+ OMElement getGreetings(OMElement parmE);
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM2.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM2.java
new file mode 100644
index 0000000000..0e50781061
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOM2.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface HelloWorldOM2 {
+
+ OMElement getGreetings2(OMElement parmE);
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMComponent.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMComponent.java
new file mode 100644
index 0000000000..82f61bd7c2
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMComponent.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.apache.axiom.om.OMElement;
+import org.oasisopen.sca.annotation.Reference;
+
+public class HelloWorldOMComponent implements HelloWorldOM {
+
+ @Reference
+ public HelloWorldOM helloWorldWS;
+
+ public OMElement getGreetings(OMElement om) {
+ return helloWorldWS.getGreetings(om);
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMService.java
new file mode 100644
index 0000000000..71d7bf68fb
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMService.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+
+public class HelloWorldOMService implements HelloWorldOM {
+
+ public OMElement getGreetings(OMElement requestOM) {
+ System.out.println(" **** getGreetings **** ");
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello " + name));
+
+ return responseOM;
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java
new file mode 100644
index 0000000000..4bb5bdb87d
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldOMTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloWorldOMTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorldOM helloWorld;
+
+ public void testHelloWorld() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldService.java
new file mode 100644
index 0000000000..017d9bb478
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldService.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java
new file mode 100644
index 0000000000..b7146098ec
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldTestCase.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloWorldTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java
new file mode 100644
index 0000000000..a239d95c3a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldWSDLMergedTestCase.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloWorldWSDLMergedTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorldOM helloWorld;
+
+ public void testHelloWorld() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldWSDLMergedComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
new file mode 100644
index 0000000000..15807c76de
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCase.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.transport.http.server.HttpUtils;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class QuestionMarkWSDLImportTestCase extends TestCase {
+
+ private Node node;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLImportPortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8086/AccountService?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose", false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments", true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8086/AccountService?wsdl");
+ assertNotNull(definition);
+ // TODO - EPR - $promoted$ no longer used
+ //Service service = definition.getService(new QName("http://account2/AccountService/$promoted$ep1", "AccountService"));
+ Service service = definition.getService(new QName("http://account2/AccountService/Account", "AccountService"));
+ Port port = service.getPort("AccountSoapPort");
+
+ String endpoint = getEndpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8086/AccountService", endpoint);
+ }
+
+ private String getEndpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
new file mode 100644
index 0000000000..fd95ff7473
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCase.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.transport.http.server.HttpUtils;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev: 660340 $ $Date: 2008-05-27 01:08:32 +0100 (Tue, 27 May 2008) $
+ */
+public class QuestionMarkWSDLIncludeTestCase extends TestCase {
+
+ private Node node;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLIncludePortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8085/AccountService?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose", false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments", true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/AccountService?wsdl");
+ assertNotNull(definition);
+ // TODO - EPR - $promoted$ no longer used
+ //Service service = definition.getService(new QName("http://accounts/AccountService/$promoted$ep1", "AccountService"));
+ Service service = definition.getService(new QName("http://accounts/AccountService/Account", "AccountService"));
+ Port port = service.getPort("AccountSoapPort");
+
+ String endpoint = getEndpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8085/AccountService", endpoint);
+ }
+
+ private String getEndpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
new file mode 100644
index 0000000000..bbec9dd342
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLTestCase.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.transport.http.server.HttpUtils;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class QuestionMarkWSDLTestCase extends TestCase {
+
+ private Node node;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLPortEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8085/services/HelloWorldWebService?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/services/HelloWorldWebService?wsdl");
+ assertNotNull(definition);
+ // TODO - EPR - $promoted$ no longer used
+ //Service service = definition.getService(new QName("http://helloworld/HelloWorldService/$promoted$ep1",
+ // "HelloWorldService"));
+ Service service = definition.getService(new QName("http://helloworld/HelloWorldService/HelloWorld",
+ "HelloWorldService"));
+ Port port = service.getPort("HelloWorldSoapPort");
+
+ String endpoint = getEndpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8085/services/HelloWorldWebService", endpoint);
+ }
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from binding.ws with a custom URI
+ */
+ public void testCustomEndpoint() throws Exception {
+ InputStream inp = new URL("http://localhost:8085/foo/bar?wsdl").openStream();
+ BufferedReader br = new BufferedReader(new InputStreamReader(inp));
+ String line;
+ while((line = br.readLine()) != null) {
+ System.out.println(line);
+ }
+ br.close();
+
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/foo/bar?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://itests.axis2.ws.binding.sca.tuscany.apache.org/",
+ "HelloWorldService"));
+ Port port = service.getPort("HelloWorldPort");
+
+ String endpoint = getEndpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8085/foo/bar", endpoint);
+ }
+
+ protected String getEndpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java
new file mode 100644
index 0000000000..01abbd5382
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/UriPrecedenceTestCase.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.oasisopen.sca.ServiceRuntimeException;
+
+/**
+ * This test verifies that the Endpoint URI specified in the wsdl takes precedence over the URI specified
+ * in binding. Ref: WS Binding Specification V1.00 - Section 2.1.1
+ *
+ * @version $Rev$ $Date$
+ */
+public class UriPrecedenceTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorldOM helloWorld;
+
+ public void testUriPrecedence() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-prec", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-prec", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ try {
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ } catch (ServiceRuntimeException e) {
+ fail("Endpoint URI from wsdl did not take precedence over URI in binding.");
+ }
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
new file mode 100644
index 0000000000..a41e0fd2c9
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public abstract class AbstractHelloWorldOMTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorldOM helloWorld;
+
+ public void testCalculator() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+ protected String getCompositeName() {
+ String className = this.getClass().getName();
+ return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiServiceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiServiceTestCase.java
new file mode 100644
index 0000000000..661afdddad
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiServiceTestCase.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints;
+
+public class DefaultMultiServiceTestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleServiceTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleServiceTestCase.java
new file mode 100644
index 0000000000..9b2e0eafa0
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleServiceTestCase.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints;
+
+public class DefaultSingleServiceTestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURITestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURITestCase.java
new file mode 100644
index 0000000000..98d9a73926
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURITestCase.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints;
+
+public class WSDLExplicitURITestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURITestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURITestCase.java
new file mode 100644
index 0000000000..201d11a79f
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURITestCase.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.endpoints;
+
+public class WSDLRelativeURITestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java
new file mode 100644
index 0000000000..23dcd5ff6d
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorldTestCase.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.epr;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloWorldTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite", new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferClient.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferClient.java
new file mode 100644
index 0000000000..5aefaac9ee
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferClient.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
+
+import javax.activation.DataHandler;
+import org.oasisopen.sca.annotation.Reference;
+
+/**
+ * This client program shows how to create an SCA runtime, start it,
+ * locate the FileTransfer service and invoke it.
+ */
+public class FileTransferClient implements FileTransferService {
+
+ @Reference
+ public FileTransferService fileTransferWS;
+
+ public String uploadFile(DataHandler attachment) throws Exception {
+ return fileTransferWS.uploadFile(attachment);
+ }
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCaseOFF.java
new file mode 100644
index 0000000000..f14229c541
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferMTOMTestCaseOFF.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
+
+import javax.activation.DataHandler;
+import javax.activation.FileDataSource;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.equinox.launcher.Contribution;
+import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher;
+
+// Removed imports of old host.embedded function
+// import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ *
+ * Modified by Mike Edwards, 4th Dec 2008, to adjust to new interfaces in the 2.0 stream.
+ *
+ */
+public class FileTransferMTOMTestCaseOFF extends TestCase {
+
+ // private SCADomain domain;
+ protected NodeLauncher launcher;
+ protected Node node;
+
+ public void testFileTransfer() throws Exception {
+ // For testing purpose lets try uploading FileTransferClient.java file.
+ DataHandler dataHandler = new DataHandler(new FileDataSource("FileTransferClient.java"));
+ FileTransferService filetransfer = node.getService(FileTransferService.class, "FileTransferServiceComponent");
+ assertEquals("File uploaded Sucessfully", filetransfer.uploadFile(dataHandler));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ // domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.composite");
+ // Tuscany specific code which starts the contribution holding the test
+ launcher = NodeLauncher.newInstance();
+ node = launcher.createNode("filetransferservice.composite", // testConfiguration.getComposite(),
+ new Contribution("FileTransferMTOMTestCase", getContributionURI()));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ //domain.close();
+ if (node != null) {
+ node.stop();
+ node.destroy();
+ }
+ if (launcher != null) {
+ launcher.destroy();
+ }
+ }
+
+ protected String getContributionURI() {
+ Class<?> clazz = getClass();
+ String location = ContributionLocationHelper.getContributionLocation(clazz);
+ return location;
+
+ } // end getContributionURI()
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferService.java
new file mode 100644
index 0000000000..457e80ebdb
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferService.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
+
+import org.oasisopen.sca.annotation.Remotable;
+import javax.activation.DataHandler;
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+@Remotable
+public interface FileTransferService {
+
+ public String uploadFile(DataHandler attachment) throws Exception;
+}
+
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java
new file mode 100644
index 0000000000..d947b0db0b
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/FileTransferServiceImpl.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.mtom;
+
+import javax.activation.DataHandler;
+
+import org.oasisopen.sca.annotation.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
+@Service(FileTransferService.class)
+public class FileTransferServiceImpl implements FileTransferService {
+
+ public String uploadFile(DataHandler attachment) throws Exception {
+
+ //OMText binaryNode = (OMText) (attachment.getFirstElement()).getFirstOMChild();
+ //DataHandler dataHandler = (DataHandler) binaryNode.getDataHandler();
+
+ // Use this code to save the file we have received.
+ /*DataHandler dataHandler = attachment;
+
+ File file = new File("transferedfile.java");
+ FileOutputStream fileOutputStream = new FileOutputStream(file);
+ dataHandler.writeTo(fileOutputStream);
+ fileOutputStream.flush();
+ fileOutputStream.close();*/
+
+ System.out.println(attachment.getContentType());
+
+ return "File uploaded Sucessfully";
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java
new file mode 100644
index 0000000000..8c1e6b68da
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo;
+
+//import java.io.Serializable;
+
+public class Data {
+
+ private Data2[] a = null;
+ private int b = 0;
+ private float c = 0.0f;
+
+ public Data2[] getA() {
+ return this.a;
+ }
+
+ public void setA(Data2[] a) {
+ this.a = a;
+ }
+
+ public int getB() {
+ return this.b;
+ }
+
+ public void setB(int b) {
+ this.b = b;
+ }
+
+ public float getC() {
+ return this.c;
+ }
+
+ public void setC(float c) {
+ this.c = c;
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java
new file mode 100644
index 0000000000..25954a0603
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo;
+
+public class Data2 {
+
+ private String[] asdf = null;
+
+ public String[] getAsdf() {
+ return this.asdf;
+ }
+
+ public void setAsdf(String[] asdf) {
+ this.asdf = asdf;
+ }
+
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java
new file mode 100644
index 0000000000..3dcbe0d6f2
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo;
+
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.Test;
+
+public class POJOWSTestCase {
+
+ @Test
+ public void testWS() throws Exception {
+
+ String location = ContributionLocationHelper.getContributionLocation(TestService.class);
+ Contribution contrib = new Contribution("c1", location);
+ Node node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite", contrib);
+ node.start();
+
+// try {
+// System.out.println("Test server started (press enter to shutdown)");
+// System.in.read();
+// }
+// catch (IOException e) {
+// System.err.println(e);
+// e.printStackTrace();
+// }
+
+ node.stop();
+ System.out.println("Test server stopped");
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java
new file mode 100644
index 0000000000..c055d4909f
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+
+@Remotable
+public interface TestService {
+
+ public boolean printData(Data data);
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java
new file mode 100644
index 0000000000..4eec594a47
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo;
+
+import java.util.Arrays;
+
+import org.oasisopen.sca.annotation.Service;
+
+@Service(TestService.class)
+public class TestServiceImpl implements TestService {
+
+ public boolean printData(Data data) {
+ if (data == null) {
+ System.out.println("data is null");
+ return false;
+ }
+
+ StringBuilder sb = new StringBuilder(256);
+ sb.append("Data:\n");
+ Data2[] a = data.getA();
+ if (a != null) {
+ for (int i = 0; i < a.length; i++) {
+ sb.append(" a[");
+ sb.append(i);
+ sb.append("] = ");
+ sb.append(Arrays.asList(a[i].getAsdf()));
+ sb.append("\n");
+ }
+ } else {
+ sb.append(" a = null");
+ }
+ sb.append("\n b = ");
+ sb.append(data.getB());
+ sb.append("\n c = ");
+ sb.append(data.getC());
+ sb.append("\n");
+
+ System.out.println(sb.toString());
+
+ return true;
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java
new file mode 100644
index 0000000000..9224baae29
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+@javax.xml.bind.annotation.XmlSchema(namespace="http://test/server")
+package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo;
+
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCaseOFF.java
new file mode 100644
index 0000000000..351cb87760
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/AbstractHelloWorldOMTestCaseOFF.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public abstract class AbstractHelloWorldOMTestCaseOFF extends TestCase {
+
+ private Node node;
+ private HelloWorldOM helloWorld;
+
+ public void testHelloWorld() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+ protected String getCompositeName() {
+ String className = this.getClass().getName();
+ return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ClientPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ClientPWCBHandler.java
new file mode 100644
index 0000000000..67d6f1c56e
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ClientPWCBHandler.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class ClientPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Client UserId/Password Handler .... ");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/IntegrityPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/IntegrityPWCBHandler.java
new file mode 100644
index 0000000000..45c5472100
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/IntegrityPWCBHandler.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class IntegrityPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Integrity Password Handler .... ");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ServerPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ServerPWCBHandler.java
new file mode 100644
index 0000000000..7a4b50cc2c
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/ServerPWCBHandler.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServerPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Server User/Passwd Handler....");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthenticationTestCaseFIXME.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthenticationTestCaseFIXME.java
new file mode 100644
index 0000000000..5ddfe359a5
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthenticationTestCaseFIXME.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
+
+public class WSSecurityAuthenticationTestCaseFIXME extends AbstractHelloWorldOMTestCaseOFF {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java
new file mode 100644
index 0000000000..15eda714f0
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
+
+import java.security.Provider;
+import java.security.Security;
+
+public class WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue extends AbstractHelloWorldOMTestCaseOFF {
+
+ /**
+ * @see org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.AbstractHelloWorldOMTestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ // Workaround an issue with IBM JDK
+ Provider jce = Security.getProvider("IBMJCE");
+ if (jce != null) {
+ // Make sure IBMJCE is used first
+ Security.removeProvider("IBMJCE");
+ Security.insertProviderAt(jce, 1);
+ }
+ super.setUp();
+ }
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrityTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrityTestCaseOFF.java
new file mode 100644
index 0000000000..fcb317013c
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrityTestCaseOFF.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams;
+
+public class WSSecurityIntegrityTestCaseOFF extends AbstractHelloWorldOMTestCaseOFF {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCaseOFF.java
new file mode 100644
index 0000000000..a6223a3ccc
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCaseOFF.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed;
+
+import junit.framework.Assert;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public abstract class AbstractHelloWorldOMTestCaseOFF {
+
+ private Node node;
+ private HelloWorldOM helloWorld;
+
+ @Test
+ public void testHelloWorld() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+ protected String getCompositeName() {
+ String className = this.getClass().getName();
+ return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ClientPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ClientPWCBHandler.java
new file mode 100644
index 0000000000..88fc0d63fa
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ClientPWCBHandler.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class ClientPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Client UserId/Password Handler .... ");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+
+ System.out.println(" **** 1. UserId : " + pwcb.getIdentifer());
+ System.out.println(" **** 2. Passwd : " + pwcb.getPassword());
+ System.out.println(" **** 3. Usage : " + pwcb.getUsage());
+
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/IntegrityPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/IntegrityPWCBHandler.java
new file mode 100644
index 0000000000..0d8914156f
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/IntegrityPWCBHandler.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class IntegrityPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Integrity Password Handler .... ");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+
+ System.out.println(" **** 1. UserId : " + pwcb.getIdentifer());
+ System.out.println(" **** 2. Passwd : " + pwcb.getPassword());
+ System.out.println(" **** 3. Usage : " + pwcb.getUsage());
+
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ServerPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ServerPWCBHandler.java
new file mode 100644
index 0000000000..5840f71057
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/ServerPWCBHandler.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServerPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Server User/Passwd Handler....");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ System.out.println(" **** 1. UserId : " + pwcb.getIdentifer());
+ System.out.println(" **** 2. Passwd : " + pwcb.getPassword());
+ System.out.println(" **** 3. Usage : " + pwcb.getUsage());
+
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixedTestCase.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixedTestCase.java
new file mode 100644
index 0000000000..cdf96bdb58
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixedTestCase.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed;
+
+import org.junit.Ignore;
+
+@Ignore("Temporarily ignore rampart module validation failure")
+public class WSSecurityMixedTestCase extends AbstractHelloWorldOMTestCaseOFF {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCaseOFF.java
new file mode 100644
index 0000000000..5f6824669a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/AbstractHelloWorldOMTestCaseOFF.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOM;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public abstract class AbstractHelloWorldOMTestCaseOFF extends TestCase {
+
+ private Node node;
+ private HelloWorldOM helloWorld;
+
+ public void testHelloWorld() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode(getCompositeName(), new Contribution("test", contribution));
+ node.start();
+ helloWorld = node.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+ protected String getCompositeName() {
+ String className = this.getClass().getName();
+ return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ClientPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ClientPWCBHandler.java
new file mode 100644
index 0000000000..cf342653c7
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ClientPWCBHandler.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class ClientPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Client UserId/Password Handler .... ");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/IntegrityPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/IntegrityPWCBHandler.java
new file mode 100644
index 0000000000..84b64d3902
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/IntegrityPWCBHandler.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class IntegrityPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Integrity Password Handler .... ");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ServerPWCBHandler.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ServerPWCBHandler.java
new file mode 100644
index 0000000000..04825b6b56
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/ServerPWCBHandler.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServerPWCBHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Server User/Passwd Handler....");
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ pwcb.setPassword("TuscanyWsUserPasswd");
+ }
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthenticationTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthenticationTestCaseOFF.java
new file mode 100644
index 0000000000..355fa657f0
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthenticationTestCaseOFF.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
+
+import org.junit.Ignore;
+
+@Ignore("Temporarily ignore rampart module validation failure")
+public class WSSecurityAuthenticationTestCaseOFF extends AbstractHelloWorldOMTestCaseOFF {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java
new file mode 100644
index 0000000000..3d514e5624
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
+
+import java.security.Provider;
+import java.security.Security;
+
+public class WSSecurityConfidentialityTestCaseFIXBouncyCastleIssue extends AbstractHelloWorldOMTestCaseOFF {
+
+ /**
+ * @see org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.AbstractHelloWorldOMTestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ // Workaround an issue with IBM JDK
+ Provider jce = Security.getProvider("IBMJCE");
+ if (jce != null) {
+ // Make sure IBMJCE is used first
+ Security.removeProvider("IBMJCE");
+ Security.insertProviderAt(jce, 1);
+ }
+ super.setUp();
+ }
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrityTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrityTestCaseOFF.java
new file mode 100644
index 0000000000..6a5ff8e231
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrityTestCaseOFF.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy;
+
+import org.junit.Ignore;
+
+@Ignore("Temporarily ignore rampart module validation failure")
+public class WSSecurityIntegrityTestCaseOFF extends AbstractHelloWorldOMTestCaseOFF {
+ // super class does it all getting composite based on this class name
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCaseOFF.java
new file mode 100644
index 0000000000..45c0a6932a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12TestCaseOFF.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.soap12 ;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class HelloWorldSOAP12TestCaseOFF extends TestCase {
+
+ private Node node;
+
+ public void testHelloWorld() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+ public void testHelloWorldSOAP() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+ public void testHelloWorldSOAP11() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP11");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+ public void testHelloWorldSOAP12() throws Exception {
+ HelloWorld helloWorld = node.getService(HelloWorld.class, "HelloWorldClientSOAP12");
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite", new Contribution("test", contribution));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCaseOFF.java b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCaseOFF.java
new file mode 100644
index 0000000000..c74ffee695
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/QuestionMarkWSDLTestCaseOFF.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2.itests.soap12;
+
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.extensions.soap12.SOAP12Address;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.transport.http.server.HttpUtils;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.ContributionLocationHelper;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class QuestionMarkWSDLTestCaseOFF extends TestCase {
+
+ private static boolean newGenerator = true;
+ private Node node;
+
+ /**
+ * Tests ?wsdl returns a soap 1.1 port by default
+ */
+ public void testSOAPDefault() throws Exception {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/ep1?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName(
+ "http://itests.axis2.ws.binding.sca.tuscany.apache.org" + (newGenerator ? "/" : ""),
+ newGenerator ? "HelloWorldService" : "HelloWorld"));
+ Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP11port_http");
+
+ String endpoint = getSOAP11Endpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8085/ep1", endpoint);
+ }
+
+ /**
+ * Tests ?wsdl returns a soap 1.1 port when binding uses requires="SOAP.1_1"
+ */
+ public void testSOAP11Endpoint() throws Exception {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/ep2?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName(
+ "http://itests.axis2.ws.binding.sca.tuscany.apache.org" + (newGenerator ? "/" : ""),
+ newGenerator ? "HelloWorldService" : "HelloWorld"));
+ Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP11port_http");
+
+ String endpoint = getSOAP11Endpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8085/ep2", endpoint);
+ }
+
+ /**
+ * Tests ?wsdl returns a soap 1.2 port when binding uses requires="SOAP.1_2"
+ */
+ public void testSOAP12Endpoint() throws Exception {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8085/ep3?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName(
+ "http://itests.axis2.ws.binding.sca.tuscany.apache.org" + (newGenerator ? "/" : ""),
+ newGenerator ? "HelloWorldService" : "HelloWorld"));
+ Port port = service.getPort(newGenerator ? "HelloWorldPort" : "HelloWorldSOAP12port_http");
+
+ String endpoint = getSOAP12Endpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8085/ep3", endpoint);
+ }
+
+ protected String getSOAP11Endpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ protected String getSOAP12Endpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAP12Address) {
+ return ((SOAP12Address) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ String contribution = ContributionLocationHelper.getContributionLocation(getClass());
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite", new Contribution("test", contribution));
+ node.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler
new file mode 100644
index 0000000000..9f9d98d861
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# PolicyHandlerClasses to interpret specific PolicyModels against specific QoS infrastructures
+# handler classname;qname=<policy intent addressed>;model=<policy model class>
+org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicyHandler;intent=http://tuscany.apache.org/xmlns/sca/1.1#wsAuthentication,model=org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite
new file mode 100644
index 0000000000..061b68450c
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorld.composite
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="HelloWorld">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)">
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://localhost:8085/services/HelloWorldWebService</wsa:Address>
+ </wsa:EndpointReference>
+ </binding.ws>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite
new file mode 100644
index 0000000000..992d4463de
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/HelloWorldNoWSDL.composite
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="HelloWorldNoWSDL">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
+ <service name="HelloWorld" >
+ <binding.ws uri="http://localhost:8085/helloWorld"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
+ <reference name="helloWorldWS" >
+ <binding.ws uri="http://localhost:8085/helloWorld"/>
+ </reference>
+ </component>
+
+ <component name="EchoService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.EchoImpl"/>
+ <service name="Echo">
+ <binding.ws uri="http://localhost:8085/Echo"/>
+ </service>
+ </component>
+
+ <component name="EchoComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.EchoComponent"/>
+ <reference name="echoWS">
+ <binding.ws uri="http://localhost:8085/Echo"/>
+ </reference>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd
new file mode 100644
index 0000000000..f09ed09b6a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="CustomerProfileData">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string" />
+ <xsd:element name="lastName" type="xsd:string" />
+ <xsd:element name="address" type="xsd:string" />
+ <xsd:element name="email" type="xsd:string" />
+ <xsd:element name="loginID" type="xsd:string" />
+ <xsd:element name="password" type="xsd:string" />
+ <xsd:element name="id" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdefs.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdefs.xsd
new file mode 100644
index 0000000000..ec67b84851
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdefs.xsd
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:include schemaLocation="customerdata.xsd" />
+ <xsd:include schemaLocation="/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd" />
+
+</xsd:schema>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd
new file mode 100644
index 0000000000..7c903c6394
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerinfo.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:complexType name="CustomerProfileInfo">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string" />
+ <xsd:element name="lastName" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+</xsd:schema>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite
new file mode 100644
index 0000000000..0c5646e888
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultMultiService.composite
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint1">
+
+ <!--
+ exposing a component which has multiple services with a WS binding,
+ endpoint should be <componentURI>/<serviceName> so for this composite:
+ http://localhost:8085/HelloWorldService/service1
+ -->
+
+
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldMultiService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"
+ wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite
new file mode 100644
index 0000000000..5778f98593
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/DefaultSingleService.composite
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint1">
+
+ <!--
+ exposing a component with a WS binding, endpoint should be <componentURI>/<serviceName>
+ unless the component has just a single service in which case its just <componentURI>
+ so for this composite: http://localhost:8085/HelloWorldService
+ -->
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"
+ wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite
new file mode 100644
index 0000000000..990093bc8c
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLExplicitURI.composite
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite
new file mode 100644
index 0000000000..ea598f8e23
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/WSDLRelativeURI.composite
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint4">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with a relative URL
+ so for this composite the service is: http://localhost:8085/HelloWorldService/myRelativeURI
+ -->
+
+
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om-relative-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-relative-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om-relative-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-relative-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/HelloWorldService/helloWorld/myRelativeURI"/>
+ </reference>
+ </component>
+
+
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/helloworld-om-relative-uri.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/helloworld-om-relative-uri.wsdl
new file mode 100644
index 0000000000..fe68755c47
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/endpoints/helloworld-om-relative-uri.wsdl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om-relative-uri" xmlns:tns="http://helloworld-om-relative-uri" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-relative-uri" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService/helloWorld/myRelativeURI"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite
new file mode 100644
index 0000000000..ef012f1803
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/epr/HelloWorld.composite
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="HelloWorld">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws>
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://localhost:8085/myService</wsa:Address>
+ </wsa:EndpointReference>
+ </binding.ws>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
+ <reference name="helloWorldWS">
+ <binding.ws>
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://localhost:8085/myService</wsa:Address>
+ </wsa:EndpointReference>
+ </binding.ws>
+ </reference>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-binding.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-binding.wsdl
new file mode 100644
index 0000000000..7bf47bc412
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-binding.wsdl
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om-merged" xmlns:tns="http://helloworld-om-merged" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om-bindings">
+
+ <wsdl:import namespace="http://helloworld-om-merged"
+ location="helloworld-om-porttype.wsdl"/>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://endpoint.not.used"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite
new file mode 100644
index 0000000000..023f392085
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-merged.composite
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="HelloWorldOM-Merged">
+
+
+ <component name="HelloWorldMergedService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldWSDLMergedComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om-merged#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld" />
+ </reference>
+ </component>
+
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-porttype.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-porttype.wsdl
new file mode 100644
index 0000000000..c66fa51c34
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-porttype.wsdl
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om-merged" xmlns:tns="http://helloworld-om-merged" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om-porttype">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-merged" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-uri.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-uri.wsdl
new file mode 100644
index 0000000000..baa223f41c
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om-uri.wsdl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om-uri" xmlns:tns="http://helloworld-om-uri" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om-uri" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/myExplicitURI"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite
new file mode 100644
index 0000000000..ccd3082f88
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.composite
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="HelloWorldOM">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-om#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld" />
+ </reference>
+ </component>
+
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.wsdl
new file mode 100644
index 0000000000..73ca02246d
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-om.wsdl
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld-om" xmlns:tns="http://helloworld-om" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-om">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-om" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://endpoint.not.used"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite
new file mode 100644
index 0000000000..91175c476c
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.composite
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="HelloWorldPrec">
+
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ <service name="HelloWorldOM">
+ <interface.wsdl interface="http://helloworld-prec#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </service>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld-prec#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-prec#wsdl.port(HelloWorldService/HelloWorldSoapPort)"
+ uri="http://INVALID.END.POINT" />
+ </reference>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.wsdl
new file mode 100644
index 0000000000..5908c43e7d
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld-prec.wsdl
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<wsdl:definitions targetNamespace="http://helloworld-prec" xmlns:tns="http://helloworld-prec" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld-prec">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld-prec" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/HelloWorldService/helloWorld"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld.wsdl
new file mode 100644
index 0000000000..1a2272d7ee
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/helloworld.wsdl
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://helloworld" xmlns:tns="http://helloworld" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="helloworld">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://helloworld" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="getGreetings">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="getGreetingsResponse">
+ <complexType>
+ <sequence>
+ <element name="getGreetingsReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getGreetingsRequest">
+ <wsdl:part element="tns:getGreetings" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="getGreetingsResponse">
+ <wsdl:part element="tns:getGreetingsResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="HelloWorld">
+ <wsdl:operation name="getGreetings">
+ <wsdl:input message="tns:getGreetingsRequest" name="getGreetingsRequest"/>
+ <wsdl:output message="tns:getGreetingsResponse" name="getGreetingsResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="HelloWorldSoapBinding" type="tns:HelloWorld">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getGreetings">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="getGreetingsRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="getGreetingsResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
+ </wsdl:port>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort3">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService3"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransfer.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransfer.wsdl
new file mode 100644
index 0000000000..1c67a1b26a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransfer.wsdl
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions
+ targetNamespace="http://filetransfer"
+ xmlns:tns="http://filetransfer"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="filetransfer">
+
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://filetransfer" xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="uploadFile">
+ <complexType>
+ <sequence>
+ <element name="attachment" type="xsd:base64Binary"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="uploadFileResponse">
+ <complexType>
+ <sequence>
+ <element name="uploadFileReturn" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="uploadFileRequest">
+ <wsdl:part element="tns:uploadFile" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:message name="uploadFileResponse">
+ <wsdl:part element="tns:uploadFileResponse" name="parameters"/>
+ </wsdl:message>
+
+ <wsdl:portType name="FileTransfer">
+ <wsdl:operation name="uploadFile">
+ <wsdl:input message="tns:uploadFileRequest" name="uploadFileRequest"/>
+ <wsdl:output message="tns:uploadFileResponse" name="uploadFileResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="FileTransferSoapBinding" type="tns:FileTransfer">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="uploadFile">
+ <wsdlsoap:operation soapAction=""/>
+ <wsdl:input name="uploadFileRequest">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="uploadFileResponse">
+ <wsdlsoap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="FileTransferService">
+ <wsdl:port binding="tns:FileTransferSoapBinding" name="FileTransferSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/FileTransferServiceComponent"/>
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.compositeOFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.compositeOFF
new file mode 100644
index 0000000000..3dcef5ab46
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/mtom/filetransferservice.compositeOFF
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://filetransfer"
+ xmlns:hw="http://filetransfer"
+ name="filetransferws">
+
+ <component name="FileTransferServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.mtom.FileTransferServiceImpl" />
+ <service name="FileTransferService">
+ <interface.wsdl interface="http://filetransfer#wsdl.interface(FileTransfer)" />
+ <binding.ws uri="http://localhost:8085/FileTransferService"/>
+ </service>
+ </component>
+
+ <component name="FileTransferClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.mtom.FileTransferClient"/>
+ <reference name="fileTransferWS" />
+ </component>
+
+ <reference name="fileTransferWS" promote="FileTransferClientComponent/fileTransferWS">
+ <binding.ws uri="http://localhost:8085/FileTransferService"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite
new file mode 100644
index 0000000000..d1f0cc1ff5
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://test"
+ xmlns:hw="http://helloworld"
+ name="test">
+ <component name="TestServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.pojo.TestServiceImpl" />
+ <service name="TestService">
+ <interface.java interface="org.apache.tuscany.sca.binding.ws.axis2.itests.pojo.TestService" />
+ <binding.ws uri="http://localhost:8085/testService"/>
+ </service>
+ </component>
+</composite>
+
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite.OFF
new file mode 100644
index 0000000000..60673ab103
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityAuthentication.composite.OFF
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+ <service name="helloWorld" promote="HelloWorldService" requires="authentication">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="tuscany:wsClientAuthenticationPolicy">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite.OFF
new file mode 100644
index 0000000000..bc3107c388
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityConfidentiality.composite.OFF
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+ <service name="helloWorld" promote="HelloWorldService" requires="confidentiality">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" requires="confidentiality">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite.OFF
new file mode 100644
index 0000000000..ae07495cf3
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/WSSecurityIntegrity.composite.OFF
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+ <service name="helloWorld" promote="HelloWorldService" requires="integrity">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" requires="integrity">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml
new file mode 100644
index 0000000000..1eadd01b81
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/definitions.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <!-- WS Security POLICY SETS -->
+ <sca:policySet name="wsAuthenticationPolicy"
+ provides="sca:authentication"
+ appliesTo="//sca:binding.ws"
+ >
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>UsernameToken</items>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.ServerPWCBHandler</passwordCallbackClass>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsClientAuthenticationPolicy"
+ provides="tuscany:wsAuthentication"
+ appliesTo="//sca:binding.ws">
+ <tuscany:wsConfigParam>
+ <parameter name="OutflowSecurity">
+ <action>
+ <items>UsernameToken</items>
+ <user>TuscanyWsUser</user>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.ClientPWCBHandler</passwordCallbackClass>" +
+ <passwordType>PasswordText</passwordType>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsIntegrityPolicy"
+ provides="sca:integrity"
+ appliesTo="//sca:binding.ws">
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>Timestamp Signature</items>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
+ </action>
+ </parameter>
+ <parameter name="OutflowSecurity">
+ <action>
+ <items>Timestamp Signature</items>
+ <user>TuscanyWsUser</user>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.IntegrityPWCBHandler</passwordCallbackClass>" +
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsConfidentialityPolicy"
+ provides="sca:confidentiality"
+ appliesTo="//sca:binding.ws">
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>Timestamp Signature Encrypt</items>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.IntegrityPWCBHandler</passwordCallbackClass>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
+ </action>
+ </parameter>
+ <parameter name="OutflowSecurity">
+ <action>
+ <items>Timestamp Signature Encrypt</items>
+ <user>TuscanyWsUser</user>
+ <encryptionUser>TuscanyWsUser</encryptionUser>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.configparams.IntegrityPWCBHandler</passwordCallbackClass>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties</signaturePropFile>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+ </sca:definitions> \ No newline at end of file
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties
new file mode 100644
index 0000000000..592edf183b
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=TuscanyWsUserPasswd
+org.apache.ws.security.crypto.merlin.file=org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks \ No newline at end of file
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks
new file mode 100644
index 0000000000..307edb9b37
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks
Binary files differ
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml
new file mode 100644
index 0000000000..778fb96128
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/intent/definitions.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <sca:intent name="wsAuthentication"
+ constrains="sca:binding.ws">
+ <description>
+ Communitcation thro this binding required Authentication.
+ </description>
+ </sca:intent>
+
+ </sca:definitions> \ No newline at end of file
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite.OFF
new file mode 100644
index 0000000000..712948c77a
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/WSSecurityMixed.composite.OFF
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+ <service name="helloWorld" promote="HelloWorldService"
+ policySets="tuscany:serverWsPolicyForAuthentication">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS"
+ policySets="tuscany:clientWsPolicyForAuthentication">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml
new file mode 100644
index 0000000000..fb08fee447
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/definitions.xml
@@ -0,0 +1,323 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <!-- WS Security POLICY SETS -->
+ <sca:policySet name="wsAuthenticationPolicy"
+ provides="sca:authentication"
+ appliesTo="//sca:binding.ws"
+ >
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>UsernameToken</items>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</passwordCallbackClass>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsClientAuthenticationPolicy"
+ provides="tuscany:wsAuthentication"
+ appliesTo="//sca:binding.ws">
+ <tuscany:wsConfigParam>
+ <parameter name="OutflowSecurity">
+ <action>
+ <items>UsernameToken</items>
+ <user>TuscanyWsUser</user>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ClientPWCBHandler</passwordCallbackClass>" +
+ <passwordType>PasswordText</passwordType>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsMixedReceiverIntegrityPolicy"
+ provides="sca:integrity"
+ appliesTo="//sca:binding.ws">
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>Signature</items>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsMixedSenderIntegrityPolicy"
+ provides="sca:integrity"
+ appliesTo="//sca:binding.ws">
+ <tuscany:wsConfigParam>
+ <parameter name="OutflowSecurity">
+ <action>
+ <items>Signature</items>
+ <user>TuscanyWsUser</user>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.IntegrityPWCBHandler</passwordCallbackClass>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsServerAuthenticationIntegrityPolicy"
+ provides="sca:authentication sca:integrity"
+ appliesTo="//sca:binding.ws"
+ >
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>UsernameToken Signature</items>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</passwordCallbackClass>
+ </action>
+ </parameter>
+ <parameter name="OutflowSecurity">
+ <action>
+ <items>Signature</items>
+ <user>TuscanyWsUser</user>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</passwordCallbackClass>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="wsClientAuthenticationIntegrityPolicy"
+ provides="tuscany:wsAuthentication"
+ appliesTo="//sca:binding.ws">
+ <tuscany:wsConfigParam>
+ <parameter name="InflowSecurity">
+ <action>
+ <items>Signature</items>
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile>
+ </action>
+ </parameter>
+ <parameter name="OutflowSecurity">
+ <action>
+ <items>UsernameToken Signature</items>
+ <user>TuscanyWsUser</user>
+ <passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ClientPWCBHandler</passwordCallbackClass>" +
+ <signaturePropFile>org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties</signaturePropFile>
+ <passwordType>PasswordText</passwordType>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ </action>
+ </parameter>
+ </tuscany:wsConfigParam>
+ </sca:policySet>
+
+ <sca:policySet name="clientWsPolicyForAuthentication"
+ provides="sca:authentication"
+ appliesTo="//sca:binding.ws"
+ >
+ <wsp:Policy wsu:Id="UTOverTransport"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+ <!-- ramp:passwordType>PasswordText</ramp:passwordType-->
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ClientPWCBHandler</ramp:passwordCallbackClass>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet>
+
+ <sca:policySet name="serverWsPolicyForAuthentication"
+ provides="sca:authentication"
+ appliesTo="//sca:binding.ws"
+ >
+ <wsp:Policy wsu:Id="UTOverTransport"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.ServerPWCBHandler</ramp:passwordCallbackClass>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet>
+
+ <!-- A policyset that uses WS Policy -->
+ <sca:policySet name="serverWsPolicyForIntegrity"
+ provides="sca:integrity"
+ appliesTo="//sca:binding.ws">
+ <wsp:Policy wsu:Id="SignOnly"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+ <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.IntegrityPWCBHandler</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet>
+
+
+ <!-- A policyset that uses WS Policy -->
+ <!-- sca:policySet name="tuscany:wsSecurityPolicyForIntegritys"
+ provides="sca:integrity"
+ appliesTo="sca:binding.ws">
+ <wsp:Policy wsu:Id="SignOnly"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+ <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.mixed.IntegrityPWCBHandler</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet-->
+ </sca:definitions> \ No newline at end of file
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties
new file mode 100644
index 0000000000..cb188e6676
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=TuscanyWsUserPasswd
+org.apache.ws.security.crypto.merlin.file=org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/tuscanyKeys.jks \ No newline at end of file
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks
new file mode 100644
index 0000000000..307edb9b37
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/tuscanyKeys.jks
Binary files differ
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite.OFF
new file mode 100644
index 0000000000..780130e699
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityAuthentication.composite.OFF
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+ <service name="helloWorld" promote="HelloWorldService" policySets="tuscany:wsSecurityPolicyForAuthentication">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="tuscany:wsSecurityPolicyForAuthentication">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite.OFF
new file mode 100644
index 0000000000..dd0a102476
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityConfidentiality.composite.OFF
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+ <service name="helloWorld" promote="HelloWorldService" policySets="wsSecurityPolicyForConfidentiality">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="wsSecurityPolicyForConfidentiality">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite.OFF
new file mode 100644
index 0000000000..904c0b469e
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/WSSecurityIntegrity.composite.OFF
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="endpoint3">
+
+ <!--
+ exposing a component with a WS binding using a WSDL port with an explicit URL
+ so for this composite the service is: http://localhost:8085/myExplicitURI
+ -->
+
+ <service name="helloWorld" promote="HelloWorldService" policySets="tuscany:wsSecurityPolicyForIntegrity">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.port(HelloWorldService/HelloWorldSoapPort)" />
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMService"/>
+ </component>
+
+ <component name="HelloWorldComponent">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldOMComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldComponent/helloWorldWS" policySets="tuscany:wsSecurityPolicyForIntegrity">
+ <interface.wsdl interface="http://helloworld-om-uri#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld-om-uri#wsdl.binding(HelloWorldSoapBinding)"
+ uri="http://localhost:8085/myExplicitURI"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml
new file mode 100644
index 0000000000..12f4a6febd
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/definitions.xml
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<sca:definitions xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1">
+
+ <!-- WS Security POLICY SETS -->
+ <!-- A policyset that uses WS Policy -->
+ <sca:policySet name="wsSecurityPolicyForAuthentication"
+ provides="sca:authentication"
+ appliesTo="sca:binding.ws">
+ <wsp:Policy wsu:Id="UTOverTransport"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
+ </wsp:Policy>
+ </sp:SignedSupportingTokens>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+ <ramp:passwordType>PasswordText</ramp:passwordType>
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.ClientPWCBHandler</ramp:passwordCallbackClass>
+ </ramp:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet>
+
+ <!-- A policyset that uses WS Policy -->
+ <sca:policySet name="wsSecurityPolicyForIntegrity"
+ provides="sca:integrity"
+ appliesTo="sca:binding.ws">
+ <wsp:Policy wsu:Id="SignOnly"
+ xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+ xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+ <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.IntegrityPWCBHandler</ramp:passwordCallbackClass>
+
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+ </sca:policySet>
+
+ <!-- A policyset that uses WS Policy -->
+ <sca:policySet name="wsSecurityPolicyForConfidentiality"
+ provides="sca:confidentiality"
+ appliesTo="sca:binding.ws">
+ <wsp:Policy wsu:Id="SigEncr" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+ <wsp:Policy>
+ <sp:WssX509V3Token10/>
+ </wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:AlgorithmSuite>
+ <wsp:Policy>
+ <sp:TripleDesRsa15/>
+ </wsp:Policy>
+ </sp:AlgorithmSuite>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ <sp:OnlySignEntireHeadersAndBody/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:MustSupportRefKeyIdentifier/>
+ <sp:MustSupportRefIssuerSerial/>
+ </wsp:Policy>
+ </sp:Wss10>
+ <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:SignedParts>
+ <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <sp:Body/>
+ </sp:EncryptedParts>
+
+ <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ <ramp:user>TuscanyWsUser</ramp:user>
+ <ramp:encryptionUser>TuscanyWsUser</ramp:encryptionUser>
+ <ramp:passwordCallbackClass>org.apache.tuscany.sca.binding.ws.axis2.itests.policy.wspolicy.IntegrityPWCBHandler</ramp:passwordCallbackClass>
+ <ramp:signatureCrypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+ </ramp:crypto>
+ </ramp:signatureCrypto>
+
+ <ramp:encryptionCypto>
+ <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.file">org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks</ramp:property>
+ <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">TuscanyWsUserPasswd</ramp:property>
+ </ramp:crypto>
+ </ramp:encryptionCypto>
+ </ramp:RampartConfig>
+
+ </wsp:All>
+ </wsp:ExactlyOne>
+</wsp:Policy>
+ </sca:policySet>
+
+ </sca:definitions> \ No newline at end of file
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks
new file mode 100644
index 0000000000..307edb9b37
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/wspolicy/tuscanyKeys.jks
Binary files differ
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl
new file mode 100644
index 0000000000..41a491361f
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://account3"
+ xmlns:tns="http://account3"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="questionmark-import-nested">
+
+ <wsdl:types>
+ <xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://account3"
+ xmlns:account="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:import namespace="http://accounts" schemaLocation="customerdefs.xsd" />
+
+ <xsd:element name="getCustomerProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="loginID" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getCustomerProfileResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerProfile"
+ type="account:CustomerProfileData" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCustomerProfileRequest">
+ <wsdl:part element="tns:getCustomerProfile" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:message name="getCustomerProfileResponse">
+ <wsdl:part element="tns:getCustomerProfileResponse" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="Account">
+ <wsdl:operation name="getCustomerProfile">
+ <wsdl:input message="tns:getCustomerProfileRequest" name="getCustomerProfileRequest" />
+ <wsdl:output message="tns:getCustomerProfileResponse" name="getCustomerProfileResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl
new file mode 100644
index 0000000000..99a8c6d81d
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://account2"
+ xmlns:tns="http://account2"
+ xmlns:account3="http://account3"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="questionmark-import">
+
+ <wsdl:import namespace="http://account3" location="/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import-nested.wsdl" />
+
+ <wsdl:binding name="AccountSoapBinding" type="account3:Account">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getCustomerProfile">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getCustomerProfileRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getCustomerProfileResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort">
+ <wsdlsoap:address location="http://localhost:8086/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl
new file mode 100644
index 0000000000..80e4b62801
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<wsdl:definitions targetNamespace="http://accounts"
+ xmlns:tns="http://accounts"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ name="questionmark-include">
+
+ <wsdl:types>
+ <xsd:schema elementFormDefault="qualified"
+ targetNamespace="http://accounts"
+ xmlns:account="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:include schemaLocation="/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd" />
+
+ <xsd:element name="getCustomerProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="loginID" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getCustomerProfileResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerProfile"
+ type="xsd:string" />
+ <!--
+ <xsd:element name="customerProfile"
+ type="account:CustomerProfileData" />
+ -->
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getCustomerProfileRequest">
+ <wsdl:part element="tns:getCustomerProfile" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:message name="getCustomerProfileResponse">
+ <wsdl:part element="tns:getCustomerProfileResponse" name="parameters" />
+ </wsdl:message>
+
+ <wsdl:portType name="Account">
+ <wsdl:operation name="getCustomerProfile">
+ <wsdl:input message="tns:getCustomerProfileRequest" name="getCustomerProfileRequest" />
+ <wsdl:output message="tns:getCustomerProfileResponse" name="getCustomerProfileResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="AccountSoapBinding" type="tns:Account">
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getCustomerProfile">
+ <wsdlsoap:operation soapAction="" />
+ <wsdl:input name="getCustomerProfileRequest">
+ <wsdlsoap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output name="getCustomerProfileResponse">
+ <wsdlsoap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountSoapBinding" name="AccountSoapPort">
+ <wsdlsoap:address location="http://localhost:8085/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite
new file mode 100644
index 0000000000..a8fd8d4d5d
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="QuestionMarkWSDLImport">
+
+ <component name="AccountService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.AccountService" />
+ <service name="Account">
+ <binding.ws wsdlElement="http://account2#wsdl.port(AccountService/AccountSoapPort)" />
+ </service>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite
new file mode 100644
index 0000000000..d795329db0
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="QuestionMarkWSDLInclude">
+
+ <component name="AccountService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.AccountService" />
+ <service name="Account" promote="AccountService">
+ <binding.ws wsdlElement="http://accounts#wsdl.port(AccountService/AccountSoapPort)" />
+ </service>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite
new file mode 100644
index 0000000000..3ed8b206a7
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl.composite
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="QuestionMarkWSDLTests">
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
+ <service name="HelloWorld">
+ <binding.ws name="ep1" uri="http://localhost:8085/foo/bar" />
+ <binding.ws name="ep2" wsdlElement="http://helloworld#wsdl.service(HelloWorldService)"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite.OFF
new file mode 100644
index 0000000000..f7caa55fce
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/HelloWorldSOAP12.composite.OFF
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="HelloWorld">
+
+ <service name="helloWorld" promote="HelloWorldService">
+ <binding.ws uri="http://localhost:8085/helloWorld"/>
+ </service>
+ <service name="helloWorldSOAP" promote="HelloWorldService">
+ <binding.ws requires="SOAP" uri="http://localhost:8085/helloWorldSOAP"/>
+ </service>
+ <service name="helloWorldSOAP11" promote="HelloWorldService">
+ <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/helloWorldSOAP11"/>
+ </service>
+ <service name="helloWorldSOAP12" promote="HelloWorldService">
+ <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/helloWorldSOAP12"/>
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
+ </component>
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+ <component name="HelloWorldClientSOAP">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+ <component name="HelloWorldClientSOAP11">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+ <component name="HelloWorldClientSOAP12">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldComponent"/>
+ <reference name="helloWorldWS" />
+ </component>
+
+ <reference name="helloWorldWS" promote="HelloWorldClient/helloWorldWS">
+ <binding.ws uri="http://localhost:8085/helloWorld"/>
+ </reference>
+ <reference name="helloWorldWS" promote="HelloWorldClientSOAP/helloWorldWS">
+ <binding.ws uri="http://localhost:8085/helloWorldSOAP" requires="SOAP"/>
+ </reference>
+ <reference name="helloWorldWS" promote="HelloWorldClientSOAP11/helloWorldWS">
+ <binding.ws uri="http://localhost:8085/helloWorldSOAP11" requires="SOAP.1_1"/>
+ </reference>
+ <reference name="helloWorldWS" promote="HelloWorldClientSOAP12/helloWorldWS">
+ <binding.ws uri="http://localhost:8085/helloWorldSOAP12" requires="SOAP.1_2"/>
+ </reference>
+
+</composite>
diff --git a/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite.OFF b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite.OFF
new file mode 100644
index 0000000000..6118743da3
--- /dev/null
+++ b/tags/java/sca/2.0-M3-RC3a/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/soap12/questionmark-wsdl.composite.OFF
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="QuestionMarkWSDLTests">
+
+ <service name="ep1" promote="HelloWorldService">
+ <binding.ws uri="http://localhost:8085/ep1"/>
+ </service>
+
+ <service name="ep2" promote="HelloWorldService">
+ <binding.ws requires="SOAP.1_1" uri="http://localhost:8085/ep2"/>
+ </service>
+
+ <service name="ep3" promote="HelloWorldService">
+ <binding.ws requires="SOAP.1_2" uri="http://localhost:8085/ep3"/>
+ </service>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.HelloWorldService"/>
+ </component>
+
+</composite>