You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/10/27 23:26:29 UTC

svn commit: r1028105 - in /tuscany/sca-java-1.x/trunk: itest/jaxws/src/main/java/jtest/ itest/jaxws/src/main/java/jtest/impl/ itest/jaxws/src/main/resources/ itest/jaxws/src/test/java/jtest/ modules/interface-java-jaxws/src/test/java/org/apache/tuscany...

Author: nash
Date: Wed Oct 27 21:26:27 2010
New Revision: 1028105

URL: http://svn.apache.org/viewvc?rev=1028105&view=rev
Log:
Merge remaining r743192 changes from 2.x to 1.x and add a new itest for @XmlJavaTypeAdapter

Added:
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAbstract.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAdapter.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestClient.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete1.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete2.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestService.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestClientImpl.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestServiceImpl.java
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/resources/jtest.composite
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/test/java/jtest/
    tuscany/sca-java-1.x/trunk/itest/jaxws/src/test/java/jtest/DatatypesTestCase.java
    tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterface.java
    tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterfaceImpl.java
    tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestAdapter.java
Modified:
    tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestInterface.java

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAbstract.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAbstract.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAbstract.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAbstract.java Wed Oct 27 21:26:27 2010
@@ -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 jtest;
+
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * The test abstract class
+ */
+@XmlJavaTypeAdapter(TestAdapter.class)
+public abstract class TestAbstract {
+
+    public abstract String getGreeting();
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAdapter.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAdapter.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAdapter.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestAdapter.java Wed Oct 27 21:26:27 2010
@@ -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 jtest;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+/**
+ * The test XML adapter class
+ */
+public class TestAdapter extends XmlAdapter<String, TestAbstract> {
+    public TestAbstract unmarshal(String v) throws Exception {
+        return (TestAbstract)this.getClass().getClassLoader().loadClass(v).newInstance();
+    }
+    public String marshal(TestAbstract v) throws Exception {
+        return v.getClass().getName();
+    }
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestClient.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestClient.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestClient.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestClient.java Wed Oct 27 21:26:27 2010
@@ -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 jtest;
+
+/**
+ * The test client interface
+ */
+public interface TestClient {
+
+    void runTest();
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete1.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete1.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete1.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete1.java Wed Oct 27 21:26:27 2010
@@ -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 jtest;
+
+/**
+ * A test concrete class
+ */
+public class TestConcrete1 extends TestAbstract {
+
+    public String getGreeting() {
+        return "Hello";
+    }
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete2.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete2.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete2.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestConcrete2.java Wed Oct 27 21:26:27 2010
@@ -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 jtest;
+
+/**
+ * A test concrete class
+ */
+public class TestConcrete2 extends TestAbstract {
+
+    public String getGreeting() {
+        return "World";
+    }
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestService.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestService.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestService.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/TestService.java Wed Oct 27 21:26:27 2010
@@ -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 jtest;
+
+import org.osoa.sca.annotations.Remotable;
+
+import jtest.TestAbstract;
+
+/**
+ * The test service interface
+ */
+@Remotable
+public interface TestService {
+
+    void sendAbstract(TestAbstract data1, TestAbstract data2);
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestClientImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestClientImpl.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestClientImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestClientImpl.java Wed Oct 27 21:26:27 2010
@@ -0,0 +1,44 @@
+/*
+ * 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 jtest.impl;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+import jtest.TestClient;
+import jtest.TestConcrete1;
+import jtest.TestConcrete2;
+import jtest.TestService;
+
+/**
+ * The test client implementation
+ */
+@Service(TestClient.class)
+public class TestClientImpl implements TestClient {
+
+    @Reference
+    protected TestService ref;
+
+    public void runTest() {
+        TestConcrete1 data1 = new TestConcrete1();
+        TestConcrete2 data2 = new TestConcrete2();
+        ref.sendAbstract(data1, data2);
+    }
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestServiceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestServiceImpl.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestServiceImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/java/jtest/impl/TestServiceImpl.java Wed Oct 27 21:26:27 2010
@@ -0,0 +1,38 @@
+/*
+ * 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 jtest.impl;
+
+import org.osoa.sca.annotations.Service;
+
+import jtest.TestAbstract;
+import jtest.TestService;
+
+/**
+ * The test service implementation
+ */
+@Service(TestService.class)
+public class TestServiceImpl implements TestService {
+
+    public void sendAbstract(TestAbstract data1, TestAbstract data2) {
+        System.out.println("data1 is instance of class " + data1.getClass().getName());
+        System.out.println("data2 is instance of class " + data2.getClass().getName());
+        System.out.println(data1.getGreeting() + " " + data2.getGreeting());
+    }
+}

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/resources/jtest.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/resources/jtest.composite?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/resources/jtest.composite (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/main/resources/jtest.composite Wed Oct 27 21:26:27 2010
@@ -0,0 +1,38 @@
+<?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" 
+           targetNamespace="http://jtest/"
+           name="jtest">
+           
+    <component name="TestClient">
+        <implementation.java class="jtest.impl.TestClientImpl" />
+        <reference name="ref">
+            <binding.ws uri="http://localhost:8081/TestService" />
+        </reference>
+    </component>
+
+    <component name="TestService">
+        <implementation.java class="jtest.impl.TestServiceImpl" />
+        <service name="TestService">
+            <binding.ws uri="http://localhost:8081/TestService" />
+        </service>
+    </component>
+    
+</composite>

Added: tuscany/sca-java-1.x/trunk/itest/jaxws/src/test/java/jtest/DatatypesTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/itest/jaxws/src/test/java/jtest/DatatypesTestCase.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/itest/jaxws/src/test/java/jtest/DatatypesTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/itest/jaxws/src/test/java/jtest/DatatypesTestCase.java Wed Oct 27 21:26:27 2010
@@ -0,0 +1,54 @@
+/*
+ * 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 jtest;
+
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class DatatypesTestCase {
+    private static SCANode node;
+
+    @BeforeClass
+    public static void setUpBeforeClass() throws Exception {
+        node = SCANodeFactory.newInstance().createSCANode("jtest.composite", 
+                new SCAContribution("payment", "./target/classes"));
+        node.start();
+    }
+    
+    @Test
+    public void runTest() {
+        SCAClient client = (SCAClient)node;
+        TestClient testClient = client.getService(TestClient.class, "TestClient");
+        testClient.runTest();
+    }
+    
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {
+        if (node != null) {
+            node.stop();
+            node = null;
+        }
+    }
+}

Added: tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterface.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterface.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterface.java (added)
+++ tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterface.java Wed Oct 27 21:26:27 2010
@@ -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.interfacedef.java.jaxws;
+
+/**
+ * Bean Interface 
+ */
+public interface BeanInterface {
+    String getAttr();
+    void setAttr(String attr);
+}

Added: tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterfaceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterfaceImpl.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterfaceImpl.java (added)
+++ tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/BeanInterfaceImpl.java Wed Oct 27 21:26:27 2010
@@ -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.interfacedef.java.jaxws;
+
+/**
+ * Impl of BeanInterface
+ */
+public class BeanInterfaceImpl implements BeanInterface {
+    private String attr;
+
+    public String getAttr() {
+        return attr;
+    }
+
+    public void setAttr(String attr) {
+        this.attr = attr;
+    }
+}

Added: tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestAdapter.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestAdapter.java?rev=1028105&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestAdapter.java (added)
+++ tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestAdapter.java Wed Oct 27 21:26:27 2010
@@ -0,0 +1,39 @@
+/*
+ * 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.interfacedef.java.jaxws;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+/**
+ * Test XML Adapter
+ */
+public class TestAdapter extends XmlAdapter<BeanInterfaceImpl, BeanInterface> {
+
+    @Override
+    public BeanInterfaceImpl marshal(BeanInterface v) throws Exception {
+        return (BeanInterfaceImpl)v;
+    }
+
+    @Override
+    public BeanInterface unmarshal(BeanInterfaceImpl v) throws Exception {
+        return v;
+    }
+
+}

Modified: tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestInterface.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestInterface.java?rev=1028105&r1=1028104&r2=1028105&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestInterface.java (original)
+++ tuscany/sca-java-1.x/trunk/modules/interface-java-jaxws/src/test/java/org/apache/tuscany/sca/interfacedef/java/jaxws/TestInterface.java Wed Oct 27 21:26:27 2010
@@ -27,6 +27,7 @@ import java.util.Map;
 import javax.jws.WebMethod;
 import javax.jws.WebParam;
 import javax.jws.WebResult;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 import javax.xml.ws.Holder;
 
 import org.osoa.sca.annotations.Remotable;
@@ -60,7 +61,10 @@ public interface TestInterface {
     
     @WebMethod
     @WebResult(name = "output")
-    String webMethod(@WebParam(name = "input", mode = WebParam.Mode.IN)
-    String in, @WebParam(name = "holder", mode = WebParam.Mode.INOUT)
-    Holder<String> holder);
+    String webMethod(@WebParam(name = "input", mode = WebParam.Mode.IN) String in,
+                     @WebParam(name = "holder", mode = WebParam.Mode.INOUT) Holder<String> holder);
+
+    @XmlJavaTypeAdapter(type = BeanInterface.class, value = TestAdapter.class)
+    BeanInterface beanMethod(@XmlJavaTypeAdapter(type = BeanInterface.class, value = TestAdapter.class) BeanInterface in,
+                             String str);
 }