You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Mario Antollini (JIRA)" <tu...@ws.apache.org> on 2008/04/23 04:53:21 UTC

[jira] Created: (TUSCANY-2259) Multiplicity for heterogeneous bindings not working

Multiplicity for heterogeneous bindings not working
---------------------------------------------------

                 Key: TUSCANY-2259
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2259
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Assembly Model
    Affects Versions: Java-SCA-1.2
         Environment: Maven version: 2.0.8
Java version: 1.6.0_05
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
            Reporter: Mario Antollini


Hello,

I have been trying to make the catalog of store-market to be referencing targets with heterogenous bindings (by means of multiplicity)

The following reference (two targets using the same binding) works fine:

<reference name="goodsCatalog" multiplicity="0..n" target="VegetablesCatalogWebService FruitsCatalogWebService" >

	<binding.ws />

</reference>

At runtime, the goodsCatalog gets "populated" with both vegetables and fruits.

However, I could not get goodsCatalog to be populated with the same items when using heterogenous bindings. I was trying with a local FruitsCatalog and a WS VegetablesCatalog.

I tried:

1 - Approach 1:

<reference name="goodsCatalog" multiplicity="0..n" target="VegetablesCatalogWebService MarketFruitsCatalog" >

	<binding.ws />

	<binding.sca />

</reference>

Result: 
Only fruits were obtained. Thus, the local binding was working but the web service one was not.

2 - Approach 2:

<reference name="goodsCatalog" multiplicity="0..n" target="MarketFruitsCatalog VegetablesCatalogWebService " >

	<binding.sca />

	<binding.ws />

</reference>

Result:
Only fruits were obtained. Thus, the local binding was working but the web service one was not.

3 - Approach 3

<reference name="goodsCatalog" multiplicity="0..n" target="MarketFruitsCatalog VegetablesCatalogWebService " >

	<binding.ws />

</reference>

Result:
Nothing was obtained in the catalog.

4 - Approach 4

<reference name="goodsCatalog" multiplicity="0..n" target="VegetablesCatalogWebService  MarketFruitsCatalog " >
	<binding.ws />
</reference>

Result:
Nothing was obtained in the catalog.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


RE: [jira] Created: (TUSCANY-2259) Multiplicity for heterogeneous bindings not working

Posted by "Antollini, Mario" <ma...@intel.com>.
Hello Simon,

