You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2006/02/20 23:26:27 UTC
svn commit: r379259 [7/7] - in /incubator/tuscany/sandbox/binding.axis2: ./
src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/binding/
src/main/java/org/apache/...
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/SavingsAccount.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java Mon Feb 20 14:26:19 2006
@@ -0,0 +1,48 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.binding.axis2.assembly.tests.bigbank.account.services.accountdata;
+
+public class StockAccount {
+
+ private String accountNumber;
+ private String symbol;
+ private int quantity;
+
+ public String getAccountNumber() {
+ return accountNumber;
+ }
+
+ public void setAccountNumber(String accountNumber) {
+ this.accountNumber = accountNumber;
+ }
+
+ public int getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+
+ public String getSymbol() {
+ return symbol;
+ }
+
+ public void setSymbol(String symbol) {
+ this.symbol = symbol;
+ }
+}
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/accountdata/StockAccount.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java Mon Feb 20 14:26:19 2006
@@ -0,0 +1,24 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.binding.axis2.assembly.tests.bigbank.account.services.stockquote;
+
+public interface StockQuoteService {
+
+ public float getQuote(String symbol);
+}
+
+
\ No newline at end of file
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteService.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/assembly/tests/bigbank/account/services/stockquote/StockQuoteWebService.wsdl Mon Feb 20 14:26:19 2006
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed 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://webservice.stockquote" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://webservice.stockquote" xmlns:intf="http://webservice.stockquote" xmlns:tns1="http://stockquote" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="">
+ <!--WSDL created by Apache Axis version: 1.2.1
+Built on Jun 14, 2005 (09:15:57 EDT)-->
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://stockquote" xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="GetQuoteRequest">
+ <sequence>
+ <element name="symbol" nillable="true" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ <complexType name="GetQuoteResponse">
+ <sequence>
+ <element name="price" type="xsd:float"/>
+ </sequence>
+ </complexType>
+ </schema>
+ <schema elementFormDefault="qualified" targetNamespace="http://webservice.stockquote" xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://stockquote"/>
+ <element name="request" type="tns1:GetQuoteRequest"/>
+ <element name="getQuoteReturn" type="tns1:GetQuoteResponse"/>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getQuoteResponse">
+
+ <wsdl:part element="impl:getQuoteReturn" name="getQuoteReturn"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="getQuoteRequest">
+
+ <wsdl:part element="impl:request" name="request"/>
+
+ </wsdl:message>
+
+ <wsdl:portType name="StockQuoteWebService">
+
+ <wsdl:operation name="getQuote" parameterOrder="request">
+
+ <wsdl:input message="impl:getQuoteRequest" name="getQuoteRequest"/>
+
+ <wsdl:output message="impl:getQuoteResponse" name="getQuoteResponse"/>
+
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="StockQuoteWebServiceSoapBinding" type="impl:StockQuoteWebService">
+
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="getQuote">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="getQuoteRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="getQuoteResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="StockQuoteWebServiceService">
+
+ <wsdl:port binding="impl:StockQuoteWebServiceSoapBinding" name="StockQuoteWebService">
+
+ <wsdlsoap:address location="http://localhost:8123/StockQuoteWebService/services/StockQuoteWebService"/>
+
+ </wsdl:port>
+
+ </wsdl:service>
+
+</wsdl:definitions>
Added: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/serialization/mediator/tests/SOAPMediatorTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/serialization/mediator/tests/SOAPMediatorTestCase.java?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/serialization/mediator/tests/SOAPMediatorTestCase.java (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/serialization/mediator/tests/SOAPMediatorTestCase.java Mon Feb 20 14:26:19 2006
@@ -0,0 +1,254 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.binding.axis2.serialization.mediator.tests;
+
+import javax.wsdl.Definition;
+import javax.xml.namespace.QName;
+
+import commonj.sdo.DataObject;
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.tuscany.binding.axis2.serialization.mediator.SOAPMediator;
+import org.apache.tuscany.binding.axis2.serialization.mediator.impl.SOAPDocumentLiteralMediatorImpl;
+import org.apache.tuscany.binding.axis2.serialization.mediator.impl.SOAPEnvelopeImpl;
+import org.apache.tuscany.binding.axis2.serialization.mediator.impl.SOAPRPCLiteralMediatorImpl;
+import org.apache.tuscany.binding.axis2.utils.WebServicePortMetaData;
+import org.apache.tuscany.model.util.ConfiguredResourceSet;
+import org.apache.tuscany.core.context.EventContext;
+import org.apache.tuscany.core.context.TuscanyModuleComponentContext;
+import org.apache.tuscany.core.context.impl.EventContextImpl;
+import org.apache.tuscany.core.context.impl.TuscanyModuleComponentContextImpl;
+import org.apache.tuscany.core.context.scope.DefaultScopeStrategy;
+import org.apache.tuscany.core.deprecated.sdo.util.HelperProvider;
+import org.apache.tuscany.core.deprecated.sdo.util.impl.HelperProviderImpl;
+import org.apache.tuscany.core.message.Message;
+import org.apache.tuscany.core.message.MessageFactory;
+import org.apache.tuscany.core.message.impl.MessageFactoryImpl;
+import org.apache.tuscany.model.assembly.AssemblyFactory;
+import org.apache.tuscany.model.assembly.AssemblyLoader;
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.ModuleComponent;
+import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl;
+import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
+import org.apache.tuscany.model.types.wsdl.WSDLInterfaceType;
+import org.apache.tuscany.model.types.wsdl.WSDLOperationType;
+import org.apache.tuscany.model.types.wsdl.WSDLTypeHelper;
+
+/**
+ * Test case for SOAP mediators
+ *
+ */
+public class SOAPMediatorTestCase extends TestCase {
+ // private TuscanyRuntime tuscany;
+ private TuscanyModuleComponentContext context;
+ private HelperProvider provider;
+
+ private AssemblyModelContext modelContext;
+
+ @Override
+ protected void setUp() throws Exception {
+ System.out.println("Starting SCA runtime...");
+
+ Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+ modelContext = new AssemblyModelContextImpl();
+
+ AssemblyLoader loader = modelContext.getAssemblyLoader();
+ Module module = loader.getModule(getClass().getResource("sca.module").toString());
+ module.initialize(modelContext);
+
+ AssemblyFactory factory = new AssemblyFactoryImpl();
+
+ ModuleComponent moduleComponent = factory.createModuleComponent();
+ moduleComponent.setName(module.getName());
+ moduleComponent.setURI(null);
+ moduleComponent.setModuleImplementation(module);
+ moduleComponent.setComponentImplementation(module);
+
+ // Create the module component context
+ EventContext eventContext = new EventContextImpl();
+ DefaultScopeStrategy scopeStrategy = new DefaultScopeStrategy();
+ context = new TuscanyModuleComponentContextImpl(moduleComponent, eventContext, scopeStrategy, modelContext);
+ // tuscany = new TuscanyRuntime("TestModule", "org/apache/tuscany/binding/axis/mediator/tests");
+
+ // tuscany.start();
+
+ // context = (TuscanyModuleComponentContext) CurrentModuleContext.getContext();
+ provider = new HelperProviderImpl((ConfiguredResourceSet) modelContext.getAssemblyLoader());
+ System.out.println("SCA runtime is now started.");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ System.out.println("Stopping SCA runtime...");
+ // tuscany.stop();
+ System.out.println("SCA runtime is now stopped.");
+ }
+
+ public void testDocLitWrapped() throws Exception {
+ System.out.println("testDocLitWrapped...");
+ MessageFactory messageFactory = new MessageFactoryImpl();
+ Message message = messageFactory.createMessage();
+
+ WSDLInterfaceType interfaceType = modelContext.getWSDLTypeHelper().getWSDLInterfaceType("http://www.example.org/Test/DocLitWrapped#Test");
+ WSDLOperationType operationType = (WSDLOperationType) interfaceType.getOperationType("indexOf");
+
+ DataObject input = provider.getDataFactory().create(operationType.getInputType());
+ DataObject args = input.createDataObject(0);
+ args.setString(0, "123");
+ args.setString(1, "2");
+ message.setBody(input);
+
+ WebServicePortMetaData portMetaData = getPortMetaData(interfaceType.getWSDLPortType().getQName().getNamespaceURI());
+ SOAPMediator mediator = new SOAPDocumentLiteralMediatorImpl(portMetaData);
+ SOAPEnvelopeImpl envelope = new SOAPEnvelopeImpl();
+ mediator.writeRequest(context, message, operationType, envelope);
+
+ String xml = envelope.getAsString();
+ System.out.println("Request:\n" + xml);
+ Assert.assertTrue(xml.contains("<wrapped:indexOf xmlns:wrapped=\"http://www.example.org/Test/DocLitWrapped\">"));
+ Assert.assertTrue(xml.contains("<source>123</source>"));
+ Assert.assertTrue(xml.contains("<target>2</target>"));
+
+ mediator.readRequest(context, envelope, message, operationType);
+ args = ((DataObject) message.getBody()).getDataObject(0);
+ Assert.assertEquals(args.get(0), "123");
+ Assert.assertEquals(args.get(1), "2");
+
+ message = messageFactory.createMessage();
+ DataObject output = provider.getDataFactory().create(operationType.getOutputType());
+ args = output.createDataObject(0);
+ args.setInt(0, 1);
+ message.setBody(output);
+ envelope = new SOAPEnvelopeImpl();
+ mediator.writeResponse(context, message, operationType, envelope);
+
+ xml = envelope.getAsString();
+ System.out.println("Response:\n" + xml);
+ Assert.assertTrue(xml.contains("<index>1</index>"));
+
+ mediator.readResponse(context, envelope, message, operationType);
+ args = ((DataObject) message.getBody()).getDataObject(0);
+ Assert.assertEquals(args.getInt(0), 1);
+
+ }
+
+ public void testDocLit() throws Exception {
+ System.out.println("testDocLit...");
+ MessageFactory messageFactory = new MessageFactoryImpl();
+ Message message = messageFactory.createMessage();
+
+ WSDLInterfaceType interfaceType = modelContext.getWSDLTypeHelper().getWSDLInterfaceType("http://www.example.org/Test/DocLit#Test");
+ WSDLOperationType operationType = (WSDLOperationType) interfaceType.getOperationType("indexOf");
+
+ DataObject input = provider.getDataFactory().create(operationType.getInputType());
+ DataObject args = input;
+ args.setString(0, "123");
+ args.setString(1, "2");
+ args.setString(2, "transactionId-0001");
+ message.setBody(input);
+
+ WebServicePortMetaData portMetaData = getPortMetaData(interfaceType.getWSDLPortType().getQName().getNamespaceURI());
+ SOAPMediator mediator = new SOAPDocumentLiteralMediatorImpl(portMetaData);
+ SOAPEnvelopeImpl envelope = new SOAPEnvelopeImpl();
+ mediator.writeRequest(context, message, operationType, envelope);
+
+ String xml = envelope.getAsString();
+ System.out.println("Request:\n" + xml);
+
+ mediator.readRequest(context, envelope, message, operationType);
+ args = (DataObject) message.getBody();
+ Assert.assertEquals(args.get(0), "123");
+ Assert.assertEquals(args.get(1), "2");
+ Assert.assertEquals(args.get(2), "transactionId-0001");
+
+ message = messageFactory.createMessage();
+ DataObject output = provider.getDataFactory().create(operationType.getOutputType());
+ args = output;
+ args.setInt(0, 1);
+ message.setBody(output);
+ envelope = new SOAPEnvelopeImpl();
+ mediator.writeResponse(context, message, operationType, envelope);
+
+ xml = envelope.getAsString();
+ System.out.println("Response:\n" + xml);
+
+ mediator.readResponse(context, envelope, message, operationType);
+ args = (DataObject) message.getBody();
+ Assert.assertEquals(args.getInt(0), 1);
+
+ }
+
+ public void testRpcLit() throws Exception {
+ System.out.println("testRpcLit...");
+ MessageFactory messageFactory = new MessageFactoryImpl();
+ Message message = messageFactory.createMessage();
+
+ WSDLInterfaceType interfaceType = modelContext.getWSDLTypeHelper().getWSDLInterfaceType("http://www.example.org/Test/RpcLit#Test");
+ WSDLOperationType operationType = (WSDLOperationType) interfaceType.getOperationType("indexOf");
+
+ DataObject input = provider.getDataFactory().create(operationType.getInputType());
+ DataObject args = input;
+ args.setString(0, "123");
+ args.setString(1, "2");
+ message.setBody(input);
+
+ WebServicePortMetaData portMetaData = getPortMetaData(interfaceType.getWSDLPortType().getQName().getNamespaceURI());
+
+ SOAPMediator mediator = new SOAPRPCLiteralMediatorImpl(portMetaData);
+ SOAPEnvelopeImpl envelope = new SOAPEnvelopeImpl();
+ mediator.writeRequest(context, message, operationType, envelope);
+
+ String xml = envelope.getAsString();
+ System.out.println("Request:\n" + xml);
+ Assert.assertTrue(xml.contains("<part1>123</part1>"));
+ Assert.assertTrue(xml.contains("<part2>2</part2>"));
+
+ mediator.readRequest(context, envelope, message, operationType);
+ args = (DataObject) message.getBody();
+ Assert.assertEquals(args.get(0), "123");
+ Assert.assertEquals(args.get(1), "2");
+
+ message = messageFactory.createMessage();
+ DataObject output = provider.getDataFactory().create(operationType.getOutputType());
+ args = output;
+ args.setInt(0, 1);
+ message.setBody(output);
+ envelope = new SOAPEnvelopeImpl();
+ mediator.writeResponse(context, message, operationType, envelope);
+
+ xml = envelope.getAsString();
+ System.out.println("Response:\n" + xml);
+ Assert.assertTrue(xml.contains("<part1>1</part1>"));
+
+ mediator.readResponse(context, envelope, message, operationType);
+ args = (DataObject) message.getBody();
+ Assert.assertEquals(args.getInt(0), 1);
+
+ }
+
+ private WebServicePortMetaData getPortMetaData(String ns) {
+ WSDLTypeHelper typeHelper = modelContext.getWSDLTypeHelper();
+ Definition definition = typeHelper.getWSDLDefinition(ns);
+ QName portName = new QName(ns, "TestSOAP");
+ WebServicePortMetaData portMetaData = new WebServicePortMetaData(typeHelper, definition, portName, null, false);
+ return portMetaData;
+ }
+
+}
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/serialization/mediator/tests/SOAPMediatorTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/sandbox/binding.axis2/src/test/java/org/apache/tuscany/binding/axis2/serialization/mediator/tests/SOAPMediatorTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/sca.module
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/sca.module?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/sca.module (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/assembly/tests/sca.module Mon Feb 20 14:26:19 2006
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+
+ name="tuscany.binding.axis2.assembly.tests.bigbank.account">
+
+ <entryPoint name="AccountService">
+ <interface.java interface="org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account.AccountService"/>
+ <binding.ws port="http://www.bigbank.com/AccountService#AccountServiceSOAP"/>
+ <reference>AccountServiceComponent</reference>
+ </entryPoint>
+
+ <component name="AccountServiceComponent">
+ <implementation.java class="org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.account.AccountServiceImpl"/>
+ <properties>
+ <v:currency>EURO</v:currency>
+ </properties>
+ <references>
+ <v:accountDataService>AccountDataServiceComponent</v:accountDataService>
+ <v:stockQuoteService>StockQuoteService</v:stockQuoteService>
+ </references>
+ </component>
+
+ <component name="AccountDataServiceComponent">
+ <implementation.java class="org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.accountdata.AccountDataServiceImpl"/>
+ </component>
+
+ <!--
+ <component name="StockQuoteService">
+ <implementation.java class="org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.stockquote.StockQuoteServiceImpl"/>
+ </component>
+ -->
+
+ <externalService name="StockQuoteService">
+ <interface.java interface="org.apache.tuscany.binding.axis2.assembly.tests.bigbank.account.services.stockquote.StockQuoteService"/>
+ <binding.ws port="http://www.quickstockquote.com/StockQuoteService#StockQuoteServiceSOAP"/>
+ </externalService>
+
+</module>
+
Added: incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLit.wsdl
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLit.wsdl?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLit.wsdl (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLit.wsdl Mon Feb 20 14:26:19 2006
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.example.org/Test/DocLit"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Test"
+ targetNamespace="http://www.example.org/Test/DocLit">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.example.org/Test/DocLit"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.example.org/Test/DocLit">
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="target" type="xsd:string"/>
+ <xsd:element name="context" type="xsd:string"/>
+ <xsd:element name="index" type="xsd:int"/>
+ <xsd:element name="exception" type="xsd:string"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="testRequest">
+ <wsdl:part element="tns:source" name="part1"/>
+ <wsdl:part element="tns:target" name="part2"/>
+ <wsdl:part element="tns:context" name="part3"/>
+ </wsdl:message>
+ <wsdl:message name="testResponse">
+ <wsdl:part element="tns:index" name="part1"/>
+ </wsdl:message>
+ <wsdl:message name="testFault">
+ <wsdl:part name="testFault" element="tns:exception"></wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="Test">
+ <wsdl:operation name="indexOf">
+ <wsdl:input name="input" message="tns:testRequest"/>
+ <wsdl:output name="output" message="tns:testResponse"/>
+ <wsdl:fault name="fault" message="tns:testFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="TestSOAP" type="tns:Test">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="indexOf">
+ <soap:operation
+ soapAction="http://www.example.org/Test/indexOf"/>
+ <wsdl:input>
+ <soap:body parts="part1 part2" use="literal"/>
+ <soap:header message="tns:testRequest" part="part3" use="literal"></soap:header>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="fault">
+ <soap:fault namespace="http://www.example.org/Test/"
+ use="literal" name="fault"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="Test">
+ <wsdl:port binding="tns:TestSOAP" name="TestSOAP">
+ <soap:address
+ location="http://localhost:8080/TestWebServiceMediator/services/Test"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLitWrapped.wsdl
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLitWrapped.wsdl?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLitWrapped.wsdl (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLitWrapped.wsdl Mon Feb 20 14:26:19 2006
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.example.org/Test/DocLitWrapped"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Test"
+ targetNamespace="http://www.example.org/Test/DocLitWrapped">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.example.org/Test/DocLitWrapped"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/Test/DocLitWrapped">
+ <xsd:element name="indexOf">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="target" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="indexOfResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="index" type="xsd:int"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="exception" type="xsd:string"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="testRequest">
+ <wsdl:part element="tns:indexOf" name="part1"/>
+ </wsdl:message>
+ <wsdl:message name="testResponse">
+ <wsdl:part element="tns:indexOfResponse" name="part1"/>
+ </wsdl:message>
+ <wsdl:message name="testFault">
+ <wsdl:part name="testFault" element="tns:exception"></wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="Test">
+ <wsdl:operation name="indexOf">
+ <wsdl:input name="input" message="tns:testRequest"/>
+ <wsdl:output name="output" message="tns:testResponse"/>
+ <wsdl:fault name="fault" message="tns:testFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="TestSOAP" type="tns:Test">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="indexOf">
+ <soap:operation
+ soapAction="http://www.example.org/Test/indexOf"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="fault">
+ <soap:fault namespace="http://www.example.org/Test/"
+ use="literal" name="fault"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="Test">
+ <wsdl:port binding="tns:TestSOAP" name="TestSOAP">
+ <soap:address
+ location="http://localhost:8080/TestWebServiceMediator/services/Test"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/RpcLit.wsdl
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/RpcLit.wsdl?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/RpcLit.wsdl (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/RpcLit.wsdl Mon Feb 20 14:26:19 2006
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.example.org/Test/RpcLit"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Test"
+ targetNamespace="http://www.example.org/Test/RpcLit">
+ <wsdl:types>
+ <xsd:schema targetNamespace="http://www.example.org/Test/RpcLit"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.example.org/Test/RpcLit">
+ <!--
+ <xsd:element name="source" type="xsd:string"/>
+ <xsd:element name="target" type="xsd:string"/>
+ <xsd:element name="index" type="xsd:int" />
+ -->
+ <xsd:element name="exception" type="xsd:string"/>
+ </xsd:schema>
+ </wsdl:types>
+ <wsdl:message name="testRequest">
+ <wsdl:part type="xsd:string" name="part1"/>
+ <wsdl:part type="xsd:string" name="part2"/>
+ </wsdl:message>
+ <wsdl:message name="testResponse">
+ <wsdl:part type="xsd:int" name="part1"/>
+ </wsdl:message>
+ <wsdl:message name="testFault">
+ <wsdl:part name="testFault" element="tns:exception"></wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="Test">
+ <wsdl:operation name="indexOf">
+ <wsdl:input name="input" message="tns:testRequest"/>
+ <wsdl:output name="output" message="tns:testResponse"/>
+ <wsdl:fault name="fault" message="tns:testFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="TestSOAP" type="tns:Test">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="indexOf">
+ <soap:operation
+ soapAction="http://www.example.org/Test/indexOf"/>
+ <wsdl:input>
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"/>
+ </wsdl:output>
+ <wsdl:fault name="fault">
+ <soap:fault namespace="http://www.example.org/Test/"
+ use="literal" name="fault"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="Test">
+ <wsdl:port binding="tns:TestSOAP" name="TestSOAP">
+ <soap:address
+ location="http://localhost:8080/TestWebServiceMediator/services/Test"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/sca.module
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/sca.module?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/sca.module (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/resources/org/apache/tuscany/binding/axis2/serialization/mediator/tests/sca.module Mon Feb 20 14:26:19 2006
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="TestModule">
+
+</module>
Added: incubator/tuscany/sandbox/binding.axis2/src/test/resources/tuscany-model.config
URL: http://svn.apache.org/viewcvs/incubator/tuscany/sandbox/binding.axis2/src/test/resources/tuscany-model.config?rev=379259&view=auto
==============================================================================
--- incubator/tuscany/sandbox/binding.axis2/src/test/resources/tuscany-model.config (added)
+++ incubator/tuscany/sandbox/binding.axis2/src/test/resources/tuscany-model.config Mon Feb 20 14:26:19 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * Licensed 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.
+ -->
+<config:modelConfiguration xmlns:config="http://org.apache.tuscany/xmlns/model/config/0.9">
+
+ <resourceFactory className="org.apache.tuscany.model.types.xsd.impl.XSDResourceFactoryImpl" extension="xsd"/>
+ <dynamicPackageLoader className="org.apache.tuscany.model.types.xsd.impl.XSDDynamicPackageLoaderImpl" extension="xsd"/>
+
+ <resourceFactory className="org.apache.tuscany.model.types.wsdl.impl.WSDLResourceFactoryImpl" extension="wsdl"/>
+ <dynamicPackageLoader className="org.apache.tuscany.model.types.wsdl.impl.WSDLDynamicPackageLoaderImpl" extension="wsdl"/>
+ <dynamicPackage uri="http://www.example.org/Test/DocLitWrapped" location="org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLitWrapped.wsdl"/>
+ <dynamicPackage uri="http://www.example.org/Test/DocLit" location="org/apache/tuscany/binding/axis2/serialization/mediator/tests/DocLit.wsdl"/>
+ <dynamicPackage uri="http://www.example.org/Test/RpcLit" location="org/apache/tuscany/binding/axis2/serialization/mediator/tests/RpcLit.wsdl"/>
+
+</config:modelConfiguration>