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/03/29 09:33:23 UTC
svn commit: r928619 [2/3] - in
/tuscany/sca-java-1.x/trunk/tutorials/travelsample: contributions/
contributions/using/ contributions/using/src/main/java/com/tuscanyscahotels/
contributions/using/src/main/java/com/tuscanyscahotels/impl/
contributions/us...
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ xmlns:o="http://tuscanyscatours.com/orders"
+ name="orders2">
+
+ <component name="Customer">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CustomerImpl" />
+ <property name="billingAddress" type="t:Address">
+ <o:address xmlns="">
+ <street>123 Main Street</street>
+ <city>New York</city>
+ <state>NY</state>
+ <zip>01234</zip>
+ </o:address>
+ </property>
+ <property name="deliveryAddress" type="t:Address">
+ <o:address xmlns="">
+ <street>456 Market Street</street>
+ <city>San Francisco</city>
+ <state>CA</state>
+ <zip>98765</zip>
+ </o:address>
+ </property>
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.xsd
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.xsd?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.xsd (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/orders2.xsd Mon Mar 29 07:33:21 2010
@@ -0,0 +1,24 @@
+<?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.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://tuscanyscatours.com/orders"
+ xmlns:t="http://tuscanyscatours.com/">
+ <xs:element name="address" type="t:Address" />
+</xs:schema>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/airportcodes-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/airportcodes-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/airportcodes-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/airportcodes-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="airportcodes-client">
+
+ <!-- a test client for airportcodes.composite -->
+ <component name="AirportCodesClient">
+ <implementation.java class="scatours.client.impl.AirportCodesClientImpl" />
+ <reference name="airportcodes" target="AirportCodes" />
+ </component>
+
+ <!-- run airportcodes.composite in the same SCA node -->
+ <include name="t:airportcodes" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings1-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings1-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings1-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings1-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="bookings1-client">
+
+ <!-- a test client for bookings1.composite -->
+ <component name="Bookings1Client">
+ <implementation.java class="scatours.client.impl.BookingsClientImpl" />
+ <reference name="bookings" target="TripBooking" />
+ </component>
+
+ <!-- run bookings1.composite in the same SCA node -->
+ <include name="t:bookings1" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings2-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings2-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings2-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings2-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="bookings2-client">
+
+ <!-- a test client for bookings2.composite -->
+ <component name="Bookings2Client">
+ <implementation.java class="scatours.client.impl.BookingsClientImpl" />
+ <reference name="bookings" target="TripBooking" />
+ </component>
+
+ <!-- run bookings2.composite in the same SCA node -->
+ <include name="t:bookings2" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings3-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings3-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings3-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings3-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="bookings3-client">
+
+ <!-- a test client for bookings3.composite -->
+ <component name="Bookings3Client">
+ <implementation.java class="scatours.client.impl.BookingsClientImpl" />
+ <reference name="bookings" target="TripBooking" />
+ </component>
+
+ <!-- run bookings3.composite in the same SCA node -->
+ <include name="t:bookings3" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings4-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings4-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings4-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/bookings4-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,35 @@
+<?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://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="bookings4-client">
+
+ <!-- a test client for bookings4.composite -->
+ <component name="Bookings4Client">
+ <implementation.java class="scatours.client.impl.BookingsZeroClientImpl" />
+ <reference name="bookings">
+ <binding.jms uri="jms:Bookings" />
+ </reference>
+ </component>
+
+ <!-- run bookings4.composite in the same SCA node -->
+ <include name="t:bookings4" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings1-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings1-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings1-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings1-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="carbookings1-client">
+
+ <!-- a test client for carbookings1.composite -->
+ <component name="CarBookings1Client">
+ <implementation.java class="scatours.client.impl.CarBookingsClientImpl" />
+ <reference name="cars" target="CarPartner" />
+ </component>
+
+ <!-- run carbookings1.composite in the same SCA node -->
+ <include name="t:carbookings1" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings2-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings2-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings2-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings2-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="carbookings2-client">
+
+ <!-- a test client for carbookings2.composite -->
+ <component name="CarBookings2Client">
+ <implementation.java class="scatours.client.impl.CarBookingsClientImpl" />
+ <reference name="cars" target="CarPartner" />
+ </component>
+
+ <!-- run carbookings2.composite in the same SCA node -->
+ <include name="t:carbookings2" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings3-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings3-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings3-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/carbookings3-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="carbookings3-client">
+
+ <!-- a test client for carbookings3.composite -->
+ <component name="CarBookings3Client">
+ <implementation.java class="scatours.client.impl.CarBookingsClientImpl" />
+ <reference name="cars" target="CarPartner" />
+ </component>
+
+ <!-- run carbookings3.composite in the same SCA node -->
+ <include name="t:carbookings3" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/converter-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/converter-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/converter-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/converter-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,34 @@
+<?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://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="converter-client">
+
+ <!-- a test client for converter.composite -->
+ <component name="ConverterClient">
+ <implementation.java class="scatours.client.impl.ConverterClientImpl" />
+ <reference name="eur2jpy" target="EURJPYConverter" />
+ <reference name="usd2gbp" target="USDGBPConverter" />
+ </component>
+
+ <!-- run converter.composite in the same SCA node -->
+ <include name="t:converter" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/hotelsdomain-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/hotelsdomain-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/hotelsdomain-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/hotelsdomain-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,34 @@
+<?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://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ xmlns:h="http://tuscanyscahotels.com/"
+ name="hotelsdomain-client">
+
+ <!-- a test client for hotelsdomain.composite -->
+ <component name="HotelsDomainClient">
+ <implementation.java class="scatours.client.impl.HotelOffersClientImpl" />
+ <reference name="offers" target="HotelOffers" />
+ </component>
+
+ <!-- run hotelsdomain.composite in the same SCA node -->
+ <include name="h:hotelsdomain" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders1-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders1-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders1-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders1-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="orders1-client">
+
+ <!-- a test client for orders1.composite -->
+ <component name="Orders1Client">
+ <implementation.java class="scatours.client.impl.Orders1ClientImpl" />
+ <reference name="customer" target="Customer" />
+ </component>
+
+ <!-- run orders1.composite in the same SCA node -->
+ <include name="t:orders1" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders2-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders2-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders2-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/orders2-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="orders2-client">
+
+ <!-- a test client for orders2.composite -->
+ <component name="Orders2Client">
+ <implementation.java class="scatours.client.impl.Orders2ClientImpl" />
+ <reference name="customer" target="Customer" />
+ </component>
+
+ <!-- run orders2.composite in the same SCA node -->
+ <include name="t:orders2" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/toursdomain-client.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/toursdomain-client.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/toursdomain-client.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/test-clients/toursdomain-client.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ targetNamespace="http://tuscanyscatours.com/"
+ xmlns:t="http://tuscanyscatours.com/"
+ name="toursdomain-client">
+
+ <!-- a test client for toursdomain.composite -->
+ <component name="ToursDomainClient">
+ <implementation.java class="scatours.client.impl.BookingsZeroClientImpl" />
+ <reference name="bookings" target="TripBooking" />
+ </component>
+
+ <!-- run toursdomain.composite in the same SCA node -->
+ <include name="t:toursdomain" />
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/toursdomain.composite
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/toursdomain.composite?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/toursdomain.composite (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/main/resources/toursdomain.composite Mon Mar 29 07:33:21 2010
@@ -0,0 +1,39 @@
+<?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://tuscanyscatours.com/"
+ name="toursdomain">
+ <component name="TripBooking">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.TripBookingImpl" />
+ <reference name="flights">
+ <binding.ws
+ uri="http://flightbookingservice.com:8084/Flights" />
+ </reference>
+ <reference name="hotels">
+ <binding.ws uri="http://tuscanyscahotels.com:8083/Hotels" />
+ </reference>
+ <reference name="cars" target="CarPartner/Cars" />
+ </component>
+ <component name="CarPartner">
+ <implementation.java
+ class="com.tuscanyscatours.using.impl.CarVendorImpl" />
+ </component>
+</composite>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/AirportCodesTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/AirportCodesTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/AirportCodesTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/AirportCodesTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the AirportCodes component implementation class
+ */
+public class AirportCodesTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/airportcodes-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "AirportCodesClient");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/BindingsTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/BindingsTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/BindingsTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/BindingsTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests services and references with configured bindings
+ */
+public class BindingsTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/bookings4-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings4Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarAutowireTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarAutowireTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarAutowireTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarAutowireTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests autowiring of references with different multiplicities
+ */
+public class CarAutowireTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/carbookings3-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings3Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarPartnerTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarPartnerTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarPartnerTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarPartnerTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests wiring of references with different multiplicities
+ */
+public class CarPartnerTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/carbookings1-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings1Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarWireElementTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarWireElementTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarWireElementTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CarWireElementTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests wire elements for references with different multiplicities
+ */
+public class CarWireElementTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/carbookings2-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings2Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyElementTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyElementTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyElementTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyElementTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests complex properties defined as XML Schema global elements
+ */
+public class ComplexPropertyElementTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/orders1-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Orders1Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyTypeTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyTypeTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyTypeTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/ComplexPropertyTypeTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests complex properties defined as XML Schema types
+ */
+public class ComplexPropertyTypeTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/orders2-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Orders2Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CurrencyConverterTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CurrencyConverterTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CurrencyConverterTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/CurrencyConverterTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the CurrencyConverterImpl component implementation class
+ */
+public class CurrencyConverterTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/converter-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "ConverterClient");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/MultiDomainTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/MultiDomainTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/MultiDomainTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/MultiDomainTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,65 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the multiple domains with bindings scenario
+ */
+public class MultiDomainTestCase {
+
+ private SCANode hotelsNode;
+ private SCANode toursNode;
+
+ @Before
+ public void startServer() throws Exception {
+ hotelsNode = SCANodeFactory.newInstance().createSCANode("test-clients/hotelsdomain-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ hotelsNode.start();
+ toursNode = SCANodeFactory.newInstance().createSCANode("test-clients/toursdomain-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ toursNode.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable hotelsClient = ((SCAClient)hotelsNode).getService(Runnable.class, "HotelsDomainClient");
+ hotelsClient.run();
+ Runnable toursClient = ((SCAClient)toursNode).getService(Runnable.class, "ToursDomainClient");
+ toursClient.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (toursNode != null) {
+ toursNode.stop();
+ }
+ if (hotelsNode != null) {
+ hotelsNode.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripAutowireTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripAutowireTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripAutowireTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripAutowireTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the use of autowire in the Trip Booking implementation scenario
+ */
+public class TripAutowireTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/bookings3-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings3Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripBookingTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripBookingTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripBookingTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripBookingTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the Trip Booking implementation scenario
+ */
+public class TripBookingTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/bookings1-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings1Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripWireElementTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripWireElementTestCase.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripWireElementTestCase.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/java/scatours/TripWireElementTestCase.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,56 @@
+/*
+ * 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 scatours;
+
+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.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the use of wire elements in the Trip Booking implementation scenario
+ */
+public class TripWireElementTestCase {
+
+ private SCANode node;
+
+ @Before
+ public void startServer() throws Exception {
+ node = SCANodeFactory.newInstance().createSCANode("test-clients/bookings2-client.composite",
+ new SCAContribution("using", "./target/classes"));
+ node.start();
+ }
+
+ @Test
+ public void testImpl() {
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings2Client");
+ client.run();
+ }
+
+ @After
+ public void stopServer() throws Exception {
+ if (node != null) {
+ node.stop();
+ }
+ }
+}
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/resources/jndi.properties
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/resources/jndi.properties?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/resources/jndi.properties (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/contributions/using/src/test/resources/jndi.properties Mon Mar 29 07:33:21 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.
+## ---------------------------------------------------------------------------
+
+# START SNIPPET: jndi
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+
+# use the following property to configure the default connector
+java.naming.provider.url = vm://localhost?broker.persistent=false
+
+# use the following property to specify the JNDI name the connection factory
+# should appear as.
+#connectionFactoryNames = connectionFactory, queueConnectionFactory, topicConnectionFactry
+connectionFactoryNames = ConnectionFactory
+
+# register some queues in JNDI using the form
+# queue.[jndiName] = [physicalName]
+queue.Bookings = BookingsRequestQueue
+
+# register some topics in JNDI using the form
+# topic.[jndiName] = [physicalName]
+#topic.MyTopic = example.MyTopic
+
+# END SNIPPET: jndi
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/bundle/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/bundle/pom.xml?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/bundle/pom.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/bundle/pom.xml Mon Mar 29 07:33:21 2010
@@ -330,6 +330,11 @@
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>scatours-contribution-using</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
<artifactId>scatours-launcher-blog-feed</artifactId>
<version>${pom.version}</version>
</dependency>
@@ -485,6 +490,11 @@
</dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>scatours-launcher-using</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
<artifactId>scatours-service-creditcard-payment-jaxws</artifactId>
<version>${pom.version}</version>
</dependency>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/resources/build-launchers.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/resources/build-launchers.xml?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/resources/build-launchers.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/distribution/src/main/resources/build-launchers.xml Mon Mar 29 07:33:21 2010
@@ -290,10 +290,10 @@
</java>
</target>
- <target name="run-policy">
- <java classname="scatours.PolicyLauncher" fork="true" failonerror="true">
+ <target name="run-using">
+ <java classname="scatours.UsingLauncher" fork="true" failonerror="true">
<classpath>
- <pathelement location="scatours-launcher-policy.jar"/>
+ <pathelement location="scatours-launcher-using.jar"/>
<path refid="scatours.tuscany-manifest"/>
</classpath>
</java>
Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml?rev=928619&r1=928618&r2=928619&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/build.xml Mon Mar 29 07:33:21 2010
@@ -64,6 +64,7 @@
<ant dir="notification-rmi" target="${target}"/>
<ant dir="notification-ws" target="${target}"/>
<ant dir="policy" target="${target}"/>
+ <ant dir="using" target="${target}"/>
</target>
</project>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/build.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/build.xml?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/build.xml (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/build.xml Mon Mar 29 07:33:21 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.
+-->
+
+<project name="scatours-launcher-using" default="compile">
+ <import file="../../antdefs.xml"/>
+ <path id="compile-path">
+ <pathelement path="../../util/launcher-common/target/scatours-util-launcher-common.jar"/>
+ </path>
+
+ <target name="run">
+ <java classname="scatours.UsingLauncher" fork="true" failonerror="true">
+ <classpath>
+ <pathelement location="target/${ant.project.name}.jar"/>
+ <path refid="compile-path"/>
+ <pathelement location="${env.TUSCANY_HOME}/lib/tuscany-sca-manifest.jar"/>
+ </classpath>
+ </java>
+ </target>
+</project>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/pom.xml?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/pom.xml (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/pom.xml Mon Mar 29 07:33:21 2010
@@ -0,0 +1,138 @@
+<?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>scatours</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent><version>1.0-SNAPSHOT</version>
+ <artifactId>scatours-launcher-using</artifactId>
+ <name>Apache Tuscany SCA Tours Using Launcher</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>scatours-util-launcher-common</artifactId>
+ <version>${pom.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-api</artifactId>
+ <version>${tuscany.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-all</artifactId>
+ <version>5.2.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-web-demo</artifactId>
+ </exclusion>
+ </exclusions>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-node-impl</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-implementation-java-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ws-axis2</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jetty</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-jms-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-host-jms-asf</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tuscany-binding-ejb-runtime</artifactId>
+ <version>${tuscany.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.5</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>${artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Class-Path>../util/scatours-util-launcher-common.jar</Class-Path>
+ </manifestEntries>
+ <manifest>
+ <addClasspath>${scatours.selfContained}</addClasspath>
+ <classpathPrefix>../lib/</classpathPrefix>
+ <mainClass>scatours.BuildingBlocksLauncher</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/java/scatours/UsingLauncher.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/java/scatours/UsingLauncher.java?rev=928619&view=auto
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/java/scatours/UsingLauncher.java (added)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/launchers/using/src/main/java/scatours/UsingLauncher.java Mon Mar 29 07:33:21 2010
@@ -0,0 +1,208 @@
+/*
+ * 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 scatours;
+
+//import org.apache.activemq.broker.BrokerService;
+import org.apache.tuscany.sca.node.SCAClient;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+
+import static scatours.launcher.LauncherUtil.locate;
+
+public class UsingLauncher {
+
+ public static void main(String[] args) throws Exception {
+ runAirportCodes();
+ runBindings();
+ runCarAutowire();
+ runCarPartner();
+ runCarWireElement();
+ runComplexPropertyElement();
+ runComplexPropertyType();
+ runCurrencyConverter();
+ runMultiDomain();
+ runTripAutowire();
+ runTripBooking();
+ runTripWireElement();
+ }
+
+ private static void runAirportCodes() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/airportcodes-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "AirportCodesClient");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runBindings() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/bookings4-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings4Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runCarAutowire() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/carbookings3-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings3Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runCarPartner() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/carbookings1-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings1Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runCarWireElement() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/carbookings2-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "CarBookings2Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runComplexPropertyElement() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/orders1-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Orders1Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runComplexPropertyType() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/orders2-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Orders2Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runCurrencyConverter() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/converter-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "ConverterClient");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runMultiDomain() throws Exception {
+ SCANode hotelsNode =
+ SCANodeFactory.newInstance().createSCANode("test-clients/hotelsdomain-client.composite",
+ locate("using"));
+ SCANode toursNode =
+ SCANodeFactory.newInstance().createSCANode("test-clients/toursdomain-client.composite",
+ locate("using"));
+
+ hotelsNode.start();
+ toursNode.start();
+
+ Runnable hotelsClient = ((SCAClient)hotelsNode).getService(Runnable.class, "HotelsDomainClient");
+ hotelsClient.run();
+ Runnable toursClient = ((SCAClient)toursNode).getService(Runnable.class, "ToursDomainClient");
+ toursClient.run();
+
+ toursNode.stop();
+ hotelsNode.stop();
+ }
+
+ private static void runTripAutowire() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/bookings3-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings3Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runTripBooking() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/bookings1-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings1Client");
+ client.run();
+
+ node.stop();
+ }
+
+ private static void runTripWireElement() throws Exception {
+ SCANode node =
+ SCANodeFactory.newInstance().createSCANode("test-clients/bookings2-client.composite",
+ locate("using"));
+
+ node.start();
+
+ Runnable client = ((SCAClient)node).getService(Runnable.class, "Bookings2Client");
+ client.run();
+
+ node.stop();
+ }
+}