You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/06/07 09:15:40 UTC
svn commit: r664294 [6/10] - in
/incubator/tuscany/sandbox/sebastien/java/sca-test2: ./ demos/
demos/bigbank/ demos/bigbank/src/main/java/bigbank/account/feed/
demos/secure-bigbank/ demos/secure-bigbank/secure-bigbank-account/
demos/secure-bigbank/secu...
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java Sat Jun 7 00:15:29 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.corba.testing.generated;
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java Sat Jun 7 00:15:29 2008
@@ -1,5 +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.corba.testing.hierarchy;
+/**
+ * @version $Rev$ $Date$
+ */
public class SimpleStruct {
public String field1;
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java Sat Jun 7 00:15:29 2008
@@ -1,5 +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.corba.testing.hierarchy;
+/**
+ * @version $Rev$ $Date$
+ */
public class SomeStruct {
public SimpleStruct innerStruct;
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java Sat Jun 7 00:15:29 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.corba.testing.servants;
import org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject;
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java Sat Jun 7 00:15:29 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.corba.testing.servants;
import org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject;
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java Sat Jun 7 00:15:29 2008
@@ -1,3 +1,22 @@
+/*
+ * 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.corba.testing.servants;
import org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct;
@@ -9,6 +28,9 @@
import org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder;
import org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder;
+/**
+ * @version $Rev$ $Date$
+ */
public class TestObjectServant extends _TestObjectImplBase {
private static final long serialVersionUID = 1L;
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/resources/tester.idl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/resources/tester.idl?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/resources/tester.idl (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-corba/src/test/resources/tester.idl Sat Jun 7 00:15:29 2008
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ */
+
+module Tester {
+
+ interface RemoteObject {
+
+ };
+
+ typedef sequence<RemoteObject> remote_object_list;
+ typedef sequence<boolean> boolean_list;
+ typedef sequence<char> char_list;
+ typedef sequence<wchar> wchar_list;
+ typedef sequence<octet> octet_list;
+ typedef sequence<short> short_list;
+ typedef sequence<unsigned short> unsigned_short_list;
+ typedef sequence<long> long_list;
+ typedef sequence<unsigned long> unsigned_long_list;
+ typedef sequence<long long> long_long_list;
+ typedef sequence<unsigned long long> unsigned_long_long_list;
+ typedef sequence<float> float_list;
+ typedef sequence<double> double_list;
+ typedef sequence<string> string_list;
+ typedef sequence<wstring> wstring_list;
+
+ interface PrimitivesSetter {
+ boolean setBoolean(in boolean arg);
+ char setChar(in char arg);
+ wchar setWchar(in wchar arg);
+ octet setOctet(in octet arg);
+ short setShort(in short arg);
+ unsigned short setUnsignedShort(in unsigned short arg);
+ long setLong(in long arg);
+ unsigned long setUnsignedLong(in unsigned long arg);
+ long long setLongLong(in long long arg);
+ unsigned long long setUnsignedLongLong(in unsigned long long arg);
+ float setFloat(in float arg);
+ double setDouble(in double arg);
+ string setString(in string arg);
+ wstring setWstring(in wstring arg);
+ RemoteObject setRemoteObject(in RemoteObject obj);
+ };
+
+ interface ArraysSetter {
+ boolean_list setBoolean(in boolean_list arg);
+ char_list setChar(in char_list arg);
+ wchar_list setWchar(in wchar_list arg);
+ octet_list setOctet(in octet_list arg);
+ short_list setShort(in short_list arg);
+ unsigned_short_list setUnsignedShort(in unsigned_short_list arg);
+ long_list setLong(in long_list arg);
+ unsigned_long_list setUnsignedLong(in unsigned_long_list arg);
+ long_long_list setLongLong(in long_long_list arg);
+ unsigned_long_long_list setUnsignedLongLong(in unsigned_long_long_list arg);
+ float_list setFloat(in float_list arg);
+ double_list setDouble(in double_list arg);
+ string_list setString(in string_list arg);
+ wstring_list setWstring(in wstring_list arg);
+ remote_object_list setRemoteObject(in remote_object_list obj);
+ };
+
+ typedef sequence<long> long_seq1;
+ typedef sequence<long_seq1> long_seq2;
+ typedef sequence<long_seq2> long_seq3;
+
+ struct SimpleStruct {
+ string field1;
+ long field2;
+ };
+
+
+ struct SomeStruct {
+ SimpleStruct innerStruct;
+ string str;
+ string_list str_list;
+ long_seq2 twoDimSeq;
+ long_seq3 threeDimSeq;
+ };
+
+ interface TestObject {
+ SomeStruct pickStructFromArgs(inout SomeStruct arg1, inout SomeStruct arg2, inout SomeStruct arg3, in long structNumber);
+ SomeStruct setStruct(inout SomeStruct arg);
+ SimpleStruct setSimpleStruct(inout SimpleStruct arg);
+ long_seq1 setLongSeq1(inout long_seq1 arg);
+ long_seq2 setLongSeq2(inout long_seq2 arg);
+ long_seq3 setLongSeq3(inout long_seq3 arg);
+ };
+
+};
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/pom.xml?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/pom.xml (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/pom.xml Sat Jun 7 00:15:29 2008
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-data-api</artifactId>
+ <artifactId>tuscany-data-api</artifactId>
<version>2.0-incubating-SNAPSHOT</version>
</dependency>
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-feed/src/main/java/org/apache/tuscany/sca/binding/feed/provider/FeedBindingListenerServlet.java Sat Jun 7 00:15:29 2008
@@ -36,8 +36,8 @@
import javax.xml.namespace.QName;
import org.apache.commons.codec.binary.Base64;
+import org.apache.tuscany.sca.data.collection.Item;
import org.apache.tuscany.sca.databinding.Mediator;
-import org.apache.tuscany.sca.implementation.data.collection.Item;
import org.apache.tuscany.sca.interfacedef.DataType;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
@@ -226,13 +226,13 @@
if (responseMessage.isFault()) {
throw new ServletException((Throwable)responseMessage.getBody());
}
- org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[] collection =
- (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[])responseMessage.getBody();
+ org.apache.tuscany.sca.data.collection.Entry<Object, Object>[] collection =
+ (org.apache.tuscany.sca.data.collection.Entry<Object, Object>[])responseMessage.getBody();
if (collection != null) {
// Create the feed
feed = new Feed();
feed.setTitle("Feed");
- for (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry: collection) {
+ for (org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry: collection) {
Entry feedEntry = createFeedEntry(entry);
feed.getEntries().add(feedEntry);
}
@@ -275,7 +275,7 @@
// The service implementation only returns a data item, create an entry
// from it
- feedEntry = createFeedEntry(new org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>(id, responseMessage.getBody()));
+ feedEntry = createFeedEntry(new org.apache.tuscany.sca.data.collection.Entry<Object, Object>(id, responseMessage.getBody()));
}
// Write the Atom entry
@@ -328,13 +328,13 @@
if (responseMessage.isFault()) {
throw new ServletException((Throwable)responseMessage.getBody());
}
- org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[] collection =
- (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[])responseMessage.getBody();
+ org.apache.tuscany.sca.data.collection.Entry<Object, Object>[] collection =
+ (org.apache.tuscany.sca.data.collection.Entry<Object, Object>[])responseMessage.getBody();
if (collection != null) {
// Create the feed
feed = new Feed();
feed.setTitle("Feed");
- for (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry: collection) {
+ for (org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry: collection) {
Entry feedEntry = createFeedEntry(entry);
feed.getEntries().add(feedEntry);
}
@@ -368,7 +368,7 @@
* @param entry
* @return
*/
- private Entry createFeedEntry(org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry) {
+ private Entry createFeedEntry(org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry) {
Object key = entry.getKey();
Object data = entry.getData();
if (data instanceof Item) {
@@ -444,7 +444,7 @@
* @param feedEntry
* @return
*/
- private org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> createEntry(Entry feedEntry) {
+ private org.apache.tuscany.sca.data.collection.Entry<Object, Object> createEntry(Entry feedEntry) {
if (feedEntry != null) {
if (itemClassType.getPhysical() == Item.class) {
String key = feedEntry.getId();
@@ -473,7 +473,7 @@
item.setDate(feedEntry.getCreated());
- return new org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>(key, item);
+ return new org.apache.tuscany.sca.data.collection.Entry<Object, Object>(key, item);
} else {
String key = feedEntry.getId();
@@ -487,7 +487,7 @@
String value = content.getValue();
Object data = mediator.mediate(value, itemXMLType, itemClassType, null);
- return new org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>(key, data);
+ return new org.apache.tuscany.sca.data.collection.Entry<Object, Object>(key, data);
}
} else {
return null;
@@ -540,7 +540,7 @@
// The service implementation does not support feed entries, pass the data item to it
Message requestMessage = messageFactory.createMessage();
- org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry = createEntry(feedEntry);
+ org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry = createEntry(feedEntry);
requestMessage.setBody(new Object[] {entry.getKey(), entry.getData()});
Message responseMessage = postInvoker.invoke(requestMessage);
if (responseMessage.isFault()) {
@@ -654,7 +654,7 @@
// The service implementation does not support feed entries, pass the data item to it
Message requestMessage = messageFactory.createMessage();
- org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry = createEntry(feedEntry);
+ org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry = createEntry(feedEntry);
requestMessage.setBody(new Object[] {entry.getKey(), entry.getData()});
Message responseMessage = putInvoker.invoke(requestMessage);
if (responseMessage.isFault()) {
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-http/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-http/pom.xml?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-http/pom.xml (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-http/pom.xml Sat Jun 7 00:15:29 2008
@@ -50,7 +50,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-data-api</artifactId>
+ <artifactId>tuscany-data-api</artifactId>
<version>2.0-incubating-SNAPSHOT</version>
</dependency>
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/pom.xml?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/pom.xml (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/pom.xml Sat Jun 7 00:15:29 2008
@@ -50,7 +50,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-data-api</artifactId>
+ <artifactId>tuscany-data-api</artifactId>
<version>2.0-incubating-SNAPSHOT</version>
</dependency>
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingListenerServlet.java Sat Jun 7 00:15:29 2008
@@ -36,8 +36,8 @@
import javax.xml.namespace.QName;
import org.apache.commons.codec.binary.Base64;
+import org.apache.tuscany.sca.data.collection.Item;
import org.apache.tuscany.sca.databinding.Mediator;
-import org.apache.tuscany.sca.implementation.data.collection.Item;
import org.apache.tuscany.sca.interfacedef.DataType;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.impl.DataTypeImpl;
@@ -161,14 +161,14 @@
if (responseMessage.isFault()) {
throw new ServletException((Throwable)responseMessage.getBody());
}
- org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[] collection =
- (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>[])responseMessage.getBody();
+ org.apache.tuscany.sca.data.collection.Entry<Object, Object>[] collection =
+ (org.apache.tuscany.sca.data.collection.Entry<Object, Object>[])responseMessage.getBody();
if (collection != null) {
// Create the feed
feed = new SyndFeedImpl();
feed.setTitle("Feed");
- for (org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry: collection) {
+ for (org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry: collection) {
SyndEntry feedEntry = createFeedEntry(entry);
feed.getEntries().add(feedEntry);
}
@@ -200,7 +200,7 @@
* @param entry
* @return
*/
- private SyndEntry createFeedEntry(org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> entry) {
+ private SyndEntry createFeedEntry(org.apache.tuscany.sca.data.collection.Entry<Object, Object> entry) {
Object key = entry.getKey();
Object data = entry.getData();
if (data instanceof Item) {
@@ -276,7 +276,7 @@
* @param feedEntry
* @return
*/
- private org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object> createEntry(SyndEntry feedEntry) {
+ private org.apache.tuscany.sca.data.collection.Entry<Object, Object> createEntry(SyndEntry feedEntry) {
if (feedEntry != null) {
if (itemClassType.getPhysical() == Item.class) {
String key = feedEntry.getUri();
@@ -305,7 +305,7 @@
item.setDate(feedEntry.getPublishedDate());
- return new org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>(key, item);
+ return new org.apache.tuscany.sca.data.collection.Entry<Object, Object>(key, item);
} else {
String key = feedEntry.getUri();
@@ -319,7 +319,7 @@
String value = content.getValue();
Object data = mediator.mediate(value, itemXMLType, itemClassType, null);
- return new org.apache.tuscany.sca.implementation.data.collection.Entry<Object, Object>(key, data);
+ return new org.apache.tuscany.sca.data.collection.Entry<Object, Object>(key, data);
}
} else {
return null;
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss/pom.xml?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss/pom.xml (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-rss/pom.xml Sat Jun 7 00:15:29 2008
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-implementation-data-api</artifactId>
+ <artifactId>tuscany-data-api</artifactId>
<version>2.0-incubating-SNAPSHOT</version>
</dependency>
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/Account.java Sat Jun 7 00:15:29 2008
@@ -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.osoa.sca.annotations.Remotable;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Account {
+
+ CustomerProfileData getCustomerProfile(String loginID);
+
+}
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/AccountService.java Sat Jun 7 00:15:29 2008
@@ -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);
+ }
+
+}
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/CustomerProfileData.java Sat Jun 7 00:15:29 2008
@@ -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;
+ }
+
+}
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCaseFIXME.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCaseFIXME.java?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCaseFIXME.java (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLImportTestCaseFIXME.java Sat Jun 7 00:15:29 2008
@@ -0,0 +1,84 @@
+/*
+ * 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.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.host.embedded.SCADomain;
+
+/**
+ * Test ?wsdl works and that the returned WSDL has the correct endpoint
+ *
+ * @version $Rev$ $Date$
+ */
+public class QuestionMarkWSDLImportTestCaseFIXME extends TestCase {
+
+ private SCADomain domain;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLImportPortEndpoint() 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:8086/AccountService?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://account2", "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 {
+ domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ domain.close();
+ }
+
+}
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/QuestionMarkWSDLIncludeTestCaseFIXME.java Sat Jun 7 00:15:29 2008
@@ -0,0 +1,84 @@
+/*
+ * 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.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.host.embedded.SCADomain;
+
+/**
+ * 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 QuestionMarkWSDLIncludeTestCaseFIXME extends TestCase {
+
+ private SCADomain domain;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLIncludePortEndpoint() 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/AccountService?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://accounts", "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 {
+ domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ domain.close();
+ }
+
+}
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/customerdata.xsd Sat Jun 7 00:15:29 2008
@@ -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>
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-import.wsdl Sat Jun 7 00:15:29 2008
@@ -0,0 +1,90 @@
+<?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: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://account2"
+ xmlns:account="http://accounts"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:import namespace="http://accounts" schemaLocation="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="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:8086/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-include.wsdl Sat Jun 7 00:15:29 2008
@@ -0,0 +1,90 @@
+<?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="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="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>
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-import.composite Sat Jun 7 00:15:29 2008
@@ -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://www.osoa.org/xmlns/sca/1.0"
+ name="QuestionMarkWSDLImport">
+
+ <service name="ep1" promote="AccountService">
+ <binding.ws wsdlElement="http://account2#wsdl.port(AccountService/AccountSoapPort)" />
+ </service>
+
+ <component name="AccountService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.AccountService" />
+ </component>
+
+</composite>
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/questionmark-wsdl-include.composite Sat Jun 7 00:15:29 2008
@@ -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://www.osoa.org/xmlns/sca/1.0"
+ name="QuestionMarkWSDLInclude">
+
+ <service name="ep1" promote="AccountService">
+ <binding.ws wsdlElement="http://accounts#wsdl.port(AccountService/AccountSoapPort)" />
+ </service>
+
+ <component name="AccountService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.itests.AccountService" />
+ </component>
+
+</composite>
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/processor/DataBindingJavaInterfaceProcessor.java Sat Jun 7 00:15:29 2008
@@ -27,6 +27,7 @@
import java.util.Map;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
+import org.apache.tuscany.sca.databinding.WrapperHandler;
import org.apache.tuscany.sca.databinding.annotation.DataBinding;
import org.apache.tuscany.sca.databinding.javabeans.JavaBeansDataBinding;
import org.apache.tuscany.sca.databinding.javabeans.SimpleJavaDataBinding;
@@ -36,6 +37,7 @@
import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
import org.apache.tuscany.sca.interfacedef.java.JavaOperation;
import org.apache.tuscany.sca.interfacedef.java.introspect.JavaInterfaceVisitor;
+import org.apache.tuscany.sca.interfacedef.util.WrapperInfo;
/**
* The databinding annotation processor for java interfaces
@@ -114,7 +116,7 @@
d.setDataBinding(value);
}
}
- dataBindingRegistry.introspectType(d, method.getParameterAnnotations()[i]);
+ dataBindingRegistry.introspectType(d, operation);
i++;
}
if (operation.getOutputType() != null) {
@@ -127,14 +129,14 @@
if (dt != null) {
d.setDataBinding(dt.value());
}
- dataBindingRegistry.introspectType(d, method.getAnnotations());
+ dataBindingRegistry.introspectType(d, operation);
}
for (org.apache.tuscany.sca.interfacedef.DataType<?> d : operation.getFaultTypes()) {
if (d.getDataBinding() == null) {
d.setDataBinding(dataBindingId);
}
// TODO: Handle exceptions
- dataBindingRegistry.introspectType(d, method.getAnnotations(), true);
+ dataBindingRegistry.introspectType(d, operation);
}
// JIRA: TUSCANY-842
@@ -143,8 +145,17 @@
assignOperationDataBinding(operation);
}
- // FIXME: Do we want to heuristically check the wrapper style?
- // introspectWrapperStyle(operation);
+ // Introspect the wrapper data type
+ if (operation.getWrapper() != null) {
+ org.apache.tuscany.sca.databinding.DataBinding dbObj =
+ dataBindingRegistry.getDataBinding(operation.getDataBinding());
+ WrapperHandler handler = dbObj == null ? null : dbObj.getWrapperHandler();
+ if (handler != null) {
+ WrapperInfo wrapper = operation.getWrapper();
+ wrapper.setInputWrapperType(handler.getWrapperType(operation, true));
+ wrapper.setOutputWrapperType(handler.getWrapperType(operation, false));
+ }
+ }
}
}
@@ -173,7 +184,7 @@
String dataBinding = d.getDataBinding();
// Assumes JavaBeans DB is default
if (dataBinding != null && !dataBinding.equals(JavaBeansDataBinding.NAME)
- && !dataBinding.equals(SimpleJavaDataBinding.NAME)) {
+ && !dataBinding.equals(SimpleJavaDataBinding.NAME) && !dataBinding.startsWith("java:")) {
if (nonDefaultDataBindingName != null) {
if (!nonDefaultDataBindingName.equals(dataBinding)) {
// We've seen two different non-default DBs, e.g. SDO and JAXB
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Exception2ExceptionTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Exception2ExceptionTransformer.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Exception2ExceptionTransformer.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Exception2ExceptionTransformer.java Sat Jun 7 00:15:29 2008
@@ -96,12 +96,12 @@
DataType<DataType> targetType = context.getTargetDataType();
- Object sourceFaultInfo = faultExceptionMapper.getFaultInfo(source, sourceType.getLogical().getPhysical());
+ Object sourceFaultInfo = faultExceptionMapper.getFaultInfo(source, sourceType.getLogical().getPhysical(), context.getSourceOperation());
Object targetFaultInfo =
mediator.mediate(sourceFaultInfo, sourceType.getLogical(), targetType.getLogical(), context.getMetadata());
Throwable targetException =
- faultExceptionMapper.wrapFaultInfo(targetType, source.getMessage(), targetFaultInfo, source.getCause());
+ faultExceptionMapper.wrapFaultInfo(targetType, source.getMessage(), targetFaultInfo, source.getCause(), context.getTargetOperation());
// FIXME
return targetException == null ? source : targetException;
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java Sat Jun 7 00:15:29 2008
@@ -165,14 +165,14 @@
// If the source can be wrapped, wrapped it first
if (sourceWrapperHandler != null) {
- Class<?> sourceWrapperClass =
- sourceOp.getWrapper() != null ? sourceOp.getWrapper().getInputWrapperClass() : null;
- DataType sourceWrapperType =
- sourceWrapperHandler.getWrapperType(wrapperElement, sourceWrapperClass, context);
+ WrapperInfo sourceWrapperInfo = sourceOp.getWrapper();
+ DataType sourceWrapperType = sourceWrapperInfo != null ? sourceWrapperInfo.getInputWrapperType() : null;
// We only do wrapper to wrapper transformation if the source has a wrapper and both sides
// match by XML structure
if (sourceWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
+ Class<?> sourceWrapperClass = sourceWrapperType.getPhysical();
+
// Create the source wrapper
Object sourceWrapper = sourceWrapperHandler.create(wrapperElement, sourceWrapperClass, context);
@@ -215,11 +215,10 @@
// FIXME: This is a workaround for the wsdless support as it passes in child elements
// under the wrapper that only matches by position
if (sourceWrapperHandler.isInstance(sourceWrapper, wrapperElement, childElements, context)) {
- Class<?> targetWrapperClass =
- targetOp.getWrapper() != null ? targetOp.getWrapper().getInputWrapperClass() : null;
-
+
+ WrapperInfo targetWrapperInfo = targetOp.getWrapper();
DataType targetWrapperType =
- targetWrapperHandler.getWrapperType(wrapperElement, targetWrapperClass, context);
+ targetWrapperInfo != null ? targetWrapperInfo.getInputWrapperType() : null;
if (targetWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
Object targetWrapper =
mediator.mediate(sourceWrapper, sourceType.getLogical().get(0), targetWrapperType, context
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Output2OutputTransformer.java Sat Jun 7 00:15:29 2008
@@ -176,11 +176,13 @@
// If the source can be wrapped, wrapped it first
if (sourceWrapperHandler != null) {
- Class<?> sourceWrapperClass =
- sourceOp.getWrapper() != null ? sourceOp.getWrapper().getOutputWrapperClass() : null;
+ WrapperInfo sourceWrapperInfo = sourceOp.getWrapper();
DataType sourceWrapperType =
- sourceWrapperHandler.getWrapperType(wrapperElement, sourceWrapperClass, context);
+ sourceWrapperInfo != null ? sourceWrapperInfo.getOutputWrapperType() : null;
+
if (sourceWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
+ Class<?> sourceWrapperClass = sourceWrapperType.getPhysical();
+
Object sourceWrapper = sourceWrapperHandler.create(wrapperElement, sourceWrapperClass, context);
if (sourceWrapper != null) {
if (!childElements.isEmpty()) {
@@ -224,11 +226,11 @@
// FIXME: This is a workaround for the wsdless support as it passes in child elements
// under the wrapper that only matches by position
if (sourceWrapperHandler.isInstance(sourceWrapper, wrapperElement, childElements, context)) {
- Class<?> targetWrapperClass =
- targetOp.getWrapper() != null ? targetOp.getWrapper().getOutputWrapperClass() : null;
+ WrapperInfo targetWrapperInfo = targetOp.getWrapper();
DataType targetWrapperType =
- targetWrapperHandler.getWrapperType(wrapperElement, targetWrapperClass, context);
+ targetWrapperInfo != null ? targetWrapperInfo.getOutputWrapperType() : null;
+
if (targetWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
Object targetWrapper =
mediator.mediate(sourceWrapper, sourceType.getLogical(), targetWrapperType, context
Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/PassByValueInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/PassByValueInterceptor.java?rev=664294&r1=664293&r2=664294&view=diff
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/PassByValueInterceptor.java (original)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/wire/PassByValueInterceptor.java Sat Jun 7 00:15:29 2008
@@ -126,11 +126,11 @@
Throwable ex = (Throwable)fault;
DataType<DataType> exType =
new DataTypeImpl<DataType>(ex.getClass(), new DataTypeImpl<XMLType>(ex.getClass(), XMLType.UNKNOWN));
- faultExceptionMapper.introspectFaultDataType(exType, false);
+ faultExceptionMapper.introspectFaultDataType(exType, operation, false);
DataType faultType = exType.getLogical();
- Object faultInfo = faultExceptionMapper.getFaultInfo(ex, faultType.getPhysical());
+ Object faultInfo = faultExceptionMapper.getFaultInfo(ex, faultType.getPhysical(), operation);
faultInfo = copy(faultInfo, dataBindings.getDataBinding(faultType.getDataBinding()));
- fault = faultExceptionMapper.wrapFaultInfo(exType, ex.getMessage(), faultInfo, ex.getCause());
+ fault = faultExceptionMapper.wrapFaultInfo(exType, ex.getMessage(), faultInfo, ex.getCause(), operation);
return fault;
}
}
@@ -180,7 +180,7 @@
// If no databinding was specified, introspect the given arg to
// determine its databinding
if (dataBinding == null) {
- DataType<?> dataType = dataBindings.introspectType(data);
+ DataType<?> dataType = dataBindings.introspectType(data, operation);
if (dataType != null) {
String db = dataType.getDataBinding();
dataBinding = dataBindings.getDataBinding(db);
Copied: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/DISCLAIMER (from r663977, incubator/tuscany/sandbox/sebastien/java/sca-test2/demos/secure-bigbank/secure-bigbank-account/DISCLAIMER)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/DISCLAIMER?p2=incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/DISCLAIMER&p1=incubator/tuscany/sandbox/sebastien/java/sca-test2/demos/secure-bigbank/secure-bigbank-account/DISCLAIMER&r1=663977&r2=664294&rev=664294&view=diff
==============================================================================
(empty)
Copied: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/LICENSE (from r663977, incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/implementation-data-api/LICENSE)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/LICENSE?p2=incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/LICENSE&p1=incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/implementation-data-api/LICENSE&r1=663977&r2=664294&rev=664294&view=diff
==============================================================================
(empty)
Copied: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/NOTICE (from r663977, incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/implementation-data-api/NOTICE)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/NOTICE?p2=incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/NOTICE&p1=incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/implementation-data-api/NOTICE&r1=663977&r2=664294&rev=664294&view=diff
==============================================================================
(empty)
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/pom.xml?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/pom.xml (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/pom.xml Sat Jun 7 00:15:29 2008
@@ -0,0 +1,58 @@
+<?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.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-modules</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>tuscany-data-api</artifactId>
+ <name>Apache Tuscany SCA Data API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-sca-api</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+
+ <configuration>
+ <instructions>
+ <Bundle-Version>${tuscany.version}</Bundle-Version>
+ <Bundle-SymbolicName>org.apache.tuscany.sca.data.api</Bundle-SymbolicName>
+ <Bundle-Description>${pom.name}</Bundle-Description>
+ <Export-Package>org.apache.tuscany.sca.data*</Export-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Collection.java Sat Jun 7 00:15:29 2008
@@ -0,0 +1,78 @@
+/*
+ * 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.data.collection;
+
+import org.osoa.sca.annotations.Remotable;
+
+/**
+ * Provides access to a collection of data items.
+ *
+ * @version $Rev$ $Date$
+ */
+@Remotable
+public interface Collection <K, D> {
+
+ /**
+ * Get the whole collection.
+ *
+ * @return the whole collection.
+ */
+ Entry<K, D>[] getAll();
+
+ /**
+ * Returns a collection resulting from a query.
+ *
+ * @return the collection.
+ */
+ Entry<K, D>[] query(String queryString);
+
+ /**
+ * Creates a new item.
+ *
+ * @param key
+ * @param item
+ * @return
+ */
+ K post(K key, D item);
+
+ /**
+ * Retrieves an item.
+ *
+ * @param key
+ * @return
+ */
+ D get(K key) throws NotFoundException;
+
+ /**
+ * Updates an item.
+ *
+ * @param key
+ * @param item
+ * @return
+ */
+ void put(K key, D item) throws NotFoundException;
+
+ /**
+ * Delete an item.
+ *
+ * @param key
+ */
+ void delete(K key) throws NotFoundException;
+
+}
Added: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java?rev=664294&view=auto
==============================================================================
--- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java (added)
+++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/data-api/src/main/java/org/apache/tuscany/sca/data/collection/Entry.java Sat Jun 7 00:15:29 2008
@@ -0,0 +1,85 @@
+/*
+ * 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.data.collection;
+
+
+/**
+ * Represents a key/data pair in a data collection.
+ *
+ * @version $Rev$ $Date$
+ */
+public class Entry <K, D> {
+
+ private K key;
+ private D data;
+
+ /**
+ * Constructs a new entry.
+ */
+ public Entry() {
+ }
+
+ /**
+ * Constructs a new entry.
+ * @param key the entry key
+ * @param data the entry data
+ */
+ public Entry(K key, D data) {
+ this.key = key;
+ this.data = data;
+ }
+
+ /**
+ * Returns the entry key.
+ * @return the key
+ */
+ public K getKey() {
+ return key;
+ }
+
+ /**
+ * Sets the entry key.
+ * @param key the key
+ */
+ public void setKey(K key) {
+ this.key = key;
+ }
+
+ /**
+ * Returns the entry data.
+ * @return the entry data
+ */
+ public D getData() {
+ return data;
+ }
+
+ /**
+ * Sets the entry data
+ * @param data the entry data
+ */
+ public void setData(D data) {
+ this.data = data;
+ }
+
+ //FIXME Temporary methods to make JAXB register the Item
+ // class when the Entry class is registered in a JAXB context
+ public void setDummy(Item item) {}
+ public Item getDummy() { return null; }
+
+}