[savara-commits] savara SVN: r464 - in trunk/tools/plugins: org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator and 8 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 12 07:21:14 EST 2010


Author: objectiser
Date: 2010-11-12 07:21:09 -0500 (Fri, 12 Nov 2010)
New Revision: 464

Added:
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl
Removed:
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Broker.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at CreditAgency.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierQuoteEngine.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierTxnProcessor.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at CreditAgency.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Store.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Seller.bpel
Modified:
   trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
   trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Broker.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at CreditAgency.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierQuoteEngine.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierTxnProcessor.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at CreditAgency.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Store.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Buyer.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Seller.bpel
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java
   trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java
Log:
Applied changes from 1.1.x branch related to SAVARA-148.

Modified: trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationConverterRuleImpl.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -29,6 +29,7 @@
 import org.pi4soa.cdl.interfaces.OperationDefinition;
 import org.pi4soa.cdl.interfaces.RoleTypeDefinition;
 import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.pi4soa.cdl.util.PackageUtil;
 import org.pi4soa.common.util.NamesUtil;
 import org.pi4soa.common.xml.XMLUtils;
 import org.scribble.model.*;
@@ -321,9 +322,23 @@
 				} else {
 					contract = new Contract();
 					
-					contract.setName(XMLUtils.getLocalname(pinst.getName()));
-					contract.setNamespace(CDLTypeUtil.getNamespace(pinst.getName(), pinst));
+					java.util.List<?> ptypes=
+							PackageUtil.getParticipantsForRoleTypes(choreo.getPackage(),
+									pinst.getRoleTypes());
 					
+					if (ptypes.size() == 1) {
+						ParticipantType pt=(ParticipantType)ptypes.get(0);
+						
+						contract.setName(XMLUtils.getLocalname(pt.getName()));
+						contract.setNamespace(CDLTypeUtil.getNamespace(pt.getName(), pt));
+					} else {
+						
+						logger.warning("Could not find single participant type for participant instance '"+
+								pinst.getName()+"'");
+						contract.setName(XMLUtils.getLocalname(pinst.getName()));
+						contract.setNamespace(CDLTypeUtil.getNamespace(pinst.getName(), pinst));
+					}
+					
 					// Setup namespace to prefix mappings
 					java.util.List<NameSpace> nspaces=pinst.getPackage().getTypeDefinitions().getNameSpaces();
 					

Modified: trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.pi4soa.cdm/src/java/org/jboss/savara/pi4soa/cdm/parser/rules/ConversationInteractionConverterRuleImpl.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -22,6 +22,7 @@
 import java.util.logging.Logger;
 
 import org.pi4soa.cdl.*;
+import org.pi4soa.cdl.Interaction;
 import org.scribble.model.*;
 import org.scribble.conversation.model.*;
 import org.scribble.expression.xpath.model.XPathExpression;
@@ -641,14 +642,8 @@
 		String ret=null;
 		
 		if (interaction != null) {
-			String intfName=InteractionUtil.getInterface(interaction);
+			String intfName=getInterface(interaction);
 			
-			if (NamesUtil.isSet(intfName) == false) {
-				// If no name set, then use the 'to' role type name
-				// Similar to logic used in org.pi4soa.service.behavior.projection.DefaultServiceTypeResolver
-				intfName = interaction.getToRoleType().getName();
-			}
-			
 			String ns=CDLTypeUtil.getNamespace(intfName, interaction, true);
 			String lp=XMLUtils.getLocalname(intfName);
 			
@@ -658,5 +653,46 @@
 		return(ret);
 	}
 	
+	/**
+	 * This method returns the interaction's interface.
+	 * 
+	 * @param interaction The interaction
+	 * @return The interface
+	 */
+	public static String getInterface(Interaction interaction) {
+		String ret=null;
+			
+		if (interaction != null &&
+				interaction.getChannelVariable() != null &&
+				interaction.getChannelVariable().getType() instanceof
+						ChannelType) {
+			ChannelType ctype=(ChannelType)
+					interaction.getChannelVariable().getType();
+			
+			if (ctype.getBehavior() != null) {
+				ret = ctype.getBehavior().getInterface();
+				
+				if (NamesUtil.isSet(ret)==false) {
+					ret = ctype.getBehavior().getName();
+				}
+			} else if (ctype.getRoleType() != null) {
+				
+				// Attempt to find default behavior
+				org.pi4soa.cdl.Behavior behavior=
+					ctype.getRoleType().getBehavior(null);
+				
+				if (behavior != null) {
+					ret = behavior.getInterface();
+					
+					if (NamesUtil.isSet(ret)==false) {
+						ret = behavior.getName();
+					}
+				}
+			}
+		}
+		
+		return(ret);
+	}
+
 	private static Logger logger = Logger.getLogger("org.pi4soa.scribble.cdm.parser.rules");
 }

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/generator/Generator.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -508,29 +508,32 @@
 		
 		while (roles.hasNext()) {
 			Role r=roles.next();
-			Contract contract=(Contract)r.getAnnotations().get(Contract.class.getName());
 			
-			boolean gen=false;
-			
-			java.util.Iterator<Interface> iter=contract.getInterfaces().iterator();
-			
-			while (gen == false && iter.hasNext()) {
-				Interface intf=iter.next();
+			if (r != null && r.getAnnotations().containsKey(Contract.class.getName())) {
+				Contract contract=(Contract)r.getAnnotations().get(Contract.class.getName());
 				
-				if (intf.getMessageExchangePatterns().size() > 0) {
-					gen = true;
+				boolean gen=false;
+				
+				java.util.Iterator<Interface> iter=contract.getInterfaces().iterator();
+				
+				while (gen == false && iter.hasNext()) {
+					Interface intf=iter.next();
+					
+					if (intf.getMessageExchangePatterns().size() > 0) {
+						gen = true;
+					}
 				}
-			}
-			
-			if (gen) {
-				wsdlName = getWSDLFileName(r, localcm.getModelName().getName(), "");
-	
-				imp = doc.createElement(WSDL_IMPORT);
 				
-				imp.setAttribute("namespace", contract.getNamespace());
-				imp.setAttribute("location", wsdlName);
-				
-				defn.appendChild(imp);
+				if (gen) {
+					wsdlName = getWSDLFileName(r, localcm.getModelName().getName(), "");
+		
+					imp = doc.createElement(WSDL_IMPORT);
+					
+					imp.setAttribute("namespace", contract.getNamespace());
+					imp.setAttribute("location", wsdlName);
+					
+					defn.appendChild(imp);
+				}
 			}
 		}
 

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationChangeRule.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -96,8 +96,6 @@
 		
 		Sequence seq=new Sequence(bpelModel);
 		
-		ModelChangeUtils.addContracts(context, conv);
-		
 		// Check if root conversation
 		if (conv.getParent() instanceof Model) {
 			
@@ -199,8 +197,6 @@
 		// Reset old parent
 		context.setParent(parent);
 		
-		ModelChangeUtils.removeContracts(context, conv);
-
 		return(true);
 	}
 	

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ConversationInteractionModelChangeRule.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -100,7 +100,7 @@
 		PartnerLink pl=new PartnerLink(bpelModel);
 		Role role=null;
 		String portType=null;	
-		String varName=InteractionPatterns.getVariableName(interaction);
+		String varName=null; //InteractionPatterns.getVariableName(interaction);
 		Interface intf=null;
 			
 		if (interaction.getEnclosingDefinition() != null) {
@@ -161,6 +161,46 @@
 			}
 		}
 
+		// Create variable
+		//if (varName != null) {
+			QName qname=null;
+			if (InteractionUtil.isRequest(interaction)) {
+				qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+									interaction.getMessageSignature().getOperation());
+			} else if (InteractionPatterns.isFaultResponse(interaction)) {
+				qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+						InteractionPatterns.getFaultName(interaction));
+			} else {
+				qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+									interaction.getMessageSignature().getOperation());
+			}
+			
+			varName = qname.getLocalPart()+"Var";
+
+			org.jboss.savara.tools.bpel.model.component.Variable var=
+					bpelModel.getBPELProcess().getVariable(varName);
+
+			if (var == null) {
+				var = new org.jboss.savara.tools.bpel.model.component.Variable(bpelModel);
+				var.setName(varName);
+				
+				String mesgType=qname.getLocalPart();
+				
+				// Find namespace prefix
+				if (qname.getNamespaceURI() != null) {
+					String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
+					
+					if (pfix != null) {
+						mesgType = pfix+":"+mesgType;
+					}
+				}
+				
+				var.setMessageType(mesgType);
+				
+				bpelModel.getBPELProcess().addVariable(var, -1);
+			}
+		//}
+
 		// Check if send or receive
 		if (InteractionUtil.isSend(interaction)) {
 			
@@ -195,7 +235,7 @@
 				
 				String plt=role.getName()+"To"+interaction.getToRole().getName()+"LT";
 				
-				if (prefix != null) {
+				if (mainPrefix != null) {
 					plt = mainPrefix+":"+plt;
 				}
 				
@@ -215,7 +255,7 @@
 				
 				String plt=interaction.getToRole().getName()+"To"+role.getName()+"Service"+"LT";
 				
-				if (prefix != null) {
+				if (mainPrefix != null) {
 					plt = mainPrefix+":"+plt;
 				}
 				
@@ -265,8 +305,7 @@
 				String intfName=(String)interaction.getAnnotations().get("interfaceName");
 				
 				if (intfName != null && intfName.trim().length() > 0) {
-					javax.xml.namespace.QName qname=javax.xml.namespace.QName.valueOf(intfName);
-					intfName = qname.getLocalPart();
+					intfName = javax.xml.namespace.QName.valueOf(intfName).getLocalPart();
 				} else {
 					intfName = role.getName();
 				}
@@ -279,7 +318,7 @@
 					
 					String plt=interaction.getFromRole().getName()+"To"+role.getName()+"Service"+"LT";
 					
-					if (prefix != null) {
+					if (mainPrefix != null) {
 						plt = mainPrefix+":"+plt;
 					}
 					
@@ -293,7 +332,7 @@
 					
 					String plt=role.getName()+"To"+interaction.getFromRole().getName()+"Requester"+"LT";
 					
-					if (prefix != null) {
+					if (mainPrefix != null) {
 						plt = mainPrefix+":"+plt;
 					}
 					
@@ -358,44 +397,6 @@
 			}
 		}
 		
-		// Create variable
-		if (varName != null) {
-			org.jboss.savara.tools.bpel.model.component.Variable var=
-					bpelModel.getBPELProcess().getVariable(varName);
-
-			if (var == null) {
-				var = new org.jboss.savara.tools.bpel.model.component.Variable(bpelModel);
-				var.setName(varName);
-				
-				QName qname=null;
-				if (InteractionUtil.isRequest(interaction)) {
-					qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
-										interaction.getMessageSignature().getOperation());
-				} else if (InteractionPatterns.isFaultResponse(interaction)) {
-					qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
-							InteractionPatterns.getFaultName(interaction));
-				} else {
-					qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
-										interaction.getMessageSignature().getOperation());
-				}
-
-				String mesgType=qname.getLocalPart();
-				
-				// Find namespace prefix
-				if (qname.getNamespaceURI() != null) {
-					String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
-					
-					if (pfix != null) {
-						mesgType = pfix+":"+mesgType;
-					}
-				}
-				
-				var.setMessageType(mesgType);
-				
-				bpelModel.getBPELProcess().addVariable(var, -1);
-			}
-		}
-		
 		return(ret);
 	}
 

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/IfModelChangeRule.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -116,11 +116,7 @@
 								InteractionPatterns.isFaultResponse(
 										(Interaction)act)) {
 							String faultName=InteractionPatterns.getFaultName((Interaction)act);
-							String faultVarName=InteractionPatterns.getVariableName((Interaction)act);
 							
-							Catch c=new Catch(bpelModel);
-							c.setFaultVariable(faultVarName);
-							
 							Contract contract = ModelChangeUtils.getContract(context,
 										((Interaction)act).getFromRole().getName());
 							
@@ -128,9 +124,13 @@
 							QName qname= WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
 												faultName);
 							
+							String faultVarName=qname.getLocalPart()+"Var";
 							String mesgType=InteractionPatterns.getMessageTypeLocalPart((Interaction)act);
 							//String namespace=InteractionPatterns.getMessageTypeNameSpace((Interaction)act);
 					
+							Catch c=new Catch(bpelModel);
+							c.setFaultVariable(faultVarName);
+							
 							// Find namespace prefix
 							if (qname != null) {
 								String prefix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
@@ -157,7 +157,22 @@
 							
 							if (acts.size() > 0 && act instanceof Interaction &&
 									acts.get(acts.size()-1) instanceof Invoke) {
-								String varName=InteractionPatterns.getVariableName((Interaction)act);
+								Contract contract = ModelChangeUtils.getContract(context,
+										((Interaction)act).getFromRole().getName());
+							
+								QName qname=null;
+								if (InteractionUtil.isRequest((Interaction)act)) {
+									qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+											((Interaction)act).getMessageSignature().getOperation());
+								} else if (InteractionPatterns.isFaultResponse((Interaction)act)) {
+									qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+											InteractionPatterns.getFaultName((Interaction)act));
+								} else {
+									qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+														((Interaction)act).getMessageSignature().getOperation());
+								}
+
+								String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName((Interaction)act);
 								Invoke invoke=(Invoke)acts.get(acts.size()-1);
 								
 								invoke.setOutputVariable(varName);
@@ -217,15 +232,9 @@
 				
 				Interaction recv=InteractionPatterns.getPickPathInteraction(path);
 				
-				String varName=InteractionPatterns.getVariableName(recv);
-				
 				OnMessage onm=new OnMessage(bpelModel);
 				onm.setActivity(seq);
 				
-				if (varName != null) {
-					onm.setVariable(varName);
-				}
-				
 				PartnerLink pl=new PartnerLink(bpelModel);
 				String portType=null;
 				
@@ -300,6 +309,24 @@
 					}
 				}
 				
+				QName qname=null;
+				if (InteractionUtil.isRequest(recv)) {
+					qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+							recv.getMessageSignature().getOperation());
+				} else if (InteractionPatterns.isFaultResponse(recv)) {
+					qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+							InteractionPatterns.getFaultName(recv));
+				} else {
+					qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+							recv.getMessageSignature().getOperation());
+				}
+
+				String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName(recv);
+				
+				if (varName != null) {
+					onm.setVariable(varName);
+				}
+				
 				// Create partner link
 				PartnerLink other=
 					bpelModel.getBPELProcess().getPartnerLink(pl.getName());
@@ -399,6 +426,13 @@
 					bpelModel.getBPELProcess().getVariable(varName);
 
 		if (var == null) {
+			Role role=null;
+			
+			if (interaction.getEnclosingDefinition() != null) {
+				role = interaction.getEnclosingDefinition().
+							getLocatedName().getRole();
+			}
+
 			var = new org.jboss.savara.tools.bpel.model.component.Variable(bpelModel);
 			var.setName(varName);
 			
@@ -407,8 +441,14 @@
 			
 			if (InteractionUtil.isRequest(interaction)) {
 				roleType = interaction.getToRole();
+				if (roleType == null) {
+					roleType = role;
+				}
 			} else {
 				roleType = interaction.getFromRole();
+				if (roleType == null) {
+					roleType = role;
+				}
 			}
 			
 			if (roleType != null) {

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/InteractionPatterns.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -324,6 +324,7 @@
 			getMessageSignature().getAnnotations().get(MESSAGE_TYPE_NAMESPACE));
 	}
 	