I was not sure where to get the resolved composite generated b the
workspace from. However, if I did not understood wrong from [1], it can
be obtained from the domain composite page of the workspace
(http://localhost:9990/ui/composite) by clicking the desired composite
from the "Composite" column.  Thus, I did that and the resolved
composite for Approach 1 was:


<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 * Licensed to the Apache Software Foundation (ASF) under one
 more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
-->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
targetNamespace="http://store" name="store-market">- <component
name="StoreMarket">
		<t:implementation.widget
location="uiservices/store.html"/>- <service name="Widget">
			<t:binding.http uri="/ui"/></service>
		<reference name="catalog" target="StoreMarketCatalog">
			<t:binding.jsonrpc/>
		</reference>
		<reference name="shoppingCart"
target="StoreMarketShoppingCart/Cart">
			<t:binding.atom/>
		</reference>
		<reference name="shoppingTotal"
target="StoreMarketShoppingCart/Total">
			<t:binding.jsonrpc/>
		</reference></component>
	<component name="StoreMarketCatalog">
		<implementation.java
class="services.market.MarketCatalogImpl"/>
		<property name="currencyCode">USD</property>- <service
name="Catalog">
			<t:binding.jsonrpc/></service>
		<reference name="goodsCatalog" multiplicity="0..n"
target="VegetablesCatalogWebService MarketFruitsCatalog">
			<binding.ws/>
			<binding.sca/>
		</reference>
		<reference name="currencyConverter"
target="StoreMarketCurrencyConverter"/>
	</component>
	<component name="MarketFruitsCatalog">
		<implementation.java
class="services.FruitsCatalogImpl"/>
		<service name="Catalog"/>
		<property name="currencyCode">USD</property>
		<reference name="currencyConverter"
target="StoreMarketCurrencyConverter"/>
	</component>
	<component name="StoreMarketShoppingCart">
		<implementation.java
class="services.ShoppingCartImpl"/>- <service name="Cart">
			<t:binding.atom
uri="/ShoppingCart/Cart"/></service>
		<service name="Total">
			<t:binding.jsonrpc/>
		</service>
	</component>
	<component name="StoreMarketCurrencyConverter">
		<implementation.java
class="services.CurrencyConverterImpl"/>
	</component>
</composite>


Is this the file you were expecting?  It looks exactly the same to the
composite I wrote myself. So, if this is not the resolved composite,
please let me know where I can obtain it from.

Thanks and regards,
Mario


[1] http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg29128.html




-----Original Message-----
From: Simon Laws [mailto:simonslaws@googlemail.com] 
Sent: Wednesday, April 23, 2008 5:14 AM
To: tuscany-dev@ws.apache.org
Subject: Re: [jira] Created: (TUSCANY-2259) Multiplicity for
heterogeneous bindings not working

On Wed, Apr 23, 2008 at 3:53 AM, Mario Antollini (JIRA) <
tuscany-dev@ws.apache.org> wrote:

> Multiplicity for heterogeneous bindings not working
> ---------------------------------------------------
>
>                 Key: TUSCANY-2259
>                 URL:
https://issues.apache.org/jira/browse/TUSCANY-2259
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.2
>         Environment: Maven version: 2.0.8
> Java version: 1.6.0_05
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Mario Antollini
>
>
> Hello,
>
> I have been trying to make the catalog of store-market to be
referencing
> targets with heterogenous bindings (by means of multiplicity)
>
> The following reference (two targets using the same binding) works
fine:
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="VegetablesCatalogWebService FruitsCatalogWebService" >
>
>        <binding.ws />
>
> </reference>
>
> At runtime, the goodsCatalog gets "populated" with both vegetables and
> fruits.
>
> However, I could not get goodsCatalog to be populated with the same
items
> when using heterogenous bindings. I was trying with a local
FruitsCatalog
> and a WS VegetablesCatalog.
>
> I tried:
>
> 1 - Approach 1:
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="VegetablesCatalogWebService MarketFruitsCatalog" >
>
>        <binding.ws />
>
>        <binding.sca />
>
> </reference>
>
> Result:
> Only fruits were obtained. Thus, the local binding was working but the
web
> service one was not.
>
> 2 - Approach 2:
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="MarketFruitsCatalog VegetablesCatalogWebService " >
>
>        <binding.sca />
>
>        <binding.ws />
>
> </reference>
>
> Result:
> Only fruits were obtained. Thus, the local binding was working but the
web
> service one was not.
>
> 3 - Approach 3
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="MarketFruitsCatalog VegetablesCatalogWebService " >
>
>        <binding.ws />
>
> </reference>
>
> Result:
> Nothing was obtained in the catalog.
>
> 4 - Approach 4
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="VegetablesCatalogWebService  MarketFruitsCatalog " >
>        <binding.ws />
> </reference>
>
> Result:
> Nothing was obtained in the catalog.
>
>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Hi Mario

Is it possible for you to print out the resolved composite that the
workspace generates based on, for example, approach 1. I had a similar
scenario work for me recently but this wasn't in the context of the
Tutorial
and it would be interesting to see how the workspace is resolving the
bindings in you example.

Simon

Re: [jira] Created: (TUSCANY-2259) Multiplicity for heterogeneous bindings not working

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Apr 23, 2008 at 3:53 AM, Mario Antollini (JIRA) <
tuscany-dev@ws.apache.org> wrote:

> Multiplicity for heterogeneous bindings not working
> ---------------------------------------------------
>
>                 Key: TUSCANY-2259
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2259
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-1.2
>         Environment: Maven version: 2.0.8
> Java version: 1.6.0_05
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Mario Antollini
>
>
> Hello,
>
> I have been trying to make the catalog of store-market to be referencing
> targets with heterogenous bindings (by means of multiplicity)
>
> The following reference (two targets using the same binding) works fine:
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="VegetablesCatalogWebService FruitsCatalogWebService" >
>
>        <binding.ws />
>
> </reference>
>
> At runtime, the goodsCatalog gets "populated" with both vegetables and
> fruits.
>
> However, I could not get goodsCatalog to be populated with the same items
> when using heterogenous bindings. I was trying with a local FruitsCatalog
> and a WS VegetablesCatalog.
>
> I tried:
>
> 1 - Approach 1:
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="VegetablesCatalogWebService MarketFruitsCatalog" >
>
>        <binding.ws />
>
>        <binding.sca />
>
> </reference>
>
> Result:
> Only fruits were obtained. Thus, the local binding was working but the web
> service one was not.
>
> 2 - Approach 2:
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="MarketFruitsCatalog VegetablesCatalogWebService " >
>
>        <binding.sca />
>
>        <binding.ws />
>
> </reference>
>
> Result:
> Only fruits were obtained. Thus, the local binding was working but the web
> service one was not.
>
> 3 - Approach 3
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="MarketFruitsCatalog VegetablesCatalogWebService " >
>
>        <binding.ws />
>
> </reference>
>
> Result:
> Nothing was obtained in the catalog.
>
> 4 - Approach 4
>
> <reference name="goodsCatalog" multiplicity="0..n"
> target="VegetablesCatalogWebService  MarketFruitsCatalog " >
>        <binding.ws />
> </reference>
>
> Result:
> Nothing was obtained in the catalog.
>
>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Hi Mario

Is it possible for you to print out the resolved composite that the
workspace generates based on, for example, approach 1. I had a similar
scenario work for me recently but this wasn't in the context of the Tutorial
and it would be interesting to see how the workspace is resolving the
bindings in you example.

Simon