summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:13:31 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-11 23:13:31 +0000
commit3caf8614f25d6b1962e20331fdf423c863bc02f3 (patch)
tree069fa30b63dd4804846385d8571928bdaa7b73ad /branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src
parent6d0e93c68d3aeaeb4bb6d96ac0460eec40ef786e (diff)
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835144 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src')
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java34
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java34
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.java48
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java44
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite67
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl88
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd30
-rw-r--r--branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java85
8 files changed, 0 insertions, 430 deletions
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java
deleted file mode 100644
index cb508dd109..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.itest.jaxbdatabinding;
-
-import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType;
-import org.osoa.sca.annotations.Remotable;
-
-/**
- *
- */
-@Remotable
-public interface GreeterService {
-
- // @DataType(name = "javax.xml.bind.JAXBElement")
- PersonType greet(PersonType who);
-
-}
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java
deleted file mode 100644
index c47d5143ba..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClient.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.itest.jaxbdatabinding;
-
-import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType;
-import org.osoa.sca.annotations.AllowsPassByReference;
-
-/**
- *
- */
-@AllowsPassByReference
-public interface GreeterServiceClient {
-
- // @DataType(name = "javax.xml.bind.JAXBElement")
- PersonType greet(PersonType who);
-
-}
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.java b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.java
deleted file mode 100644
index fbad08f5ac..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceClientImpl.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.itest.jaxbdatabinding;
-
-import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
-
-/**
- *
- */
-@Service(GreeterServiceClient.class)
-public class GreeterServiceClientImpl implements GreeterServiceClient {
-
- private GreeterService service;
-
- @Reference
- public void setGreeterService(GreeterService service) {
- this.service = service;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClient#greet(org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType)
- */
- public PersonType greet(PersonType who) {
- return service.greet(who);
- }
-
-}
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java
deleted file mode 100644
index 0d6c0f01e1..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/java/org/apache/tuscany/sca/itest/jaxbdatabinding/GreeterServiceImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.itest.jaxbdatabinding;
-
-import org.osoa.sca.annotations.Service;
-
-import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType;
-
-/**
- *
- */
-@Service(GreeterService.class)
-public class GreeterServiceImpl implements GreeterService {
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterService#greet(javax.xml.bind.JAXBElement)
- */
- public PersonType greet(PersonType who) {
- // System.out.println(who.toString());
- who.setGreeting("Hello");
- // System.out.println(who.toString());
- return who;
- }
-
-}
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite
deleted file mode 100644
index 4a27a8ba5d..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/greeterws.composite
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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://www.osoa.org/xmlns/sca/1.0" xmlns:wsdli="http://www.w3.org/2006/01/wsdl-instance"
- name="JAXBGreeterService">
-
- <!-- Services Exposed via different bindings -->
- <service name="JAXBGreeterServiceDefaultBinding">
- <interface.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterService" />
- <reference>JAXBGreeterServiceComponent</reference>
- </service>
-
- <service name="JAXBGreeterServiceWebServiceBinding">
- <interface.wsdl interface="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.interface(GreeterPortType)"
- wsdli:wsdlLocation="http://apache.org/tuscany/sca/itest/databinding/services wsdl/Greeter.wsdl" />
- <binding.ws
- endpoint="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.endpoint(GreeterService/GreeterPort)"
- location="wsdl/Greeter.wsdl" />
- <reference>JAXBGreeterServiceComponent</reference>
- </service>
-
- <!-- Components used to implement the services -->
- <component name="JAXBGreeterServiceComponent">
- <implementation.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceImpl" />
- </component>
-
-
- <!-- Clients to test the services -->
- <component name="DefaultJAXBGreeterServiceClient">
- <implementation.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClientImpl" />
- <reference name="greeterService">JAXBGreeterServiceDefaultRef</reference>
- </component>
-
- <component name="JAXBGreeterServiceDefaultRef">
- <implementation.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceImpl" />
- </component>
-
- <component name="WSJAXBGreeterServiceClient">
- <implementation.java class="org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClientImpl" />
- <reference name="greeterService">JAXBGreeterServiceWSRef</reference>
- </component>
-
- <reference name="JAXBGreeterServiceWSRef">
- <interface.wsdl interface="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.interface(GreeterPortType)"
- wsdli:wsdlLocation="http://apache.org/tuscany/sca/itest/databinding/services wsdl/Greeter.wsdl" />
- <binding.ws
- endpoint="http://apache.org/tuscany/sca/itest/databinding/services#wsdl.endpoint(GreeterService/GreeterPort)"
- location="wsdl/Greeter.wsdl" />
- </reference>
-
-</composite>
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl
deleted file mode 100644
index 4977cfc274..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/wsdl/Greeter.wsdl
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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://apache.org/tuscany/sca/itest/databinding/services"
- xmlns:tns="http://apache.org/tuscany/sca/itest/databinding/services" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Greeter">
-
- <wsdl:types>
- <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:dataTypes="http://apache.org/tuscany/sca/itest/databinding/types"
- targetNamespace="http://apache.org/tuscany/sca/itest/databinding/services" elementFormDefault="qualified">
-
- <xsd:import namespace="http://apache.org/tuscany/sca/itest/databinding/types" schemaLocation="../xsd/Person.xsd" />
-
- <xsd:element name="Person" type="dataTypes:PersonType" />
-
- <element name="greet">
- <complexType>
- <sequence>
- <element name="person" type="dataTypes:PersonType" />
- </sequence>
- </complexType>
- </element>
-
- <element name="greetResponse">
- <complexType>
- <sequence>
- <element name="person" type="dataTypes:PersonType" />
- </sequence>
- </complexType>
- </element>
-
-
- </xsd:schema>
- </wsdl:types>
-
- <wsdl:message name="request">
- <wsdl:part element="tns:greet" name="parameters" />
- </wsdl:message>
-
- <wsdl:message name="response">
- <wsdl:part element="tns:greetResponse" name="parameters" />
- </wsdl:message>
-
- <wsdl:portType name="GreeterPortType">
- <wsdl:operation name="greet">
- <wsdl:input message="tns:request" name="requestMsg" />
- <wsdl:output message="tns:response" name="responseMsg" />
- </wsdl:operation>
- </wsdl:portType>
-
-
- <wsdl:binding name="GreeterBinding" type="tns:GreeterPortType">
- <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="greet">
- <wsdlsoap:operation soapAction="" />
- <wsdl:input name="requestMsg">
- <wsdlsoap:body use="literal" />
- </wsdl:input>
- <wsdl:output name="responseMsg">
- <wsdlsoap:body use="literal" />
- </wsdl:output>
- </wsdl:operation>
- </wsdl:binding>
-
- <wsdl:service name="GreeterService">
- <wsdl:port name="GreeterPort" binding="tns:GreeterBinding">
- <wsdlsoap:address location="http://localhost:8080/services/JAXBGreeterServiceWebServiceBinding" />
- </wsdl:port>
- </wsdl:service>
-
-</wsdl:definitions>
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd
deleted file mode 100644
index 5f5021b15e..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/main/resources/xsd/Person.xsd
+++ /dev/null
@@ -1,30 +0,0 @@
-<?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 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://apache.org/tuscany/sca/itest/databinding/types">
-
- <xsd:complexType name="PersonType">
- <xsd:sequence>
- <xsd:element name="firstName" type="xsd:string" />
- <xsd:element name="lastName" type="xsd:string" />
- <xsd:element name="greeting" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
-</xsd:schema>
diff --git a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java b/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java
deleted file mode 100644
index da65bea4b3..0000000000
--- a/branches/sca-java-integration/testing/sca/itest/databindings/jaxb/src/test/java/org/apache/tuscany/sca/itest/JaxbDatabindingTestCase.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.itest;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.apache.tuscany.api.SCARuntime;
-import org.apache.tuscany.sca.itest.jaxbdatabinding.GreeterServiceClient;
-import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.ObjectFactory;
-import org.apache.tuscany.sca.itest.jaxbdatabinding.generated.PersonType;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.osoa.sca.CompositeContext;
-import org.osoa.sca.CurrentCompositeContext;
-
-/**
- *
- */
-public class JaxbDatabindingTestCase {
- private GreeterServiceClient greeterClient;
-
- @BeforeClass
- public static void init() {
- SCARuntime.start("greeterws.composite");
- }
-
- private void setUpClient(String binding) throws Exception {
- CompositeContext ctx = CurrentCompositeContext.getContext();
- greeterClient = ctx.locateService(GreeterServiceClient.class, binding + "JAXBGreeterServiceClient");
- }
-
- /**
- * Invokes the JAXB Greet service using web service bindings with JAXB payload
- *
- * @throws Exception
- */
- @Test
- public void testWSGreet() throws Exception {
- setUpClient("WS");
- greet();
- }
-
- /**
- * Invokes the JAXB Greet service using default with JAXB payload
- *
- * @throws Exception
- */
- @Test
- public void testDefaultGreet() throws Exception {
- setUpClient("Default");
- greet();
- }
-
- public void greet() {
- ObjectFactory factory = new ObjectFactory();
- PersonType person = factory.createPersonType();
- person.setFirstName("George");
- person.setLastName("Doors");
- // System.out.println("Client side: " + person.getFirstName() + " " + person.getLastName() + " " +
- // person.getGreeting());
- PersonType greetedPerson = greeterClient.greet(person);
- // System.out.println("Client side: " + greetedPerson.getFirstName() + " " + greetedPerson.getLastName() + " " +
- // greetedPerson.getGreeting());
- Assert.assertNotSame("greetedPerson.getGreeting() not set", "", greetedPerson.getGreeting());
- }
-
-}