+	/*
 	public static String getVariableName(Interaction interaction) {
 		String varName=getMessageTypeLocalPart(interaction);
 		
@@ -344,6 +345,7 @@
 		
 		return(varName);
 	}
+	*/
 	
 	public static boolean isSyncNormalResponse(Interaction interaction) {
 		boolean ret=false;

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/LanguageToConversationModelChangeRule.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -87,7 +87,11 @@
 		ConversationModel cm=(ConversationModel)mobj;
 		
 		if (cm.getConversation() != null) {
+			ModelChangeUtils.addContracts(context, cm.getConversation(), true);
+
 			context.insert(model, cm.getConversation(), null);
+
+			ModelChangeUtils.removeContracts(context, cm.getConversation(), true);
 		}
 		
 		return(true);

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/ModelChangeUtils.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -33,9 +33,10 @@
 	 * 
 	 * @param context The context
 	 * @param conv The conversation
+	 * @param root Whether this is the root conversation
 	 */
 	@SuppressWarnings("unchecked")
-	public static void addContracts(ModelChangeContext context, Conversation conv) {
+	public static void addContracts(ModelChangeContext context, Conversation conv, boolean root) {
 		
 		java.util.Map<String,Contract> contracts=(java.util.Map<String,Contract>)
 							context.getProperties().get(Contract.class.getName());
@@ -46,15 +47,44 @@
 			context.getProperties().put(Contract.class.getName(), contracts);
 		}
 		
-		if (conv.getLocatedName().getRole() != null) {
+		if (conv.getLocatedName().getRole() != null && root) {
 			addRoleContract(conv.getLocatedName().getRole(), contracts);
 		}
 		
-		for (Role r : conv.getRoles()) {
+		// Get list of roles
+		java.util.List<Role> roles=getRoles(conv);
+		
+		for (Role r : roles) {
 			addRoleContract(r, contracts);
 		}
 	}
 	
+	// NOTE: Return all the roles defined in the scope of this conversation
+	// Would be better to incrementally add contracts for roles, as defined
+	// in their own scope, but need to refactor how blocks are dealt with
+	// first - which is different in some cases, so not straightforward.
+	protected static java.util.List<Role> getRoles(final Conversation conv) {
+		final java.util.List<Role> roles=new java.util.Vector<Role>();
+		
+		conv.visit(new Visitor() {
+
+			public boolean visit(ModelObject obj) {
+				boolean ret=true;
+				
+				if (obj instanceof RoleList) {
+					roles.addAll(((RoleList)obj).getRoles());
+				} else if (obj instanceof Conversation &&
+						obj != conv) {
+					ret = false;
+				}
+				
+				return(ret);
+			}
+		});
+		
+		return(roles);
+	}
+	
 	/**
 	 * This method initializes the contract associated with the supplied role.
 	 * 
@@ -86,20 +116,24 @@
 	 * 
 	 * @param context The context
 	 * @param conv The conversation
+	 * @param root Whether this is the root conversation
 	 */
 	@SuppressWarnings("unchecked")
-	public static void removeContracts(ModelChangeContext context, Conversation conv) {
+	public static void removeContracts(ModelChangeContext context, Conversation conv, boolean root) {
 		
 		java.util.Map<String,Contract> contracts=(java.util.Map<String,Contract>)
 							context.getProperties().get(Contract.class.getName());
 		
 		if (contracts != null) {
 		
-			if (conv.getLocatedName().getRole() != null) {
+			if (conv.getLocatedName().getRole() != null && root) {
 				removeRoleContract(conv.getLocatedName().getRole(), contracts);
 			}
 		
-			for (Role r : conv.getRoles()) {
+			// Get list of roles
+			java.util.List<Role> roles=getRoles(conv);
+			
+			for (Role r : roles) {
 				removeRoleContract(r, contracts);
 			}
 		}
@@ -132,18 +166,27 @@
 	 * declaration bindings.
 	 * 
 	 * @param context The context
-	 * @param bindings The declaration bindings
+	 * @param run The run construct
 	 */
 	@SuppressWarnings("unchecked")
 	public static void pushRoleContractMapping(ModelChangeContext context,
-							java.util.List<DeclarationBinding> bindings) {
+							Compose run) {
 
 		if (context.getProperties().containsKey(Contract.class.getName())) {
 			java.util.Map<String,Contract> contracts=
 					(java.util.Map<String,Contract>)
 					context.getProperties().get(Contract.class.getName());
 
-			for (DeclarationBinding db : bindings) {
+			if (run.getEnclosingDefinition().getLocatedName().getRole() != null &&
+					run.getDefinition().getLocatedName().getRole() != null) {
+				Contract c=contracts.remove(run.getEnclosingDefinition().getLocatedName().getRole().getName());
+				
+				if (c != null) {
+					contracts.put(run.getDefinition().getLocatedName().getRole().getName(), c);
+				}
+			}
+			
+			for (DeclarationBinding db : run.getBindings()) {
 				if (db.getDeclaration() instanceof Role) {
 					Contract c=contracts.remove(db.getDeclaration().getName());
 					
@@ -161,18 +204,27 @@
 	 * declaration bindings.
 	 * 
 	 * @param context The context
-	 * @param bindings The declaration bindings
+	 * @param run The run construct
 	 */
 	@SuppressWarnings("unchecked")
 	public static void popRoleContractMapping(ModelChangeContext context,
-							java.util.List<DeclarationBinding> bindings) {
+									Compose run) {
 
 		if (context.getProperties().containsKey(Contract.class.getName())) {
 			java.util.Map<String,Contract> contracts=
 					(java.util.Map<String,Contract>)
 					context.getProperties().get(Contract.class.getName());
 
-			for (DeclarationBinding db : bindings) {
+			if (run.getEnclosingDefinition().getLocatedName().getRole() != null &&
+					run.getDefinition().getLocatedName().getRole() != null) {
+				Contract c=contracts.remove(run.getDefinition().getLocatedName().getRole().getName());
+				
+				if (c != null) {
+					contracts.put(run.getEnclosingDefinition().getLocatedName().getRole().getName(), c);
+				}
+			}
+			
+			for (DeclarationBinding db : run.getBindings()) {
 				if (db.getDeclaration() instanceof Role) {
 					Contract c=contracts.remove(db.getBoundName());
 					

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/RunModelChangeRule.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -88,7 +88,16 @@
 		Run elem=(Run)mobj;
 
 		if (elem.getDefinition() != null) {
+			
+			ModelChangeUtils.pushRoleContractMapping(context, elem);
+			
+			ModelChangeUtils.addContracts(context, elem.getDefinition(), false);
+			
 			context.insert(bpelModel, elem.getDefinition(), ref);
+
+			ModelChangeUtils.removeContracts(context, elem.getDefinition(), false);
+			
+			ModelChangeUtils.popRoleContractMapping(context, elem);
 		}
 		
 		return(true);

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/change/SpawnModelChangeRule.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -88,7 +88,15 @@
 		Spawn elem=(Spawn)mobj;
 
 		if (elem.getDefinition() != null) {
+			ModelChangeUtils.pushRoleContractMapping(context, elem);
+			
+			ModelChangeUtils.addContracts(context, elem.getDefinition(), false);
+			
 			context.insert(bpelModel, elem.getDefinition(), ref);
+
+			ModelChangeUtils.removeContracts(context, elem.getDefinition(), false);
+			
+			ModelChangeUtils.popRoleContractMapping(context, elem);
 		}
 		
 		return(true);

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/AbstractInteraction.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -146,40 +146,6 @@
 		return(ret);
 	}
 
-	protected TypeReference createTypeReference(String type, ConversionContext context) {
-		TypeReference ret=new TypeReference();
-		ret.derivedFrom(this);
-		
-		if (type != null) {
-			int index=-1;
-			
-			if (type.charAt(0) == '{') {
-				// Assume a qname
-				QName qname=QName.valueOf(type);
-				
-				ret.setLocalpart(qname.getLocalPart());
-				ret.setNamespace(qname.getNamespaceURI());
-				
-			} else if ((index=type.indexOf(':')) == -1) {
-				ret.setLocalpart(type);
-				
-			} else {
-				ret.setLocalpart(type.substring(index+1));
-				
-				String prefix=type.substring(0, index);
-				String ns=context.getNamespace(prefix);
-				
-				if (ns != null) {
-					ret.setNamespace(ns);
-				} else {
-					// TODO: Log error
-				}
-			}
-		}
-		
-		return(ret);	
-	}
-	
 	/**
 	 * This method validates the BPEL activity and reports warnings or
 	 * errors to the supplied model listener.

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Invoke.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -21,6 +21,8 @@
 import org.scribble.model.*;
 import org.scribble.model.admin.ModelListener;
 import org.jboss.savara.tools.bpel.model.*;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
+import org.jboss.savara.tools.bpel.util.XMLUtils;
 
 /**
  * This class represents an unsupported (or custom) action within
@@ -185,7 +187,7 @@
 							new org.scribble.conversation.model.Raise();
 				
 				TypeReference tref=new TypeReference();
-				tref.setLocalpart(catchBlock.getFaultName());
+				tref.setLocalpart(XMLUtils.getLocalname(catchBlock.getFaultName()));
 				raise.setType(tref);
 				
 				fcb.getContents().add(raise);
@@ -215,7 +217,7 @@
 		String xmlType=context.getProcess().getXMLType(var.getMessageType(),
 				context.getEnvironmentContext());
 
-		TypeReference tref=createTypeReference(xmlType, context);
+		TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
 				
 		MessageSignature ms=new MessageSignature();
 		ms.setOperation(getOperation());
@@ -248,7 +250,7 @@
 		String xmlType=context.getProcess().getXMLType(var.getMessageType(),
 				context.getEnvironmentContext());
 
-		TypeReference tref=createTypeReference(xmlType, context);
+		TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
 		
 		MessageSignature ms=new MessageSignature();
 		ms.setOperation(getOperation());
@@ -289,10 +291,10 @@
 			String xmlType=context.getProcess().getXMLType(var.getMessageType(),
 					context.getEnvironmentContext());
 
-			tref = createTypeReference(xmlType, context);
+			tref = TypeReferenceUtil.createTypeReference(xmlType, context);
 			//tref.setLocalpart(var.getMessageType());
 		} else if (faultMesgType != null) {
-			tref = createTypeReference(faultMesgType, context);
+			tref = TypeReferenceUtil.createTypeReference(faultMesgType, context);
 			//tref.setLocalpart(faultMesgType);
 		}
 		

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/OnMessage.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -20,6 +20,7 @@
 import java.util.List;
 
 import org.jboss.savara.tools.bpel.model.BPELLanguageModel;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
 import org.scribble.conversation.model.ConversationInteraction;
 import org.scribble.model.Activity;
 import org.scribble.model.MessageSignature;
@@ -192,13 +193,12 @@
 		
 		ConversationInteraction interaction=new ConversationInteraction();
 		
-		TypeReference tref=new TypeReference();
-		
 		Variable var=context.getVariable(getVariable());
 		
-		if (var != null) {
-			tref.setLocalpart(var.getMessageType());			
-		}
+		String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+				context.getEnvironmentContext());
+
+		TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
 		
 		MessageSignature ms=new MessageSignature();
 		ms.setOperation(getOperation());

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Process.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -32,6 +32,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.jboss.savara.tools.bpel.model.*;
 import org.jboss.savara.tools.bpel.model.util.InteractionUtil;
+import org.jboss.savara.tools.bpel.util.XMLUtils;
 
 /**
  * This class represents a BPEL process.
@@ -184,7 +185,7 @@
 		// Resolve the namespace prefix
 		int index=wsdlMessageType.indexOf(':');
 		
-		if (index != -1) {
+		if (index != -1 && context != null) {
 			String prefix=wsdlMessageType.substring(0, index);
 			
 			String namespace=getNamespace(prefix);
@@ -843,7 +844,7 @@
 					cb.derivedFrom(catchPath);				
 					
 					TypeReference tref=new TypeReference();
-					tref.setLocalpart(catchPath.getFaultName());
+					tref.setLocalpart(XMLUtils.getLocalname(catchPath.getFaultName()));
 					cb.setType(tref);
 					
 					Variable faultVar=null;

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Receive.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -21,6 +21,7 @@
 import org.scribble.model.*;
 import org.scribble.model.admin.ModelListener;
 import org.jboss.savara.tools.bpel.model.*;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
 
 /**
  * This class represents an unsupported (or custom) action within
@@ -140,7 +141,7 @@
 		String xmlType=context.getProcess().getXMLType(var.getMessageType(),
 								context.getEnvironmentContext());
 		
-		TypeReference tref=createTypeReference(xmlType, context);
+		TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
 		
 		MessageSignature ms=new MessageSignature();
 		ms.derivedFrom(this);

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Reply.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -21,6 +21,7 @@
 import org.scribble.model.*;
 import org.scribble.model.admin.ModelListener;
 import org.jboss.savara.tools.bpel.model.*;
+import org.jboss.savara.tools.bpel.model.util.TypeReferenceUtil;
 
 /**
  * This class represents a BPEL reply activity.
@@ -128,7 +129,7 @@
 		String xmlType=context.getProcess().getXMLType(var.getMessageType(),
 				context.getEnvironmentContext());
 
-		TypeReference tref=createTypeReference(xmlType, context);
+		TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
 		
 		MessageSignature ms=new MessageSignature();
 		ms.derivedFrom(this);

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/component/Scope.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -25,6 +25,7 @@
 import org.scribble.model.admin.ModelListener;
 import org.jboss.savara.tools.bpel.model.*;
 import org.jboss.savara.tools.bpel.model.util.InteractionUtil;
+import org.jboss.savara.tools.bpel.util.XMLUtils;
 
 /**
  * This class represents a scope grouping activity.
@@ -632,7 +633,7 @@
 					cb.derivedFrom(catchPath);
 					
 					TypeReference tref=new TypeReference();
-					tref.setLocalpart(catchPath.getFaultName());
+					tref.setLocalpart(XMLUtils.getLocalname(catchPath.getFaultName()));
 					cb.setType(tref);
 					
 					Variable faultVar=null;

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/java/org/jboss/savara/tools/bpel/model/util/TypeReferenceUtil.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.jboss.savara.tools.bpel.model.util;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.savara.tools.bpel.model.component.ConversionContext;
+import org.scribble.model.TypeReference;
+
+public class TypeReferenceUtil {
+
+	public static TypeReference createTypeReference(String type, ConversionContext context) {
+		TypeReference ret=new TypeReference();
+		//ret.derivedFrom(this);
+		
+		if (type != null) {
+			int index=-1;
+			
+			if (type.charAt(0) == '{') {
+				// Assume a qname
+				QName qname=QName.valueOf(type);
+				
+				ret.setLocalpart(qname.getLocalPart());
+				ret.setNamespace(qname.getNamespaceURI());
+				
+			} else if ((index=type.indexOf(':')) == -1) {
+				ret.setLocalpart(type);
+				
+			} else {
+				ret.setLocalpart(type.substring(index+1));
+				
+				String prefix=type.substring(0, index);
+				String ns=context.getNamespace(prefix);
+				
+				if (ns != null) {
+					ret.setNamespace(ns);
+				} else {
+					// TODO: Log error
+				}
+			}
+		}
+		
+		return(ret);	
+	}
+	
+}

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Broker.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Broker.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Broker.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,63 +1,64 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
     <partnerLinks>
-        <partnerLink myRole="BrokerService" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerServiceLT"/>
-        <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="tns:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
-        <partnerLink name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
-        <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="tns:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
+        <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="brk:BuyerToBrokerServiceLT"/>
+        <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="brk:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
+        <partnerLink name="BrokerToCreditAgency" partnerLinkType="brk:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+        <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="brk:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
     </partnerLinks>
     <variables>
-        <variable messageType="tns:makeEnquiryRequest" name="enquiryVar"/>
-        <variable messageType="ns1:getQuoteRequest" name="requestForQuoteVar"/>
-        <variable messageType="ns1:getQuoteResponse" name="quoteVar"/>
-        <variable messageType="tns:makeEnquiryResponse" name="quoteListVar"/>
-        <variable messageType="tns:buyRequest" name="buyVar"/>
-        <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
-        <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
-        <variable messageType="ns1:confirmRequest" name="orderConfirmedVar"/>
-        <variable messageType="ns1:confirmResponse" name="bookingReferenceVar"/>
-        <variable messageType="tns:rejectedFault" name="orderRejectedVar"/>
-        <variable messageType="tns:cancelRequest" name="cancelVar"/>
+        <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+        <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+        <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+        <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+        <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+        <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+        <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+        <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+        <variable messageType="brk:rejectedFault" name="rejectedFaultVar"/>
+        <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
     </variables>
     <sequence>
-        <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="enquiryVar"/>
+        <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryRequestVar"/>
         <while>
             <sequence>
                 <scope>
                     <sequence>
-                        <invoke inputVariable="requestForQuoteVar" name="Send_requestForQuote" operation="getQuote" outputVariable="quoteVar" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior"/>
+                        <invoke inputVariable="getQuoteRequestVar" name="Send_requestForQuote" operation="getQuote" outputVariable="getQuoteResponseVar" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior"/>
                     </sequence>
                 </scope>
             </sequence>
         </while>
-        <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
+        <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
         <pick>
-            <onMessage operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="buyVar">
+            <onMessage operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyRequestVar">
                 <sequence>
                     <scope>
                         <sequence>
                             <scope>
                                 <faultHandlers>
-                                    <catch faultMessageType="tns:invalidCreditFault" faultName="tns:invalidCredit" faultVariable="creditCheckInvalidVar">
+                                    <catch faultMessageType="cay:invalidCreditFault" faultName="cay:invalidCredit" faultVariable="invalidCreditFaultVar">
                                         <sequence>
-                                            <reply faultName="tns:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="orderRejectedVar"/>
+                                            <reply faultName="brk:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="rejectedFaultVar"/>
                                         </sequence>
                                     </catch>
                                 </faultHandlers>
                                 <sequence>
-                                    <invoke inputVariable="creditCheckRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior"/>
-                                    <invoke inputVariable="orderConfirmedVar" name="Send_orderConfirmed" operation="confirm" outputVariable="bookingReferenceVar" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior"/>
-                                    <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="bookingReferenceVar"/>
+                                    <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior"/>
+                                    <invoke inputVariable="confirmRequestVar" name="Send_orderConfirmed" operation="confirm" outputVariable="confirmResponseVar" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior"/>
+                                    <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyResponseVar"/>
                                 </sequence>
                             </scope>
                         </sequence>
                     </scope>
                 </sequence>
             </onMessage>
-            <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="cancelVar">
+            <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="cancelRequestVar">
                 <sequence/>
             </onMessage>
         </pick>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Buyer.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,33 +1,33 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
     <partnerLinks>
-        <partnerLink myRole="BuyerRequester" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
+        <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="byr:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
     </partnerLinks>
     <variables>
-        <variable messageType="tns:makeEnquiryRequest" name="enquiryVar"/>
-        <variable messageType="tns:makeEnquiryResponse" name="quoteListVar"/>
-        <variable messageType="tns:buyRequest" name="buyVar"/>
-        <variable messageType="tns:buyResponse" name="bookingReferenceVar"/>
-        <variable messageType="tns:cancelRequest" name="cancelVar"/>
+        <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+        <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+        <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+        <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+        <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
     </variables>
     <sequence>
-        <invoke inputVariable="enquiryVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
-        <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
+        <invoke inputVariable="makeEnquiryRequestVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+        <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
         <if>
             <sequence>
                 <scope>
                     <sequence>
                         <scope>
                             <faultHandlers>
-                                <catch faultMessageType="tns:rejectedFault" faultName="tns:rejected" faultVariable="orderRejectedVar">
+                                <catch faultMessageType="brk:rejectedFault" faultName="brk:rejected" faultVariable="rejectedFaultVar">
                                     <sequence/>
                                 </catch>
                             </faultHandlers>
                             <sequence>
-                                <invoke inputVariable="buyVar" name="Send_buy" operation="buy" outputVariable="bookingReferenceVar" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
+                                <invoke inputVariable="buyRequestVar" name="Send_buy" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
                             </sequence>
                         </scope>
                     </sequence>
@@ -35,7 +35,7 @@
             </sequence>
             <else>
                 <sequence>
-                    <invoke inputVariable="cancelVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
+                    <invoke inputVariable="cancelRequestVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
                 </sequence>
             </else>
         </if>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at CreditAgency.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at CreditAgency.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,29 +1,29 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common at CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common at CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
     <partnerLinks>
-        <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyServiceLT"/>
+        <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="cay:BrokerToCreditAgencyServiceLT"/>
     </partnerLinks>
     <variables>
-        <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
-        <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
-        <variable messageType="tns:invalidCreditFault" name="creditCheckInvalidVar"/>
+        <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="cay:invalidCreditFault" name="invalidCreditFaultVar"/>
     </variables>
     <sequence>
         <pick>
-            <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckRequestVar">
+            <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditRequestVar">
                 <sequence>
                     <scope>
                         <sequence>
                             <if>
                                 <sequence>
-                                    <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckOkVar"/>
+                                    <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditResponseVar"/>
                                 </sequence>
                                 <else>
                                     <sequence>
-                                        <reply faultName="tns:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckInvalidVar"/>
+                                        <reply faultName="cay:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="invalidCreditFaultVar"/>
                                     </sequence>
                                 </else>
                             </if>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierQuoteEngine.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierQuoteEngine.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,15 +1,15 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace=""/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace=""/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
     <partnerLinks>
-        <partnerLink myRole="SupplierQuoteEngineService" name="BrokerToSupplierQuoteEngine" partnerLinkType="ns1:BrokerToSupplierQuoteEngineServiceLT"/>
+        <partnerLink myRole="SupplierBehavior" name="BrokerToSupplierQuoteEngine" partnerLinkType="spr:BrokerToSupplierQuoteEngineServiceLT"/>
     </partnerLinks>
     <variables>
-        <variable messageType="ns1:getQuoteRequest" name="requestForQuoteVar"/>
-        <variable messageType="ns1:getQuoteResponse" name="quoteVar"/>
+        <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+        <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
     </variables>
     <sequence>
-        <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="requestForQuoteVar"/>
-        <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="quoteVar"/>
+        <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteRequestVar"/>
+        <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteResponseVar"/>
     </sequence>
 </process>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierTxnProcessor.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ESBBroker at SupplierTxnProcessor.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,18 +1,18 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace=""/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace=""/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
     <partnerLinks>
-        <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="ns2:BrokerToSupplierTxnProcessorServiceLT"/>
+        <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="spr:BrokerToSupplierTxnProcessorServiceLT"/>
     </partnerLinks>
     <variables>
-        <variable messageType="ns1:confirmRequest" name="orderConfirmedVar"/>
-        <variable messageType="ns1:confirmResponse" name="bookingReferenceVar"/>
+        <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+        <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
     </variables>
     <sequence>
         <pick createInstance="yes">
-            <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="orderConfirmedVar">
+            <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmRequestVar">
                 <sequence>
-                    <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="bookingReferenceVar"/>
+                    <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmResponseVar"/>
                 </sequence>
             </onMessage>
         </pick>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Buyer.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -7,17 +7,17 @@
     </partnerLinks>
     <variables>
         <variable messageType="sto:buyRequest" name="buyRequestVar"/>
-        <variable messageType="sto:buyResponse" name="buyConfirmedVar"/>
+        <variable messageType="sto:buyResponse" name="buyResponseVar"/>
     </variables>
     <sequence>
         <scope>
             <faultHandlers>
-                <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="buyFailedVar">
+                <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="BuyFailedFaultVar">
                     <sequence/>
                 </catch>
             </faultHandlers>
             <sequence>
-                <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyConfirmedVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
+                <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
             </sequence>
         </scope>
     </sequence>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at CreditAgency.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at CreditAgency.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -3,22 +3,22 @@
     <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
     <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
     <partnerLinks>
-        <partnerLink myRole="CreditAgencyService" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
+        <partnerLink myRole="CreditAgencyInterface" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
     </partnerLinks>
     <variables>
-        <variable messageType="pur:checkCreditRequest" name="creditCheckRequestVar"/>
-        <variable messageType="pur:checkCreditResponse" name="creditCheckOkVar"/>
-        <variable messageType="pur:CreditCheckFailedFault" name="creditCheckInvalidVar"/>
+        <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="pur:CreditCheckFailedFault" name="CreditCheckFailedFaultVar"/>
     </variables>
     <sequence>
-        <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="creditCheckRequestVar"/>
+        <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditRequestVar"/>
         <if>
             <sequence>
-                <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="creditCheckOkVar"/>
+                <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditResponseVar"/>
             </sequence>
             <else>
                 <sequence>
-                    <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="creditCheckInvalidVar"/>
+                    <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="CreditCheckFailedFaultVar"/>
                 </sequence>
             </else>
         </if>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Store.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Store.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/PurchaseGoods at Store.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -3,29 +3,29 @@
     <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
     <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_StoreArtifacts.wsdl" namespace="http://www.jboss.org/examples/store"/>
     <partnerLinks>
-        <partnerLink myRole="StoreService" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
+        <partnerLink myRole="StoreInterface" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
         <partnerLink name="StoreToCreditAgency" partnerLinkType="sto:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
     </partnerLinks>
     <variables>
         <variable messageType="sto:buyRequest" name="buyRequestVar"/>
-        <variable messageType="pur:checkCreditRequest" name="creditCheckRequestVar"/>
-        <variable messageType="pur:checkCreditResponse" name="creditCheckOkVar"/>
-        <variable messageType="sto:buyResponse" name="buyConfirmedVar"/>
-        <variable messageType="sto:BuyFailedFault" name="buyFailedVar"/>
+        <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+        <variable messageType="sto:BuyFailedFault" name="BuyFailedFaultVar"/>
     </variables>
     <sequence>
         <receive createInstance="yes" name="Receive_BuyRequest" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyRequestVar"/>
         <scope>
             <faultHandlers>
-                <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="creditCheckInvalidVar">
+                <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="CreditCheckFailedFaultVar">
                     <sequence>
-                        <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyFailedVar"/>
+                        <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="BuyFailedFaultVar"/>
                     </sequence>
                 </catch>
             </faultHandlers>
             <sequence>
-                <invoke inputVariable="creditCheckRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
-                <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyConfirmedVar"/>
+                <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
+                <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyResponseVar"/>
             </sequence>
         </scope>
     </sequence>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Buyer.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,22 +1,22 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
     <partnerLinks>
-        <partnerLink name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerLT" partnerRole="SellerRequester"/>
+        <partnerLink name="BuyerToSeller" partnerLinkType="byr:BuyerToSellerLT" partnerRole="SellerRequester"/>
     </partnerLinks>
     <variables>
-        <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
-        <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
+        <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
     </variables>
     <sequence>
         <scope>
             <faultHandlers>
-                <catch faultMessageType="tns:insufficientCreditFault" faultName="tns:insufficientCredit" faultVariable="creditCheckInvalidVar">
+                <catch faultMessageType="slr:insufficientCreditFault" faultName="slr:insufficientCredit" faultVariable="insufficientCreditFaultVar">
                     <sequence/>
                 </catch>
             </faultHandlers>
             <sequence>
-                <invoke inputVariable="creditCheckRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BuyerToSeller" portType="tns:SellerBehavior"/>
+                <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BuyerToSeller" portType="slr:SellerBehavior"/>
             </sequence>
         </scope>
     </sequence>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Seller.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Seller.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/results/ReqRespFault at Seller.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,23 +1,23 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess at Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess at Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
     <partnerLinks>
-        <partnerLink myRole="SellerService" name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerServiceLT"/>
+        <partnerLink myRole="SellerBehavior" name="BuyerToSeller" partnerLinkType="slr:BuyerToSellerServiceLT"/>
     </partnerLinks>
     <variables>
-        <variable messageType="tns:checkCreditRequest" name="creditCheckRequestVar"/>
-        <variable messageType="tns:checkCreditResponse" name="creditCheckOkVar"/>
-        <variable messageType="tns:insufficientCreditFault" name="creditCheckInvalidVar"/>
+        <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="slr:insufficientCreditFault" name="insufficientCreditFaultVar"/>
     </variables>
     <sequence>
-        <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckRequestVar"/>
+        <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditRequestVar"/>
         <if>
             <sequence>
-                <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckOkVar"/>
+                <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditResponseVar"/>
             </sequence>
             <else>
                 <sequence>
-                    <reply faultName="tns:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckInvalidVar"/>
+                    <reply faultName="slr:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="insufficientCreditFaultVar"/>
                 </sequence>
             </else>
         </if>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ESBBroker.cdm	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,124 +1,128 @@
-<?xml version="1.0" encoding="Cp1252"?>
-<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ESBBroker" name="ESBBroker" author="gary" version="0.2" targetNamespace="http://www.pi4soa.org/ESBBroker">
-  <typeDefinitions>
-    <nameSpaces description="Target Namespace for ESBBroker" prefix="tns" uRI="http://www.pi4soa.org/ESBBroker"/>
-    <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
-    <informationTypes description="This is the information type BookingReference" name="BookingReference" elementName="bookingReference"/>
-    <informationTypes description="This is the information type Buy" name="Buy" elementName="buy"/>
-    <informationTypes description="This is the information type Cancel" name="Cancel" elementName="cancel"/>
-    <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
-    <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
-    <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
-    <informationTypes description="This is the information type Enquiry" name="Enquiry" typeName="" elementName="enquiry"/>
-    <informationTypes description="This is the information type OrderConfirmed" name="OrderConfirmed" elementName="orderConfirmed"/>
-    <informationTypes description="This is the information type OrderRejected" name="OrderRejected" elementName="orderRejected"/>
-    <informationTypes description="This is the information type Quote" name="Quote" elementName="quote"/>
-    <informationTypes description="This is the information type QuoteList" name="QuoteList" elementName="quoteList"/>
-    <informationTypes description="This is the information type RequestForQuote" name="RequestForQuote" elementName="requestForQuote"/>
-    <informationTypes description="This is the information type URIType" name="URIType"/>
-    <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/@informationTypes.12"/>
-    <roleTypes description="This is the role type Broker" name="Broker">
-      <behaviors description="This is the behavior BrokerBehavior" name="BrokerBehavior"/>
-    </roleTypes>
-    <roleTypes description="This is the role type Buyer" name="Buyer">
-      <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
-    </roleTypes>
-    <roleTypes description="This is the role type CreditAgency" name="CreditAgency">
-      <behaviors description="This is the behavior CreditAgencyBehavior" name="CreditAgencyBehavior"/>
-    </roleTypes>
-    <roleTypes description="This is the role type Supplier" name="Supplier">
-      <behaviors description="This is the behavior SupplierBehavior" name="SupplierBehavior"/>
-    </roleTypes>
-    <relationshipTypes description="Relationship between Broker and CreditAgency" name="BrokerToCreditAgencyRel" firstRoleType="//@typeDefinitions/@roleTypes.0" secondRoleType="//@typeDefinitions/@roleTypes.2"/>
-    <relationshipTypes description="Relationship between Broker and Supplier" name="BrokerToSupplierRel" firstRoleType="//@typeDefinitions/@roleTypes.0" secondRoleType="//@typeDefinitions/@roleTypes.3"/>
-    <relationshipTypes description="Relationship between Buyer and Broker" name="BuyerToBrokerRel" firstRoleType="//@typeDefinitions/@roleTypes.1" secondRoleType="//@typeDefinitions/@roleTypes.0"/>
-    <participantTypes description="This is the participant type Broker" name="Broker" roleTypes="//@typeDefinitions/@roleTypes.0">
-      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Broker" name="conversationType"/>
-    </participantTypes>
-    <participantTypes description="This is the participant type Buyer" name="Buyer" roleTypes="//@typeDefinitions/@roleTypes.1">
-      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Buyer" name="conversationType"/>
-    </participantTypes>
-    <participantTypes description="This is the participant type CreditAgency" name="CreditAgency" roleTypes="//@typeDefinitions/@roleTypes.2">
-      <semanticAnnotations annotation="overlord.cdl.samples.Common at CreditAgency" name="conversationType"/>
-    </participantTypes>
-    <participantTypes description="This is the participant type Supplier" name="Supplier" roleTypes="//@typeDefinitions/@roleTypes.3">
-      <semanticAnnotations annotation="" name="conversationType"/>
-    </participantTypes>
-    <channelTypes description="This is the channel type BrokerChannelType" name="BrokerChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.0"/>
-    <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.2"/>
-    <channelTypes description="This is the channel type SupplierChannelType" name="SupplierChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.3"/>
-  </typeDefinitions>
-  <choreographies description="Choreography flow for the ESBBroker process" name="ESBBrokerProcess" root="true">
-    <enclosedChoreographies name="CompleteTransaction">
-      <participantDefinitions name="SupplierTxnProcessor" roleTypes="//@typeDefinitions/@roleTypes.3">
-        <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at SupplierTxnProcessor" name="conversationType"/>
-      </participantDefinitions>
-      <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/@channelTypes.0" free="true" roleTypes="//@typeDefinitions/@roleTypes.0 //@typeDefinitions/@roleTypes.1"/>
-      <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/@channelTypes.1"/>
-      <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/@channelTypes.2"/>
-      <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
-        <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Buy" name="BuyRequestExchange" type="//@typeDefinitions/@informationTypes.1"/>
-      </activities>
-      <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCredit" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.1" relationship="//@typeDefinitions/@relationshipTypes.0">
-        <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CheckCredit" name="CheckCreditRequestExchange" type="//@typeDefinitions/@informationTypes.3"/>
-      </activities>
-      <activities xsi:type="org.pi4soa.cdl:Choice" description="Evaluate Credit Check Result">
-        <activities xsi:type="org.pi4soa.cdl:Sequence" description="Sufficient Credit">
-          <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditResponse" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.1" relationship="//@typeDefinitions/@relationshipTypes.0">
-            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditResponse" name="CheckCreditResponseRespondExchange" type="//@typeDefinitions/@informationTypes.5" action="Respond"/>
-          </activities>
-          <activities xsi:type="org.pi4soa.cdl:Interaction" name="ConfirmBooking" operation="confirm" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.2" relationship="//@typeDefinitions/@relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.0/@participantDefinitions.0">
-            <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/@informationTypes.7"/>
-            <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/@informationTypes.0" action="Respond"/>
-          </activities>
-          <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
-            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/@informationTypes.0" action="Respond" faultName=""/>
-          </activities>
-        </activities>
-        <activities xsi:type="org.pi4soa.cdl:Sequence" description="Insufficient Credit">
-          <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditFailed" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.1" relationship="//@typeDefinitions/@relationshipTypes.0">
-            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditFailed" name="CheckCreditFailedRespondExchange" type="//@typeDefinitions/@informationTypes.4" action="Respond" faultName="invalidCredit"/>
-          </activities>
-          <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
-            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/@informationTypes.8" action="Respond" faultName="rejected"/>
-          </activities>
-        </activities>
-      </activities>
-    </enclosedChoreographies>
-    <enclosedChoreographies name="RequestForQuote">
-      <participantDefinitions name="SupplierQuoteEngine" roleTypes="//@typeDefinitions/@roleTypes.3">
-        <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at SupplierQuoteEngine" name="conversationType"/>
-      </participantDefinitions>
-      <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/@channelTypes.2"/>
-      <activities xsi:type="org.pi4soa.cdl:Interaction" name="RFQ" operation="getQuote" channelVariable="//@choreographies.0/@enclosedChoreographies.1/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.1/@participantDefinitions.0">
-        <exchangeDetails description="This is the exchange details for the request exchange associated with interaction RFQ" name="RFQRequestExchange" type="//@typeDefinitions/@informationTypes.11"/>
-        <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction RFQ" name="RFQRespondExchange" type="//@typeDefinitions/@informationTypes.9" action="Respond"/>
-      </activities>
-    </enclosedChoreographies>
-    <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/@channelTypes.0" roleTypes="//@typeDefinitions/@roleTypes.0 //@typeDefinitions/@roleTypes.1"/>
-    <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
-      <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Enquiry" name="EnquiryRequestExchange" type="//@typeDefinitions/@informationTypes.6"/>
-    </activities>
-    <activities xsi:type="org.pi4soa.cdl:While" name="SendRFQToSuppliers">
-      <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/@enclosedChoreographies.1"/>
-    </activities>
-    <activities xsi:type="org.pi4soa.cdl:When" name="WhenQuotesReceivedOrTimeout">
-      <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
-        <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Enquiry" name="EnquiryRespondExchange" type="//@typeDefinitions/@informationTypes.10" action="Respond"/>
-      </activities>
-    </activities>
-    <activities xsi:type="org.pi4soa.cdl:Choice">
-      <activities xsi:type="org.pi4soa.cdl:Sequence">
-        <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/@enclosedChoreographies.0" waitForCompletion="false">
-          <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/@variableDefinitions.0" thisRole="//@typeDefinitions/@roleTypes.1" freeVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" freeRole="//@typeDefinitions/@roleTypes.1"/>
-          <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/@variableDefinitions.0" thisRole="//@typeDefinitions/@roleTypes.0" freeVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" freeRole="//@typeDefinitions/@roleTypes.0"/>
-        </activities>
-      </activities>
-      <activities xsi:type="org.pi4soa.cdl:Sequence">
-        <activities xsi:type="org.pi4soa.cdl:Interaction" name="Cancel" operation="cancel" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
-          <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Cancel" name="CancelRequestExchange" type="//@typeDefinitions/@informationTypes.2"/>
-        </activities>
-      </activities>
-    </activities>
-  </choreographies>
-</org.pi4soa.cdl:Package>
+<?xml version="1.0" encoding="UTF-8"?>
+<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ESBBroker" name="ESBBroker" author="gary" version="0.2" targetNamespace="http://www.pi4soa.org/ESBBroker">
+  <typeDefinitions>
+    <nameSpaces description="Target Namespace for ESBBroker" prefix="tns" uRI="http://www.pi4soa.org/ESBBroker"/>
+    <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
+    <nameSpaces description="Target Namespace for ESBBroker" prefix="brk" uRI="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <nameSpaces description="Target Namespace for ESBBroker" prefix="byr" uRI="http://www.pi4soa.org/ESBBroker/Buyer"/>
+    <nameSpaces description="Target Namespace for ESBBroker" prefix="cay" uRI="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <nameSpaces description="Target Namespace for ESBBroker" prefix="spr" uRI="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <informationTypes description="This is the information type BookingReference" name="BookingReference" elementName="bookingReference"/>
+    <informationTypes description="This is the information type Buy" name="Buy" elementName="buy"/>
+    <informationTypes description="This is the information type Cancel" name="Cancel" elementName="cancel"/>
+    <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
+    <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
+    <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
+    <informationTypes description="This is the information type Enquiry" name="Enquiry" typeName="" elementName="enquiry"/>
+    <informationTypes description="This is the information type OrderConfirmed" name="OrderConfirmed" elementName="orderConfirmed"/>
+    <informationTypes description="This is the information type OrderRejected" name="OrderRejected" elementName="orderRejected"/>
+    <informationTypes description="This is the information type Quote" name="Quote" elementName="quote"/>
+    <informationTypes description="This is the information type QuoteList" name="QuoteList" elementName="quoteList"/>
+    <informationTypes description="This is the information type RequestForQuote" name="RequestForQuote" elementName="requestForQuote"/>
+    <informationTypes description="This is the information type URIType" name="URIType"/>
+    <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/@informationTypes.12"/>
+    <roleTypes description="This is the role type Broker" name="Broker">
+      <behaviors description="This is the behavior BrokerBehavior" name="BrokerBehavior"/>
+    </roleTypes>
+    <roleTypes description="This is the role type Buyer" name="Buyer">
+      <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
+    </roleTypes>
+    <roleTypes description="This is the role type CreditAgency" name="CreditAgency">
+      <behaviors description="This is the behavior CreditAgencyBehavior" name="CreditAgencyBehavior"/>
+    </roleTypes>
+    <roleTypes description="This is the role type Supplier" name="Supplier">
+      <behaviors description="This is the behavior SupplierBehavior" name="SupplierBehavior"/>
+    </roleTypes>
+    <relationshipTypes description="Relationship between Broker and CreditAgency" name="BrokerToCreditAgencyRel" firstRoleType="//@typeDefinitions/@roleTypes.0" secondRoleType="//@typeDefinitions/@roleTypes.2"/>
+    <relationshipTypes description="Relationship between Broker and Supplier" name="BrokerToSupplierRel" firstRoleType="//@typeDefinitions/@roleTypes.0" secondRoleType="//@typeDefinitions/@roleTypes.3"/>
+    <relationshipTypes description="Relationship between Buyer and Broker" name="BuyerToBrokerRel" firstRoleType="//@typeDefinitions/@roleTypes.1" secondRoleType="//@typeDefinitions/@roleTypes.0"/>
+    <participantTypes description="This is the participant type brk:Broker" name="brk:Broker" roleTypes="//@typeDefinitions/@roleTypes.0">
+      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Broker" name="conversationType"/>
+    </participantTypes>
+    <participantTypes description="This is the participant type byr:Buyer" name="byr:Buyer" roleTypes="//@typeDefinitions/@roleTypes.1">
+      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Buyer" name="conversationType"/>
+    </participantTypes>
+    <participantTypes description="This is the participant type cay:CreditAgency" name="cay:CreditAgency" roleTypes="//@typeDefinitions/@roleTypes.2">
+      <semanticAnnotations annotation="overlord.cdl.samples.Common at CreditAgency" name="conversationType"/>
+    </participantTypes>
+    <participantTypes description="This is the participant type spr:Supplier" name="spr:Supplier" roleTypes="//@typeDefinitions/@roleTypes.3">
+      <semanticAnnotations annotation="" name="conversationType"/>
+    </participantTypes>
+    <channelTypes description="This is the channel type BrokerChannelType" name="BrokerChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.0"/>
+    <channelTypes description="This is the channel type CreditAgencyChannelType" name="CreditAgencyChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.2"/>
+    <channelTypes description="This is the channel type SupplierChannelType" name="SupplierChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.3"/>
+  </typeDefinitions>
+  <choreographies description="Choreography flow for the ESBBroker process" name="ESBBrokerProcess" root="true">
+    <enclosedChoreographies name="CompleteTransaction">
+      <participantDefinitions name="SupplierTxnProcessor" roleTypes="//@typeDefinitions/@roleTypes.3">
+        <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at SupplierTxnProcessor" name="conversationType"/>
+      </participantDefinitions>
+      <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/@channelTypes.0" free="true" roleTypes="//@typeDefinitions/@roleTypes.0 //@typeDefinitions/@roleTypes.1"/>
+      <variableDefinitions description="Channel to facilitate interaction to CreditAgency" name="CreditAgencyChannel" type="//@typeDefinitions/@channelTypes.1"/>
+      <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/@channelTypes.2"/>
+      <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
+        <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Buy" name="BuyRequestExchange" type="//@typeDefinitions/@informationTypes.1"/>
+      </activities>
+      <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCredit" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.1" relationship="//@typeDefinitions/@relationshipTypes.0">
+        <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CheckCredit" name="CheckCreditRequestExchange" type="//@typeDefinitions/@informationTypes.3"/>
+      </activities>
+      <activities xsi:type="org.pi4soa.cdl:Choice" description="Evaluate Credit Check Result">
+        <activities xsi:type="org.pi4soa.cdl:Sequence" description="Sufficient Credit">
+          <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditResponse" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.1" relationship="//@typeDefinitions/@relationshipTypes.0">
+            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditResponse" name="CheckCreditResponseRespondExchange" type="//@typeDefinitions/@informationTypes.5" action="Respond"/>
+          </activities>
+          <activities xsi:type="org.pi4soa.cdl:Interaction" name="ConfirmBooking" operation="confirm" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.2" relationship="//@typeDefinitions/@relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.0/@participantDefinitions.0">
+            <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/@informationTypes.7"/>
+            <exchangeDetails description="This is the exchange details for the request exchange associated with interaction ConfirmBooking" name="ConfirmBookingRequestExchange" type="//@typeDefinitions/@informationTypes.0" action="Respond"/>
+          </activities>
+          <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
+            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/@informationTypes.0" action="Respond" faultName=""/>
+          </activities>
+        </activities>
+        <activities xsi:type="org.pi4soa.cdl:Sequence" description="Insufficient Credit">
+          <activities xsi:type="org.pi4soa.cdl:Interaction" name="CheckCreditFailed" operation="checkCredit" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.1" relationship="//@typeDefinitions/@relationshipTypes.0">
+            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CheckCreditFailed" name="CheckCreditFailedRespondExchange" type="//@typeDefinitions/@informationTypes.4" action="Respond" faultName="invalidCredit"/>
+          </activities>
+          <activities xsi:type="org.pi4soa.cdl:Interaction" name="Buy" operation="buy" channelVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
+            <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Buy" name="BuyRespondExchange" type="//@typeDefinitions/@informationTypes.8" action="Respond" faultName="rejected"/>
+          </activities>
+        </activities>
+      </activities>
+    </enclosedChoreographies>
+    <enclosedChoreographies name="RequestForQuote">
+      <participantDefinitions name="SupplierQuoteEngine" roleTypes="//@typeDefinitions/@roleTypes.3">
+        <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at SupplierQuoteEngine" name="conversationType"/>
+      </participantDefinitions>
+      <variableDefinitions description="Channel to facilitate interaction to Supplier" name="SupplierChannel" type="//@typeDefinitions/@channelTypes.2"/>
+      <activities xsi:type="org.pi4soa.cdl:Interaction" name="RFQ" operation="getQuote" channelVariable="//@choreographies.0/@enclosedChoreographies.1/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.1" toParticipant="//@choreographies.0/@enclosedChoreographies.1/@participantDefinitions.0">
+        <exchangeDetails description="This is the exchange details for the request exchange associated with interaction RFQ" name="RFQRequestExchange" type="//@typeDefinitions/@informationTypes.11"/>
+        <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction RFQ" name="RFQRespondExchange" type="//@typeDefinitions/@informationTypes.9" action="Respond"/>
+      </activities>
+    </enclosedChoreographies>
+    <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/@channelTypes.0" roleTypes="//@typeDefinitions/@roleTypes.0 //@typeDefinitions/@roleTypes.1"/>
+    <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
+      <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Enquiry" name="EnquiryRequestExchange" type="//@typeDefinitions/@informationTypes.6"/>
+    </activities>
+    <activities xsi:type="org.pi4soa.cdl:While" name="SendRFQToSuppliers">
+      <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/@enclosedChoreographies.1"/>
+    </activities>
+    <activities xsi:type="org.pi4soa.cdl:When" name="WhenQuotesReceivedOrTimeout">
+      <activities xsi:type="org.pi4soa.cdl:Interaction" name="Enquiry" operation="makeEnquiry" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
+        <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction Enquiry" name="EnquiryRespondExchange" type="//@typeDefinitions/@informationTypes.10" action="Respond"/>
+      </activities>
+    </activities>
+    <activities xsi:type="org.pi4soa.cdl:Choice">
+      <activities xsi:type="org.pi4soa.cdl:Sequence">
+        <activities xsi:type="org.pi4soa.cdl:Perform" choreography="//@choreographies.0/@enclosedChoreographies.0" waitForCompletion="false">
+          <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/@variableDefinitions.0" thisRole="//@typeDefinitions/@roleTypes.1" freeVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" freeRole="//@typeDefinitions/@roleTypes.1"/>
+          <bindDetails name="BindBrokerChannel" thisVariable="//@choreographies.0/@variableDefinitions.0" thisRole="//@typeDefinitions/@roleTypes.0" freeVariable="//@choreographies.0/@enclosedChoreographies.0/@variableDefinitions.0" freeRole="//@typeDefinitions/@roleTypes.0"/>
+        </activities>
+      </activities>
+      <activities xsi:type="org.pi4soa.cdl:Sequence">
+        <activities xsi:type="org.pi4soa.cdl:Interaction" name="Cancel" operation="cancel" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.2">
+          <exchangeDetails description="This is the exchange details for the request exchange associated with interaction Cancel" name="CancelRequestExchange" type="//@typeDefinitions/@informationTypes.2"/>
+        </activities>
+      </activities>
+    </activities>
+  </choreographies>
+</org.pi4soa.cdl:Package>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/generator/testmodels/ReqRespFault.cdm	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,44 +1,46 @@
-<?xml version="1.0" encoding="Cp1252"?>
-<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ReqRespFault" name="ReqRespFault" author="gary" version="0.3" targetNamespace="http://www.pi4soa.org/ReqRespFault">
-  <typeDefinitions>
-    <nameSpaces description="Target Namespace for ReqRespFault" prefix="tns" uRI="http://www.pi4soa.org/ReqRespFault"/>
-    <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
-    <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
-    <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
-    <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
-    <informationTypes description="This is the information type URIType" name="URIType"/>
-    <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/@informationTypes.3"/>
-    <roleTypes description="This is the role type Buyer" name="Buyer">
-      <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
-    </roleTypes>
-    <roleTypes description="This is the role type Seller" name="Seller">
-      <behaviors description="This is the behavior SellerBehavior" name="SellerBehavior"/>
-    </roleTypes>
-    <relationshipTypes description="Relationship between Buyer and Seller" name="BuyerToSellerRel" firstRoleType="//@typeDefinitions/@roleTypes.0" secondRoleType="//@typeDefinitions/@roleTypes.1"/>
-    <participantTypes description="This is the participant type Buyer" name="Buyer" roleTypes="//@typeDefinitions/@roleTypes.0">
-      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Buyer" name="conversationType"/>
-    </participantTypes>
-    <participantTypes description="This is the participant type Seller" name="Seller" roleTypes="//@typeDefinitions/@roleTypes.1">
-      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Broker" name="conversationType"/>
-    </participantTypes>
-    <channelTypes description="This is the channel type SellerChannelType" name="SellerChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.1"/>
-  </typeDefinitions>
-  <choreographies description="Choreography flow for the ReqRespFault process" name="ReqRespFaultProcess" root="true">
-    <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/@channelTypes.0" roleTypes="//@typeDefinitions/@roleTypes.1 //@typeDefinitions/@roleTypes.0"/>
-    <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.0">
-      <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/@informationTypes.0"/>
-    </activities>
-    <activities xsi:type="org.pi4soa.cdl:Choice">
-      <activities xsi:type="org.pi4soa.cdl:Sequence">
-        <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckValid" operation="checkCredit" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.0">
-          <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckValid" name="CreditCheckValidRespondExchange" type="//@typeDefinitions/@informationTypes.2" action="Respond"/>
-        </activities>
-      </activities>
-      <activities xsi:type="org.pi4soa.cdl:Sequence">
-        <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckInvalid" operation="checkCredit" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.0">
-          <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckInvalid" name="CreditCheckInvalidRespondExchange" type="//@typeDefinitions/@informationTypes.1" action="Respond" faultName="insufficientCredit"/>
-        </activities>
-      </activities>
-    </activities>
-  </choreographies>
-</org.pi4soa.cdl:Package>
+<?xml version="1.0" encoding="UTF-8"?>
+<org.pi4soa.cdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:org.pi4soa.cdl="http:///org/pi4soa/cdl.ecore" description="The choreography description for ReqRespFault" name="ReqRespFault" author="gary" version="0.3" targetNamespace="http://www.pi4soa.org/ReqRespFault">
+  <typeDefinitions>
+    <nameSpaces description="Target Namespace for ReqRespFault" prefix="tns" uRI="http://www.pi4soa.org/ReqRespFault"/>
+    <nameSpaces description="XML Schema Namespace" prefix="xsd" uRI="http://www.w3.org/2001/XMLSchema"/>
+    <nameSpaces description="Target Namespace for ReqRespFault" prefix="byr" uRI="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+    <nameSpaces description="Target Namespace for ReqRespFault" prefix="slr" uRI="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <informationTypes description="This is the information type CreditInformation" name="CreditInformation" elementName="CreditCheckRequest"/>
+    <informationTypes description="This is the information type CreditInvalid" name="CreditInvalid" elementName="CreditCheckInvalid"/>
+    <informationTypes description="This is the information type CreditValid" name="CreditValid" elementName="CreditCheckOk"/>
+    <informationTypes description="This is the information type URIType" name="URIType"/>
+    <tokens description="This is the token URI" name="URI" informationType="//@typeDefinitions/@informationTypes.3"/>
+    <roleTypes description="This is the role type Buyer" name="Buyer">
+      <behaviors description="This is the behavior BuyerBehavior" name="BuyerBehavior"/>
+    </roleTypes>
+    <roleTypes description="This is the role type Seller" name="Seller">
+      <behaviors description="This is the behavior SellerBehavior" name="SellerBehavior"/>
+    </roleTypes>
+    <relationshipTypes description="Relationship between Buyer and Seller" name="BuyerToSellerRel" firstRoleType="//@typeDefinitions/@roleTypes.0" secondRoleType="//@typeDefinitions/@roleTypes.1"/>
+    <participantTypes description="This is the participant type byr:Buyer" name="byr:Buyer" roleTypes="//@typeDefinitions/@roleTypes.0">
+      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Buyer" name="conversationType"/>
+    </participantTypes>
+    <participantTypes description="This is the participant type slr:Seller" name="slr:Seller" roleTypes="//@typeDefinitions/@roleTypes.1">
+      <semanticAnnotations annotation="overlord.cdl.samples.LoanBroker at Broker" name="conversationType"/>
+    </participantTypes>
+    <channelTypes description="This is the channel type SellerChannelType" name="SellerChannelType" referenceToken="//@typeDefinitions/@tokens.0" roleType="//@typeDefinitions/@roleTypes.1"/>
+  </typeDefinitions>
+  <choreographies description="Choreography flow for the ReqRespFault process" name="ReqRespFaultProcess" root="true">
+    <variableDefinitions description="Channel to facilitate interaction to Broker" name="BrokerChannel" type="//@typeDefinitions/@channelTypes.0" roleTypes="//@typeDefinitions/@roleTypes.1 //@typeDefinitions/@roleTypes.0"/>
+    <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheck" operation="checkCredit" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.0">
+      <exchangeDetails description="This is the exchange details for the request exchange associated with interaction CreditCheck" name="CreditCheckRequestExchange" type="//@typeDefinitions/@informationTypes.0"/>
+    </activities>
+    <activities xsi:type="org.pi4soa.cdl:Choice">
+      <activities xsi:type="org.pi4soa.cdl:Sequence">
+        <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckValid" operation="checkCredit" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.0">
+          <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckValid" name="CreditCheckValidRespondExchange" type="//@typeDefinitions/@informationTypes.2" action="Respond"/>
+        </activities>
+      </activities>
+      <activities xsi:type="org.pi4soa.cdl:Sequence">
+        <activities xsi:type="org.pi4soa.cdl:Interaction" name="CreditCheckInvalid" operation="checkCredit" channelVariable="//@choreographies.0/@variableDefinitions.0" relationship="//@typeDefinitions/@relationshipTypes.0">
+          <exchangeDetails description="This is the exchange details for the respond exchange associated with interaction CreditCheckInvalid" name="CreditCheckInvalidRespondExchange" type="//@typeDefinitions/@informationTypes.1" action="Respond" faultName="insufficientCredit"/>
+        </activities>
+      </activities>
+    </activities>
+  </choreographies>
+</org.pi4soa.cdl:Package>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/ParserTest.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -17,6 +17,8 @@
  */
 package org.jboss.savara.tools.bpel.parser;
 
+import java.io.InputStream;
+
 import junit.framework.TestCase;
 import junit.framework.TestResult;
 import junit.framework.TestSuite;
@@ -27,23 +29,30 @@
 import org.scribble.conversation.model.ConversationNotation;
 import org.scribble.extensions.RegistryFactory;
 import org.scribble.model.ModelReference;
+import org.scribble.model.admin.Context;
 
 public class ParserTest extends TestCase {
 
     public static TestSuite suite() {
         TestSuite suite = new TestSuite("BPEL->Conversation Parser Tests");
         
-        suite.addTest(new BPELToConversationTest("ESBBroker at Broker"));
-        suite.addTest(new BPELToConversationTest("ESBBroker at Buyer"));
-        suite.addTest(new BPELToConversationTest("ESBBroker at CreditAgency"));
-        suite.addTest(new BPELToConversationTest("ESBBroker at SupplierQuoteEngine"));
-        suite.addTest(new BPELToConversationTest("ESBBroker at SupplierTxnProcessor"));
-        suite.addTest(new BPELToConversationTest("PurchaseGoods at Buyer"));
-        suite.addTest(new BPELToConversationTest("PurchaseGoods at CreditAgency"));
-        suite.addTest(new BPELToConversationTest("PurchaseGoods at Store"));
-        suite.addTest(new BPELToConversationTest("ReqRespFault at Buyer"));
-        suite.addTest(new BPELToConversationTest("ReqRespFault at Seller"));
-        suite.addTest(new BPELToConversationTest("LoanApprovalService at Service"));
+        suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Broker", "ESBBroker at Broker"));
+        suite.addTest(new BPELToConversationTest("ESBBrokerProcess_Buyer", "ESBBroker at Buyer"));
+        suite.addTest(new BPELToConversationTest("ESBBrokerProcess_CreditAgency", "ESBBroker at CreditAgency"));
+        suite.addTest(new BPELToConversationTest("RequestForQuote_SupplierQuoteEngine", "ESBBroker at SupplierQuoteEngine"));
+        suite.addTest(new BPELToConversationTest("CompleteTransaction_SupplierTxnProcessor", "ESBBroker at SupplierTxnProcessor"));
+        suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Buyer", "PurchaseGoods at Buyer"));
+        suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_CreditAgency", "PurchaseGoods at CreditAgency"));
+        suite.addTest(new BPELToConversationTest("PurchaseGoodsProcess_Store", "PurchaseGoods at Store"));
+        suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Buyer", "ReqRespFault at Buyer"));
+        suite.addTest(new BPELToConversationTest("ReqRespFaultProcess_Seller", "ReqRespFault at Seller"));
+        
+        /**
+         * TODO: (SAVARA-150) Commenting out this test for now, as we now need the accompanying WSDL to be able to
+         * resolve the message type's underlying XSD element or type.
+         *
+        suite.addTest(new BPELToConversationTest("LoanApprovalService at Service", "LoanApprovalService at Service"));
+         */
 
         return suite;
     }
@@ -59,9 +68,10 @@
 		 * 
 		 * @param name The test name
 		 */
-		public BPELToConversationTest(String name) {
-			super(name);
-			m_name = name;
+		public BPELToConversationTest(String bpelName, String scvName) {
+			super(bpelName+"->"+scvName);
+			m_bpelName = bpelName;
+			m_scvName = scvName;
 		}
 		
 		/**
@@ -72,7 +82,7 @@
 		public void run(TestResult result) {
 			result.startTest(this);
 			
-			String filename="testmodels/"+m_name+".bpel";
+			String filename="testmodels/"+m_bpelName+".bpel";
 			
 			java.io.InputStream is=
 				ParserTest.class.getResourceAsStream(filename);
@@ -87,7 +97,7 @@
 				org.scribble.model.admin.DefaultModelListener l=
 						new org.scribble.model.admin.DefaultModelListener();
 				
-				org.scribble.model.Model model=p.parse(ref, is, l, null);
+				org.scribble.model.Model model=p.parse(ref, is, l, new ResourceLoaderContext());
 				
 				if (model == null) {
 					result.addError(this, new Throwable("Model is null"));
@@ -152,7 +162,7 @@
 		protected void checkResults(TestResult result, String conv) {
 			boolean f_valid=false;
 
-			String filename="results/"+m_name+".scv";
+			String filename="results/"+m_scvName+".scv";
 			
 			java.io.InputStream is=
 				ParserTest.class.getResourceAsStream(filename);
@@ -184,7 +194,7 @@
 			}
 			
 			if (f_valid == false) {
-				String bpelfile="testmodels/"+m_name+".bpel";
+				String bpelfile="testmodels/"+m_bpelName+".bpel";
 				
 				java.net.URL url=ParserTest.class.getResource(bpelfile);
 				
@@ -216,7 +226,7 @@
 							resultsDir.mkdirs();
 						}
 						
-						java.io.File resultFile=new java.io.File(resultsDir, m_name+".expected");
+						java.io.File resultFile=new java.io.File(resultsDir, m_scvName+".expected");
 						
 						if (resultFile.exists() == false) {
 							try {
@@ -236,12 +246,43 @@
 						}
 					} else {
 						result.addError(this, new Throwable("Unable to obtain URL for BPEL model source '"+
-								m_name+"': "+url));
+								m_bpelName+"': "+url));
 					}
 				}
 			}
 		}
 
-		private String m_name=null;
+		private String m_bpelName=null;
+		private String m_scvName=null;
 	}
+
+	public static class ResourceLoaderContext implements Context {
+
+		public ResourceLoaderContext() {
+		}
+		
+		public InputStream getResource(ModelReference ref, String uri) {
+			String filename="testmodels/"+uri;
+			
+			java.io.InputStream is=
+				ParserTest.class.getResourceAsStream(filename);
+			
+			return(is);
+		}
+
+		public java.net.URI getResourceURI(ModelReference ref, String uri) {
+			String filename="testmodels/"+uri;
+			
+			java.net.URI ret=null;
+			
+			try {
+				ret = ParserTest.class.getResource(filename).toURI();
+			} catch(Exception e) {
+				e.printStackTrace();
+			}
+			
+			return(ret);
+		}
+		
+	}
 }

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,20 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <partnerLinks>
+        <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="spr:BrokerToSupplierTxnProcessorServiceLT"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+        <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+    </variables>
+    <sequence>
+        <pick createInstance="yes">
+            <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmRequestVar">
+                <sequence>
+                    <reply name="Send_bookingReference" operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior" variable="confirmResponseVar"/>
+                </sequence>
+            </onMessage>
+        </pick>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessor.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="confirmRequest">
+        <wsdl:part element="orderConfirmed" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="confirmResponse">
+        <wsdl:part element="bookingReference" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getQuoteResponse">
+        <wsdl:part element="quote" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getQuoteRequest">
+        <wsdl:part element="requestForQuote" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="SupplierBehavior">
+        <wsdl:operation name="confirm">
+            <wsdl:input message="spr:confirmRequest">
+            </wsdl:input>
+            <wsdl:output message="spr:confirmResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <wsdl:input message="spr:getQuoteRequest">
+            </wsdl:input>
+            <wsdl:output message="spr:getQuoteResponse">
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="confirm">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="SupplierService">
+        <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+            <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/CompleteTransaction_SupplierTxnProcessorArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+    <wsdl:import location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <plnk:partnerLinkType name="BrokerToSupplierTxnProcessorServiceLT">
+        <plnk:role name="SupplierTxnProcessorService" portType="ns1:SupplierBehavior"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Broker.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Broker.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Broker.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,65 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="BrokerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <partnerLinks>
-        <partnerLink myRole="BrokerService" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerServiceLT"/>
-        <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="tns:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
-        <partnerLink name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
-        <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="tns:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="enquiry" name="enquiryVar"/>
-        <variable messageType="requestForQuote" name="requestForQuoteVar"/>
-        <variable messageType="quote" name="quoteVar"/>
-        <variable messageType="quoteList" name="quoteListVar"/>
-        <variable messageType="buy" name="buyVar"/>
-        <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
-        <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
-        <variable messageType="orderConfirmed" name="orderConfirmedVar"/>
-        <variable messageType="bookingReference" name="bookingReferenceVar"/>
-        <variable messageType="orderRejected" name="orderRejectedVar"/>
-        <variable messageType="cancel" name="cancelVar"/>
-    </variables>
-    <sequence>
-        <receive createInstance="yes" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="enquiryVar"/>
-        <while>
-            <sequence>
-                <scope>
-                    <sequence>
-                        <invoke inputVariable="requestForQuoteVar" operation="getQuote" outputVariable="quoteVar" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior"/>
-                    </sequence>
-                </scope>
-            </sequence>
-        </while>
-        <reply operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
-        <pick>
-            <onMessage operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="buyVar">
-                <sequence>
-                    <scope>
-                        <sequence>
-                            <scope>
-                                <faultHandlers>
-                                    <catch faultMessageType="CreditCheckInvalid" faultName="invalidCredit" faultVariable="creditCheckInvalidVar">
-                                        <sequence>
-                                            <reply faultName="tns:rejected" operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="orderRejectedVar"/>
-                                        </sequence>
-                                    </catch>
-                                </faultHandlers>
-                                <sequence>
-                                    <invoke inputVariable="creditCheckRequestVar" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior"/>
-                                    <invoke inputVariable="orderConfirmedVar" operation="confirm" outputVariable="bookingReferenceVar" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior"/>
-                                    <reply operation="buy" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="bookingReferenceVar"/>
-                                </sequence>
-                            </scope>
-                        </sequence>
-                    </scope>
-                </sequence>
-            </onMessage>
-            <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="cancelVar">
-                <sequence/>
-            </onMessage>
-        </pick>
-    </sequence>
-</process>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Buyer.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,43 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="BuyerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <partnerLinks>
-        <partnerLink myRole="BuyerRequester" name="BuyerToBroker" partnerLinkType="tns:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="enquiry" name="enquiryVar"/>
-        <variable messageType="quoteList" name="quoteListVar"/>
-        <variable messageType="buy" name="buyVar"/>
-        <variable messageType="bookingReference" name="bookingReferenceVar"/>
-        <variable messageType="cancel" name="cancelVar"/>
-    </variables>
-    <sequence>
-        <invoke inputVariable="enquiryVar" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
-        <receive operation="makeEnquiry" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior" variable="quoteListVar"/>
-        <if>
-            <sequence>
-                <scope>
-                    <sequence>
-                        <scope>
-                            <faultHandlers>
-                                <catch faultMessageType="orderRejected" faultName="rejected" faultVariable="orderRejectedVar">
-                                    <sequence/>
-                                </catch>
-                            </faultHandlers>
-                            <sequence>
-                                <invoke inputVariable="buyVar" operation="buy" outputVariable="bookingReferenceVar" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
-                            </sequence>
-                        </scope>
-                    </sequence>
-                </scope>
-            </sequence>
-            <else>
-                <sequence>
-                    <invoke inputVariable="cancelVar" operation="cancel" partnerLink="BuyerToBroker" portType="tns:BrokerBehavior"/>
-                </sequence>
-            </else>
-        </if>
-    </sequence>
-</process>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at CreditAgency.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at CreditAgency.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,36 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common at CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CreditAgencyPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ESBBroker"/>
-    <partnerLinks>
-        <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="tns:BrokerToCreditAgencyServiceLT"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
-        <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
-        <variable messageType="CreditCheckInvalid" name="creditCheckInvalidVar"/>
-    </variables>
-    <sequence>
-        <pick>
-            <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckRequestVar">
-                <sequence>
-                    <scope>
-                        <sequence>
-                            <if>
-                                <sequence>
-                                    <reply operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckOkVar"/>
-                                </sequence>
-                                <else>
-                                    <sequence>
-                                        <reply faultName="tns:invalidCredit" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckInvalidVar"/>
-                                    </sequence>
-                                </else>
-                            </if>
-                        </sequence>
-                    </scope>
-                </sequence>
-            </onMessage>
-        </pick>
-    </sequence>
-</process>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierQuoteEngine.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierQuoteEngine.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,15 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace=""/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="SupplierQuoteEnginePartnerLinkTypes.wsdl" namespace=""/>
-    <partnerLinks>
-        <partnerLink myRole="SupplierQuoteEngineService" name="BrokerToSupplierQuoteEngine" partnerLinkType="ns1:BrokerToSupplierQuoteEngineServiceLT"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="requestForQuote" name="requestForQuoteVar"/>
-        <variable messageType="quote" name="quoteVar"/>
-    </variables>
-    <sequence>
-        <receive createInstance="yes" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="requestForQuoteVar"/>
-        <reply operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="tns:SupplierBehavior" variable="quoteVar"/>
-    </sequence>
-</process>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierTxnProcessor.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierTxnProcessor.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBroker at SupplierTxnProcessor.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,20 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierTxnProcessor" name="CompleteTransaction_SupplierTxnProcessor" targetNamespace="" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CompleteTransaction_SupplierTxnProcessor.wsdl" namespace=""/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="SupplierTxnProcessorPartnerLinkTypes.wsdl" namespace=""/>
-    <partnerLinks>
-        <partnerLink myRole="SupplierTxnProcessorService" name="BrokerToSupplierTxnProcessor" partnerLinkType="ns2:BrokerToSupplierTxnProcessorServiceLT"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="orderConfirmed" name="orderConfirmedVar"/>
-        <variable messageType="bookingReference" name="bookingReferenceVar"/>
-    </variables>
-    <sequence>
-        <pick createInstance="yes">
-            <onMessage operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="orderConfirmedVar">
-                <sequence>
-                    <reply operation="confirm" partnerLink="BrokerToSupplierTxnProcessor" portType="tns:SupplierBehavior" variable="bookingReferenceVar"/>
-                </sequence>
-            </onMessage>
-        </pick>
-    </sequence>
-</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,66 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Broker" name="ESBBrokerProcess_Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BrokerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <partnerLinks>
+        <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="brk:BuyerToBrokerServiceLT"/>
+        <partnerLink name="BrokerToSupplierQuoteEngine" partnerLinkType="brk:BrokerToSupplierQuoteEngineLT" partnerRole="SupplierQuoteEngineRequester"/>
+        <partnerLink name="BrokerToCreditAgency" partnerLinkType="brk:BrokerToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+        <partnerLink name="BrokerToSupplierTxnProcessor" partnerLinkType="brk:BrokerToSupplierTxnProcessorLT" partnerRole="SupplierTxnProcessorRequester"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+        <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+        <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+        <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+        <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+        <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="spr:confirmRequest" name="confirmRequestVar"/>
+        <variable messageType="spr:confirmResponse" name="confirmResponseVar"/>
+        <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+        <variable messageType="brk:rejectedFault" name="rejectedFaultVar"/>
+        <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+    </variables>
+    <sequence>
+        <receive createInstance="yes" name="Receive_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryRequestVar"/>
+        <while>
+            <sequence>
+                <scope>
+                    <sequence>
+                        <invoke inputVariable="getQuoteRequestVar" name="Send_requestForQuote" operation="getQuote" outputVariable="getQuoteResponseVar" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior"/>
+                    </sequence>
+                </scope>
+            </sequence>
+        </while>
+        <reply name="Send_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+        <pick>
+            <onMessage operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyRequestVar">
+                <sequence>
+                    <scope>
+                        <sequence>
+                            <scope>
+                                <faultHandlers>
+                                    <catch faultMessageType="cay:invalidCreditFault" faultName="cay:invalidCredit" faultVariable="invalidCreditFaultVar">
+                                        <sequence>
+                                            <reply faultName="brk:rejected" name="Send_orderRejected" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="rejectedFaultVar"/>
+                                        </sequence>
+                                    </catch>
+                                </faultHandlers>
+                                <sequence>
+                                    <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior"/>
+                                    <invoke inputVariable="confirmRequestVar" name="Send_orderConfirmed" operation="confirm" outputVariable="confirmResponseVar" partnerLink="BrokerToSupplierTxnProcessor" portType="spr:SupplierBehavior"/>
+                                    <reply name="Send_bookingReference" operation="buy" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="buyResponseVar"/>
+                                </sequence>
+                            </scope>
+                        </sequence>
+                    </scope>
+                </sequence>
+            </onMessage>
+            <onMessage operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="cancelRequestVar">
+                <sequence/>
+            </onMessage>
+        </pick>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Broker.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Broker" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="rejectedFault">
+        <wsdl:part element="orderRejected" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="makeEnquiryRequest">
+        <wsdl:part element="enquiry" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="buyResponse">
+        <wsdl:part element="bookingReference" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="makeEnquiryResponse">
+        <wsdl:part element="quoteList" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="buyRequest">
+        <wsdl:part element="buy" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="cancelRequest">
+        <wsdl:part element="cancel" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="BrokerBehavior">
+        <wsdl:operation name="buy">
+            <wsdl:input message="brk:buyRequest">
+            </wsdl:input>
+            <wsdl:output message="brk:buyResponse">
+            </wsdl:output>
+            <wsdl:fault message="brk:rejectedFault" name="rejected">
+            </wsdl:fault>
+        </wsdl:operation>
+        <wsdl:operation name="makeEnquiry">
+            <wsdl:input message="brk:makeEnquiryRequest">
+            </wsdl:input>
+            <wsdl:output message="brk:makeEnquiryResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="cancel">
+            <wsdl:input message="brk:cancelRequest">
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="BrokerBehaviorBinding" type="brk:BrokerBehavior">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="buy">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/buy"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="rejected">
+                <soap:fault name="rejected" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+        <wsdl:operation name="makeEnquiry">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/makeEnquiry"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="cancel">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Broker/cancel"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="BrokerService">
+        <wsdl:port binding="brk:BrokerBehaviorBinding" name="BrokerBehaviorPort">
+            <soap:address location="http://localhost:8080/BrokerService/BrokerBehaviorPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BrokerArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Broker" xmlns:ns2="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:ns3="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Broker">
+    <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <plnk:partnerLinkType name="BuyerToBrokerServiceLT">
+        <plnk:role name="BrokerBehavior" portType="ns1:BrokerBehavior"/>
+    </plnk:partnerLinkType>
+    <plnk:partnerLinkType name="BrokerToSupplierQuoteEngineLT">
+        <plnk:role name="SupplierQuoteEngineRequester" portType="ns2:SupplierBehavior"/>
+    </plnk:partnerLinkType>
+    <plnk:partnerLinkType name="BrokerToCreditAgencyLT">
+        <plnk:role name="CreditAgencyRequester" portType="ns3:CreditAgencyBehavior"/>
+    </plnk:partnerLinkType>
+    <plnk:partnerLinkType name="BrokerToSupplierTxnProcessorLT">
+        <plnk:role name="SupplierTxnProcessorRequester" portType="ns2:SupplierBehavior"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,43 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ESBBrokerProcess_Buyer" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
+    <partnerLinks>
+        <partnerLink myRole="BrokerBehavior" name="BuyerToBroker" partnerLinkType="byr:BuyerToBrokerLT" partnerRole="BrokerRequester"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="brk:makeEnquiryRequest" name="makeEnquiryRequestVar"/>
+        <variable messageType="brk:makeEnquiryResponse" name="makeEnquiryResponseVar"/>
+        <variable messageType="brk:buyRequest" name="buyRequestVar"/>
+        <variable messageType="brk:buyResponse" name="buyResponseVar"/>
+        <variable messageType="brk:cancelRequest" name="cancelRequestVar"/>
+    </variables>
+    <sequence>
+        <invoke inputVariable="makeEnquiryRequestVar" name="Send_enquiry" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+        <receive name="Receive_quoteList" operation="makeEnquiry" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior" variable="makeEnquiryResponseVar"/>
+        <if>
+            <sequence>
+                <scope>
+                    <sequence>
+                        <scope>
+                            <faultHandlers>
+                                <catch faultMessageType="brk:rejectedFault" faultName="brk:rejected" faultVariable="rejectedFaultVar">
+                                    <sequence/>
+                                </catch>
+                            </faultHandlers>
+                            <sequence>
+                                <invoke inputVariable="buyRequestVar" name="Send_buy" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+                            </sequence>
+                        </scope>
+                    </sequence>
+                </scope>
+            </sequence>
+            <else>
+                <sequence>
+                    <invoke inputVariable="cancelRequestVar" name="Send_cancel" operation="cancel" partnerLink="BuyerToBroker" portType="brk:BrokerBehavior"/>
+                </sequence>
+            </else>
+        </if>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_BuyerArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Broker" xmlns:ns2="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Buyer">
+    <wsdl:import location="ESBBrokerProcess_Buyer.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Buyer"/>
+    <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <plnk:partnerLinkType name="BuyerToBrokerLT">
+        <plnk:role name="BrokerRequester" portType="ns1:BrokerBehavior"/>
+        <plnk:role name="BrokerBehavior" portType="ns2:BuyerBehavior"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,36 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common at CreditAgency" name="ESBBrokerProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ESBBrokerProcess_CreditAgencyArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <partnerLinks>
+        <partnerLink myRole="CreditAgencyService" name="BrokerToCreditAgency" partnerLinkType="cay:BrokerToCreditAgencyServiceLT"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="cay:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="cay:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="cay:invalidCreditFault" name="invalidCreditFaultVar"/>
+    </variables>
+    <sequence>
+        <pick>
+            <onMessage operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditRequestVar">
+                <sequence>
+                    <scope>
+                        <sequence>
+                            <if>
+                                <sequence>
+                                    <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="checkCreditResponseVar"/>
+                                </sequence>
+                                <else>
+                                    <sequence>
+                                        <reply faultName="cay:invalidCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BrokerToCreditAgency" portType="cay:CreditAgencyBehavior" variable="invalidCreditFaultVar"/>
+                                    </sequence>
+                                </else>
+                            </if>
+                        </sequence>
+                    </scope>
+                </sequence>
+            </onMessage>
+        </pick>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgency.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreditAgency" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="checkCreditResponse">
+        <wsdl:part element="CreditCheckOk" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="checkCreditRequest">
+        <wsdl:part element="CreditCheckRequest" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="invalidCreditFault">
+        <wsdl:part element="CreditCheckInvalid" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="CreditAgencyBehavior">
+        <wsdl:operation name="checkCredit">
+            <wsdl:input message="cay:checkCreditRequest">
+            </wsdl:input>
+            <wsdl:output message="cay:checkCreditResponse">
+            </wsdl:output>
+            <wsdl:fault message="cay:invalidCreditFault" name="invalidCredit">
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="CreditAgencyBehaviorBinding" type="cay:CreditAgencyBehavior">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="checkCredit">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/CreditAgency/checkCredit"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="invalidCredit">
+                <soap:fault name="invalidCredit" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="CreditAgencyService">
+        <wsdl:port binding="cay:CreditAgencyBehaviorBinding" name="CreditAgencyBehaviorPort">
+            <soap:address location="http://localhost:8080/CreditAgencyService/CreditAgencyBehaviorPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_CreditAgencyArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/CreditAgency">
+    <wsdl:import location="ESBBrokerProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/ESBBroker/CreditAgency"/>
+    <wsdl:import location="ESBBrokerProcess_Broker.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Broker"/>
+    <wsdl:import location="ESBBrokerProcess_Supplier.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <plnk:partnerLinkType name="BrokerToCreditAgencyServiceLT">
+        <plnk:role name="CreditAgencyService" portType="ns1:CreditAgencyBehavior"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ESBBrokerProcess_Supplier.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="confirmRequest">
+        <wsdl:part element="orderConfirmed" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="confirmResponse">
+        <wsdl:part element="bookingReference" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getQuoteResponse">
+        <wsdl:part element="quote" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getQuoteRequest">
+        <wsdl:part element="requestForQuote" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="SupplierBehavior">
+        <wsdl:operation name="confirm">
+            <wsdl:input message="spr:confirmRequest">
+            </wsdl:input>
+            <wsdl:output message="spr:confirmResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <wsdl:input message="spr:getQuoteRequest">
+            </wsdl:input>
+            <wsdl:output message="spr:getQuoteResponse">
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="confirm">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="SupplierService">
+        <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+            <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Buyer.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,24 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:com.acme.purchasing" xmlns:tns="http://www.pi4soa.org/purchase" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Purchasing at Buyer" name="PurchaseGoodsProcess_Buyer" targetNamespace="http://www.pi4soa.org/purchase" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="BuyerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <partnerLinks>
-        <partnerLink name="BuyerToStore" partnerLinkType="tns:BuyerToStoreLT" partnerRole="StoreRequester"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="BuyRequest" name="buyRequestVar"/>
-        <variable messageType="BuyConfirmed" name="buyConfirmedVar"/>
-    </variables>
-    <sequence>
-        <scope>
-            <faultHandlers>
-                <catch faultMessageType="BuyFailed" faultName="BuyFailed" faultVariable="buyFailedVar">
-                    <sequence/>
-                </catch>
-            </faultHandlers>
-            <sequence>
-                <invoke inputVariable="buyRequestVar" operation="buy" outputVariable="buyConfirmedVar" partnerLink="BuyerToStore" portType="tns:StoreBehavior"/>
-            </sequence>
-        </scope>
-    </sequence>
-</process>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at CreditAgency.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at CreditAgency.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,26 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:com.acme.purchasing" xmlns:tns="http://www.pi4soa.org/purchase" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Common at CreditAgency" name="PurchaseGoodsProcess_CreditAgency" targetNamespace="http://www.pi4soa.org/purchase" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="CreditAgencyPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <partnerLinks>
-        <partnerLink myRole="CreditAgencyService" name="StoreToCreditAgency" partnerLinkType="tns:StoreToCreditAgencyServiceLT"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
-        <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
-        <variable messageType="CreditCheckInvalid" name="creditCheckInvalidVar"/>
-    </variables>
-    <sequence>
-        <receive createInstance="yes" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckRequestVar"/>
-        <if>
-            <sequence>
-                <reply operation="checkCredit" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckOkVar"/>
-            </sequence>
-            <else>
-                <sequence>
-                    <reply faultName="tns:CreditCheckFailed" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior" variable="creditCheckInvalidVar"/>
-                </sequence>
-            </else>
-        </if>
-    </sequence>
-</process>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Store.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Store.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoods at Store.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,32 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:com.acme.purchasing" xmlns:tns="http://www.pi4soa.org/purchase" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.Purchasing at Store" name="PurchaseGoodsProcess_Store" targetNamespace="http://www.pi4soa.org/purchase" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="StorePartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/purchase"/>
-    <partnerLinks>
-        <partnerLink myRole="StoreService" name="BuyerToStore" partnerLinkType="tns:BuyerToStoreServiceLT"/>
-        <partnerLink name="StoreToCreditAgency" partnerLinkType="tns:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="BuyRequest" name="buyRequestVar"/>
-        <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
-        <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
-        <variable messageType="BuyConfirmed" name="buyConfirmedVar"/>
-        <variable messageType="BuyFailed" name="buyFailedVar"/>
-    </variables>
-    <sequence>
-        <receive createInstance="yes" operation="buy" partnerLink="BuyerToStore" portType="tns:StoreBehavior" variable="buyRequestVar"/>
-        <scope>
-            <faultHandlers>
-                <catch faultMessageType="CreditCheckInvalid" faultName="CreditCheckFailed" faultVariable="creditCheckInvalidVar">
-                    <sequence>
-                        <reply faultName="tns:BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="tns:StoreBehavior" variable="buyFailedVar"/>
-                    </sequence>
-                </catch>
-            </faultHandlers>
-            <sequence>
-                <invoke inputVariable="creditCheckRequestVar" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="StoreToCreditAgency" portType="tns:CreditAgencyBehavior"/>
-                <reply operation="buy" partnerLink="BuyerToStore" portType="tns:StoreBehavior" variable="buyConfirmedVar"/>
-            </sequence>
-        </scope>
-    </sequence>
-</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,24 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing at Buyer" name="PurchaseGoodsProcess_Buyer" targetNamespace="http://www.jboss.org/savara/examples" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_BuyerArtifacts.wsdl" namespace="http://www.jboss.org/savara/examples"/>
+    <partnerLinks>
+        <partnerLink name="BuyerToStore" partnerLinkType="tns:BuyerToStoreLT" partnerRole="StoreRequester"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+        <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+    </variables>
+    <sequence>
+        <scope>
+            <faultHandlers>
+                <catch faultMessageType="sto:BuyFailedFault" faultName="sto:BuyFailed" faultVariable="BuyFailedFaultVar">
+                    <sequence/>
+                </catch>
+            </faultHandlers>
+            <sequence>
+                <invoke inputVariable="buyRequestVar" name="Send_BuyRequest" operation="buy" outputVariable="buyResponseVar" partnerLink="BuyerToStore" portType="sto:StoreInterface"/>
+            </sequence>
+        </scope>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_BuyerArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.jboss.org/examples/store" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.jboss.org/savara/examples">
+    <wsdl:import location="PurchaseGoodsProcess_Buyer.wsdl" namespace="http://www.jboss.org/savara/examples"/>
+    <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+    <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+    <plnk:partnerLinkType name="BuyerToStoreLT">
+        <plnk:role name="StoreRequester" portType="ns1:StoreInterface"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,26 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Common at CreditAgency" name="PurchaseGoodsProcess_CreditAgency" targetNamespace="java:org.jboss.savara.examples.purchasing" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+    <partnerLinks>
+        <partnerLink myRole="CreditAgencyInterface" name="StoreToCreditAgency" partnerLinkType="pur:StoreToCreditAgencyServiceLT"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="pur:CreditCheckFailedFault" name="CreditCheckFailedFaultVar"/>
+    </variables>
+    <sequence>
+        <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditRequestVar"/>
+        <if>
+            <sequence>
+                <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="checkCreditResponseVar"/>
+            </sequence>
+            <else>
+                <sequence>
+                    <reply faultName="pur:CreditCheckFailed" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface" variable="CreditCheckFailedFaultVar"/>
+                </sequence>
+            </else>
+        </if>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgency.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CreditAgency" targetNamespace="java:org.jboss.savara.examples.purchasing">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="checkCreditRequest">
+        <wsdl:part name="content" type="pur:CreditCheckRequest">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="CreditCheckFailedFault">
+        <wsdl:part name="content" type="pur:CreditCheckInvalid">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="checkCreditResponse">
+        <wsdl:part name="content" type="pur:CreditCheckOk">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="CreditAgencyInterface">
+        <wsdl:operation name="checkCredit">
+            <wsdl:input message="pur:checkCreditRequest">
+            </wsdl:input>
+            <wsdl:output message="pur:checkCreditResponse">
+            </wsdl:output>
+            <wsdl:fault message="pur:CreditCheckFailedFault" name="CreditCheckFailed">
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="CreditAgencyInterfaceBinding" type="pur:CreditAgencyInterface">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="checkCredit">
+            <soap:operation soapAction="java:org.jboss.savara.examples.purchasing/checkCredit"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="CreditCheckFailed">
+                <soap:fault name="CreditCheckFailed" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="CreditAgencyService">
+        <wsdl:port binding="pur:CreditAgencyInterfaceBinding" name="CreditAgencyInterfacePort">
+            <soap:address location="http://localhost:8080/CreditAgencyService/CreditAgencyInterfacePort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_CreditAgencyArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="java:org.jboss.savara.examples.purchasing" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="java:org.jboss.savara.examples.purchasing">
+    <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+    <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+    <plnk:partnerLinkType name="StoreToCreditAgencyServiceLT">
+        <plnk:role name="CreditAgencyInterface" portType="ns1:CreditAgencyInterface"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,32 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="savara.samples.Purchasing at Store" name="PurchaseGoodsProcess_Store" targetNamespace="http://www.jboss.org/examples/store" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="PurchaseGoodsProcess_StoreArtifacts.wsdl" namespace="http://www.jboss.org/examples/store"/>
+    <partnerLinks>
+        <partnerLink myRole="StoreInterface" name="BuyerToStore" partnerLinkType="sto:BuyerToStoreServiceLT"/>
+        <partnerLink name="StoreToCreditAgency" partnerLinkType="sto:StoreToCreditAgencyLT" partnerRole="CreditAgencyRequester"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="sto:buyRequest" name="buyRequestVar"/>
+        <variable messageType="pur:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="pur:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="sto:buyResponse" name="buyResponseVar"/>
+        <variable messageType="sto:BuyFailedFault" name="BuyFailedFaultVar"/>
+    </variables>
+    <sequence>
+        <receive createInstance="yes" name="Receive_BuyRequest" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyRequestVar"/>
+        <scope>
+            <faultHandlers>
+                <catch faultMessageType="pur:CreditCheckFailedFault" faultName="pur:CreditCheckFailed" faultVariable="CreditCheckFailedFaultVar">
+                    <sequence>
+                        <reply faultName="sto:BuyFailed" name="Send_BuyFailed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="BuyFailedFaultVar"/>
+                    </sequence>
+                </catch>
+            </faultHandlers>
+            <sequence>
+                <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="StoreToCreditAgency" portType="pur:CreditAgencyInterface"/>
+                <reply name="Send_BuyConfirmed" operation="buy" partnerLink="BuyerToStore" portType="sto:StoreInterface" variable="buyResponseVar"/>
+            </sequence>
+        </scope>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_Store.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:pur="java:org.jboss.savara.examples.purchasing" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:sto="http://www.jboss.org/examples/store" xmlns:tns="http://www.jboss.org/savara/examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Store" targetNamespace="http://www.jboss.org/examples/store">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="BuyFailedFault">
+        <wsdl:part name="content" type="sto:BuyFailed">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="buyRequest">
+        <wsdl:part name="content" type="sto:BuyRequest">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="buyResponse">
+        <wsdl:part name="content" type="sto:BuyConfirmed">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="StoreInterface">
+        <wsdl:operation name="buy">
+            <wsdl:input message="sto:buyRequest">
+            </wsdl:input>
+            <wsdl:output message="sto:buyResponse">
+            </wsdl:output>
+            <wsdl:fault message="sto:BuyFailedFault" name="BuyFailed">
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="StoreInterfaceBinding" type="sto:StoreInterface">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="buy">
+            <soap:operation soapAction="http://www.jboss.org/examples/store/buy"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="BuyFailed">
+                <soap:fault name="BuyFailed" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="StoreService">
+        <wsdl:port binding="sto:StoreInterfaceBinding" name="StoreInterfacePort">
+            <soap:address location="http://localhost:8080/StoreService/StoreInterfacePort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/PurchaseGoodsProcess_StoreArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.jboss.org/examples/store" xmlns:ns2="java:org.jboss.savara.examples.purchasing" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.jboss.org/examples/store">
+    <wsdl:import location="PurchaseGoodsProcess_Store.wsdl" namespace="http://www.jboss.org/examples/store"/>
+    <wsdl:import location="PurchaseGoodsProcess_CreditAgency.wsdl" namespace="java:org.jboss.savara.examples.purchasing"/>
+    <plnk:partnerLinkType name="BuyerToStoreServiceLT">
+        <plnk:role name="StoreInterface" portType="ns1:StoreInterface"/>
+    </plnk:partnerLinkType>
+    <plnk:partnerLinkType name="StoreToCreditAgencyLT">
+        <plnk:role name="CreditAgencyRequester" portType="ns2:CreditAgencyInterface"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Buyer.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,23 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="BuyerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
-    <partnerLinks>
-        <partnerLink name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerLT" partnerRole="SellerRequester"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
-        <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
-    </variables>
-    <sequence>
-        <scope>
-            <faultHandlers>
-                <catch faultMessageType="CreditCheckInvalid" faultName="insufficientCredit" faultVariable="creditCheckInvalidVar">
-                    <sequence/>
-                </catch>
-            </faultHandlers>
-            <sequence>
-                <invoke inputVariable="creditCheckRequestVar" operation="checkCredit" outputVariable="creditCheckOkVar" partnerLink="BuyerToSeller" portType="tns:SellerBehavior"/>
-            </sequence>
-        </scope>
-    </sequence>
-</process>

Deleted: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Seller.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Seller.bpel	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFault at Seller.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -1,25 +0,0 @@
-<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess at Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
-    <import importType="http://schemas.xmlsoap.org/wsdl/" location="SellerPartnerLinkTypes.wsdl" namespace="http://www.pi4soa.org/ReqRespFault"/>
-    <partnerLinks>
-        <partnerLink myRole="SellerService" name="BuyerToSeller" partnerLinkType="tns:BuyerToSellerServiceLT"/>
-    </partnerLinks>
-    <variables>
-        <variable messageType="CreditCheckRequest" name="creditCheckRequestVar"/>
-        <variable messageType="CreditCheckOk" name="creditCheckOkVar"/>
-        <variable messageType="CreditCheckInvalid" name="creditCheckInvalidVar"/>
-    </variables>
-    <sequence>
-        <receive createInstance="yes" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckRequestVar"/>
-        <if>
-            <sequence>
-                <reply operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckOkVar"/>
-            </sequence>
-            <else>
-                <sequence>
-                    <reply faultName="tns:insufficientCredit" operation="checkCredit" partnerLink="BuyerToSeller" portType="tns:SellerBehavior" variable="creditCheckInvalidVar"/>
-                </sequence>
-            </else>
-        </if>
-    </sequence>
-</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Buyer.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,23 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at Buyer" name="ReqRespFaultProcess_Buyer" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_BuyerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+    <partnerLinks>
+        <partnerLink name="BuyerToSeller" partnerLinkType="byr:BuyerToSellerLT" partnerRole="SellerRequester"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+    </variables>
+    <sequence>
+        <scope>
+            <faultHandlers>
+                <catch faultMessageType="slr:insufficientCreditFault" faultName="slr:insufficientCredit" faultVariable="insufficientCreditFaultVar">
+                    <sequence/>
+                </catch>
+            </faultHandlers>
+            <sequence>
+                <invoke inputVariable="checkCreditRequestVar" name="Send_CreditCheckRequest" operation="checkCredit" outputVariable="checkCreditResponseVar" partnerLink="BuyerToSeller" portType="slr:SellerBehavior"/>
+            </sequence>
+        </scope>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_BuyerArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ReqRespFault/Buyer">
+    <wsdl:import location="ReqRespFaultProcess_Buyer.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Buyer"/>
+    <wsdl:import location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <plnk:partnerLinkType name="BuyerToSellerLT">
+        <plnk:role name="SellerRequester" portType="ns1:SellerBehavior"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,25 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.reqrespfault.reqrespfault.ReqRespFaultProcess at Seller" name="ReqRespFaultProcess_Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="ReqRespFaultProcess_SellerArtifacts.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <partnerLinks>
+        <partnerLink myRole="SellerBehavior" name="BuyerToSeller" partnerLinkType="slr:BuyerToSellerServiceLT"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="slr:checkCreditRequest" name="checkCreditRequestVar"/>
+        <variable messageType="slr:checkCreditResponse" name="checkCreditResponseVar"/>
+        <variable messageType="slr:insufficientCreditFault" name="insufficientCreditFaultVar"/>
+    </variables>
+    <sequence>
+        <receive createInstance="yes" name="Receive_CreditCheckRequest" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditRequestVar"/>
+        <if>
+            <sequence>
+                <reply name="Send_CreditCheckOk" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="checkCreditResponseVar"/>
+            </sequence>
+            <else>
+                <sequence>
+                    <reply faultName="slr:insufficientCredit" name="Send_CreditCheckInvalid" operation="checkCredit" partnerLink="BuyerToSeller" portType="slr:SellerBehavior" variable="insufficientCreditFaultVar"/>
+                </sequence>
+            </else>
+        </if>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_Seller.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:byr="http://www.pi4soa.org/ReqRespFault/Buyer" xmlns:slr="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.pi4soa.org/ReqRespFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Seller" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="checkCreditRequest">
+        <wsdl:part element="CreditCheckRequest" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="checkCreditResponse">
+        <wsdl:part element="CreditCheckOk" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="insufficientCreditFault">
+        <wsdl:part element="CreditCheckInvalid" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="SellerBehavior">
+        <wsdl:operation name="checkCredit">
+            <wsdl:input message="slr:checkCreditRequest">
+            </wsdl:input>
+            <wsdl:output message="slr:checkCreditResponse">
+            </wsdl:output>
+            <wsdl:fault message="slr:insufficientCreditFault" name="insufficientCredit">
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="SellerBehaviorBinding" type="slr:SellerBehavior">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="checkCredit">
+            <soap:operation soapAction="http://www.pi4soa.org/ReqRespFault/Seller/checkCredit"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="insufficientCredit">
+                <soap:fault name="insufficientCredit" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="SellerService">
+        <wsdl:port binding="slr:SellerBehaviorBinding" name="SellerBehaviorPort">
+            <soap:address location="http://localhost:8080/SellerService/SellerBehaviorPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/ReqRespFaultProcess_SellerArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ReqRespFault/Seller" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ReqRespFault/Seller">
+    <wsdl:import location="ReqRespFaultProcess_Seller.wsdl" namespace="http://www.pi4soa.org/ReqRespFault/Seller"/>
+    <plnk:partnerLinkType name="BuyerToSellerServiceLT">
+        <plnk:role name="SellerBehavior" portType="ns1:SellerBehavior"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.bpel	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,15 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="overlord.cdl.samples.LoanBroker at SupplierQuoteEngine" name="RequestForQuote_SupplierQuoteEngine" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <import importType="http://schemas.xmlsoap.org/wsdl/" location="RequestForQuote_SupplierQuoteEngineArtifacts.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <partnerLinks>
+        <partnerLink myRole="SupplierBehavior" name="BrokerToSupplierQuoteEngine" partnerLinkType="spr:BrokerToSupplierQuoteEngineServiceLT"/>
+    </partnerLinks>
+    <variables>
+        <variable messageType="spr:getQuoteRequest" name="getQuoteRequestVar"/>
+        <variable messageType="spr:getQuoteResponse" name="getQuoteResponseVar"/>
+    </variables>
+    <sequence>
+        <receive createInstance="yes" name="Receive_requestForQuote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteRequestVar"/>
+        <reply name="Send_quote" operation="getQuote" partnerLink="BrokerToSupplierQuoteEngine" portType="spr:SupplierBehavior" variable="getQuoteResponseVar"/>
+    </sequence>
+</process>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngine.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:brk="http://www.pi4soa.org/ESBBroker/Broker" xmlns:byr="http://www.pi4soa.org/ESBBroker/Buyer" xmlns:cay="http://www.pi4soa.org/ESBBroker/CreditAgency" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:spr="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:tns="http://www.pi4soa.org/ESBBroker" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Supplier" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+    <types xmlns="http://schemas.xmlsoap.org/wsdl/">
+        <schema xmlns="http://www.w3.org/2001/XMLSchema"/>
+    </types>
+    <wsdl:message name="confirmRequest">
+        <wsdl:part element="orderConfirmed" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="confirmResponse">
+        <wsdl:part element="bookingReference" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getQuoteResponse">
+        <wsdl:part element="quote" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getQuoteRequest">
+        <wsdl:part element="requestForQuote" name="content">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="SupplierBehavior">
+        <wsdl:operation name="confirm">
+            <wsdl:input message="spr:confirmRequest">
+            </wsdl:input>
+            <wsdl:output message="spr:confirmResponse">
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <wsdl:input message="spr:getQuoteRequest">
+            </wsdl:input>
+            <wsdl:output message="spr:getQuoteResponse">
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="SupplierBehaviorBinding" type="spr:SupplierBehavior">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="confirm">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/confirm"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getQuote">
+            <soap:operation soapAction="http://www.pi4soa.org/ESBBroker/Supplier/getQuote"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="SupplierService">
+        <wsdl:port binding="spr:SupplierBehaviorBinding" name="SupplierBehaviorPort">
+            <soap:address location="http://localhost:8080/SupplierService/SupplierBehaviorPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>

Added: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl	                        (rev 0)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/plugintest/org/jboss/savara/tools/bpel/parser/testmodels/RequestForQuote_SupplierQuoteEngineArtifacts.wsdl	2010-11-12 12:21:09 UTC (rev 464)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://www.pi4soa.org/ESBBroker/Supplier" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" targetNamespace="http://www.pi4soa.org/ESBBroker/Supplier">
+    <wsdl:import location="RequestForQuote_SupplierQuoteEngine.wsdl" namespace="http://www.pi4soa.org/ESBBroker/Supplier"/>
+    <plnk:partnerLinkType name="BrokerToSupplierQuoteEngineServiceLT">
+        <plnk:role name="SupplierBehavior" portType="ns1:SupplierBehavior"/>
+    </plnk:partnerLinkType>
+</wsdl:definitions>

Modified: trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java
===================================================================
--- trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java	2010-11-12 11:59:39 UTC (rev 463)
+++ trunk/tools/plugins/org.jboss.savara.tools.bpel/src/test/org/jboss/savara/tools/bpel/model/change/ModelChangeUtilsTest.java	2010-11-12 12:21:09 UTC (rev 464)
@@ -18,6 +18,7 @@
 package org.jboss.savara.tools.bpel.model.change;
 
 import org.scribble.conversation.model.Conversation;
+import org.scribble.conversation.model.Run;
 import org.scribble.model.*;
 import org.scribble.model.change.DefaultModelChangeContext;
 import org.scribble.model.change.ModelChangeContext;
@@ -28,7 +29,9 @@
 public class ModelChangeUtilsTest extends TestCase {
 
 	private static final String MY_ROLE = "MyRole";
+	private static final String MY_LOCATED_ROLE = "MyLocatedRole";
 	private static final String MY_OTHER_ROLE = "MyOtherRole";
+	private static final String MY_OTHER_LOCATED_ROLE = "MyOtherLocatedRole";
 
 	public void testInitialiseContracts() {
 		ModelChangeContext context=new DefaultModelChangeContext(null, null);
@@ -44,7 +47,7 @@
 		ln.setRole(r);
 		conv.setLocatedName(ln);
 		
-		ModelChangeUtils.addContracts(context, conv);
+		ModelChangeUtils.addContracts(context, conv, true);
 		
 		Contract c2=ModelChangeUtils.getContract(context, MY_ROLE);
 		
@@ -71,7 +74,7 @@
 		ln.setRole(r);
 		conv.setLocatedName(ln);
 		
-		ModelChangeUtils.addContracts(context, conv);
+		ModelChangeUtils.addContracts(context, conv, true);
 		
 		Conversation conv2=new Conversation();
 		LocatedName ln2=new LocatedName();
@@ -84,7 +87,7 @@
 		ln2.setRole(r2);
 		conv2.setLocatedName(ln2);
 		
-		ModelChangeUtils.addContracts(context, conv2);
+		ModelChangeUtils.addContracts(context, conv2, true);
 		
 		Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
 		
@@ -112,38 +115,71 @@
 		
 		Conversation conv=new Conversation();
 		LocatedName ln=new LocatedName();
-		Role r=new Role();
-		r.setName(MY_ROLE);
+		Role r1=new Role();
+		r1.setName(MY_LOCATED_ROLE);
+		ln.setRole(r1);
+		conv.setLocatedName(ln);
 		
-		Contract c=new Contract();
-		r.getAnnotations().put(Contract.class.getName(), c);
+		Contract c1=new Contract();
+		r1.getAnnotations().put(Contract.class.getName(), c1);
 		
-		ln.setRole(r);
-		conv.setLocatedName(ln);
+		Role r2=new Role();
+		r2.setName(MY_ROLE);
 		
-		ModelChangeUtils.addContracts(context, conv);
+		Contract c2=new Contract();
+		r2.getAnnotations().put(Contract.class.getName(), c2);
+				
+		RoleList rl=new RoleList();
+		rl.getRoles().add(r2);
+		conv.getBlock().getContents().add(rl);
+		
+		ModelChangeUtils.addContracts(context, conv, true);
 
-		java.util.List<DeclarationBinding> bindings=new java.util.Vector<DeclarationBinding>();
+		Conversation subconv=new Conversation();
+		LocatedName subln=new LocatedName();
+		Role subr1=new Role();
+		subr1.setName(MY_OTHER_LOCATED_ROLE);
+		subln.setRole(subr1);
+		subconv.setLocatedName(subln);
 		
+		Run run=new Run();
+		conv.getBlock().getContents().add(run);
+		run.setInlineDefinition(subconv);
+		
 		DeclarationBinding db=new DeclarationBinding();
-		db.setDeclaration(r);
+		db.setDeclaration(r2);
 		db.setBoundName(MY_OTHER_ROLE);
-		bindings.add(db);
+		run.getBindings().add(db);
 		
-		ModelChangeUtils.pushRoleContractMapping(context, bindings);
+		ModelChangeUtils.pushRoleContractMapping(context, run);
 		
-		Contract c2=ModelChangeUtils.getContract(context, MY_ROLE);
-		Contract c3=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
+		Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
+		Contract c4=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
 		
-		if (c2 != null) {
+		if (c3 != null) {
 			fail("Contract for "+MY_ROLE+" should be null");
 		}
 		
-		if (c3 == null) {
+		if (c4 == null) {
 			fail("Contract for "+MY_OTHER_ROLE+" should NOT be null");
 		}
 		
-		if (c3 != c) {
+		Contract c5=ModelChangeUtils.getContract(context, MY_LOCATED_ROLE);
+		Contract c6=ModelChangeUtils.getContract(context, MY_OTHER_LOCATED_ROLE);
+		
+		if (c5 != null) {
+			fail("Contract for "+MY_LOCATED_ROLE+" should be null");
+		}
+		
+		if (c6 == null) {
+			fail("Contract for "+MY_OTHER_LOCATED_ROLE+" should NOT be null");
+		}
+		
+		if (c6 != c1) {
+			fail("Located role's Contract not the same as the one stored");
+		}
+		
+		if (c4 != c2) {
 			fail("Contract not the same as the one stored");
 		}
 	}
@@ -153,39 +189,83 @@
 		
 		Conversation conv=new Conversation();
 		LocatedName ln=new LocatedName();
-		Role r=new Role();
-		r.setName(MY_ROLE);
+		Role r1=new Role();
+		r1.setName(MY_LOCATED_ROLE);
 		
-		Contract c=new Contract();
-		r.getAnnotations().put(Contract.class.getName(), c);
-		
-		ln.setRole(r);
+		ln.setRole(r1);
 		conv.setLocatedName(ln);
 		
-		ModelChangeUtils.addContracts(context, conv);
+		Role r2=new Role();
+		r2.setName(MY_ROLE);
+		
+		RoleList rl=new RoleList();
+		rl.getRoles().add(r2);
+		conv.getBlock().getContents().add(rl);
+		
+		Conversation subconv=new Conversation();
+		LocatedName subln=new LocatedName();
+		Role subr1=new Role();
+		subr1.setName(MY_OTHER_LOCATED_ROLE);
+		subln.setRole(subr1);
+		subconv.setLocatedName(subln);
+		
+		Contract c1=new Contract();
+		subr1.getAnnotations().put(Contract.class.getName(), c1);
+		
+		Role r3=new Role();
+		r3.setName(MY_OTHER_ROLE);
+		
+		Contract c2=new Contract();
+		r3.getAnnotations().put(Contract.class.getName(), c2);
 
-		java.util.List<DeclarationBinding> bindings=new java.util.Vector<DeclarationBinding>();
+		RoleList rl2=new RoleList();
+		rl2.getRoles().add(r3);
+		subconv.getBlock().getContents().add(rl2);
 		
+		// Add contracts for subconv as if root, as normally
+		// this would be done by pushing the contracts, so this
+		// is just being used to setup the appropriate context
+		ModelChangeUtils.addContracts(context, subconv, true);
+
+		Run run=new Run();
+		conv.getBlock().getContents().add(run);
+		run.setInlineDefinition(subconv);
+		
 		DeclarationBinding db=new DeclarationBinding();
-		db.setDeclaration(r);
+		db.setDeclaration(r2);
 		db.setBoundName(MY_OTHER_ROLE);
-		bindings.add(db);
+		run.getBindings().add(db);
 		
-		ModelChangeUtils.popRoleContractMapping(context, bindings);
+		ModelChangeUtils.popRoleContractMapping(context, run);
 		
-		Contract c2=ModelChangeUtils.getContract(context, MY_ROLE);
-		Contract c3=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
+		Contract c3=ModelChangeUtils.getContract(context, MY_ROLE);
+		Contract c4=ModelChangeUtils.getContract(context, MY_OTHER_ROLE);
 		
-		if (c2 == null) {
+		if (c3 == null) {
 			fail("Contract for "+MY_ROLE+" should NOT be null");
 		}
 		
-		if (c3 != null) {
+		if (c4 != null) {
 			fail("Contract for "+MY_OTHER_ROLE+" should be null");
 		}
 		
-		if (c2 != c) {
+		Contract c5=ModelChangeUtils.getContract(context, MY_LOCATED_ROLE);
+		Contract c6=ModelChangeUtils.getContract(context, MY_OTHER_LOCATED_ROLE);
+		
+		if (c5 == null) {
+			fail("Contract for "+MY_LOCATED_ROLE+" should NOT be null");
+		}
+		
+		if (c6 != null) {
+			fail("Contract for "+MY_OTHER_LOCATED_ROLE+" should be null");
+		}
+		
+		if (c3 != c2) {
 			fail("Contract not the same as the one stored");
 		}
+		
+		if (c5 != c1) {
+			fail("Contract not the same as the one stored");
+		}
 	}
 }



More information about the savara-commits mailing list