tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r718858 [5/9] - in /tuscany/java/sca/modules: ./ assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ assembly-xml/src/main/resources/ assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ assembly-xml/src/test/resource...
Date Wed, 19 Nov 2008 05:28:12 GMT
Modified: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java (original)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingReferenceBindingProvider.java Tue Nov 18 21:27:58 2008
@@ -25,68 +25,78 @@
 import javax.jms.JMSException;
 
 import org.apache.axiom.om.OMElement;
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.JMSBindingException;
-import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
+import org.apache.tuscany.sca.binding.jms.headers.HeaderReferenceInterceptor;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.OperationSelectorJMSDefault;
+import org.apache.tuscany.sca.binding.jms.transport.TransportReferenceInterceptor;
+import org.apache.tuscany.sca.binding.jms.wireformat.jmstextxml.WireFormatJMSTextXML;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
 import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.InvocationChain;
 import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.provider.OperationSelectorProvider;
+import org.apache.tuscany.sca.provider.OperationSelectorProviderFactory;
+import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
 import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+import org.apache.tuscany.sca.provider.ReferenceBindingProviderRRB;
+import org.apache.tuscany.sca.provider.WireFormatProvider;
+import org.apache.tuscany.sca.provider.WireFormatProviderFactory;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeWire;
 
 /**
  * Implementation of the JMS reference binding provider.
  * 
  * @version $Rev$ $Date$
  */
-public class JMSBindingReferenceBindingProvider implements ReferenceBindingProvider {
+public class JMSBindingReferenceBindingProvider implements ReferenceBindingProviderRRB {
 
     private RuntimeComponentReference reference;
     private JMSBinding jmsBinding;
     private List<JMSBindingInvoker> jmsBindingInvokers = new ArrayList<JMSBindingInvoker>();
     private JMSResourceFactory jmsResourceFactory;
     private RuntimeComponent component;
-    private InterfaceContract wsdlInterfaceContract; 
+    private InterfaceContract interfaceContract; 
     private ExtensionPointRegistry extensions;
+    
+    private ProviderFactoryExtensionPoint providerFactories;
+       
+    private WireFormatProviderFactory requestWireFormatProviderFactory;
+    private WireFormatProvider requestWireFormatProvider;
+    
+    private WireFormatProviderFactory responseWireFormatProviderFactory;
+    private WireFormatProvider responseWireFormatProvider;
 
-    public JMSBindingReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, JMSBinding binding,  ExtensionPointRegistry extensions) {
+    public JMSBindingReferenceBindingProvider(RuntimeComponent component, RuntimeComponentReference reference, JMSBinding binding,  ExtensionPointRegistry extensions, JMSResourceFactory jmsResourceFactory) {
         this.reference = reference;
         this.jmsBinding = binding;
         this.extensions = extensions;
-        jmsResourceFactory = new JMSResourceFactory(binding.getConnectionFactoryName(), binding.getInitialContextFactoryName(), binding.getJndiURL());
-
-        if (XMLTextMessageProcessor.class.isAssignableFrom(JMSMessageProcessorUtil.getRequestMessageProcessor(jmsBinding).getClass())) {
-            setXMLDataBinding(reference);
+        this.component = component;
+        this.jmsResourceFactory = jmsResourceFactory;
+        
+        // Get the factories/providers for operation selection        
+        this.providerFactories = extensions.getExtensionPoint(ProviderFactoryExtensionPoint.class);
+        
+        // Get the factories/providers for wire format
+         this.requestWireFormatProviderFactory = 
+            (WireFormatProviderFactory)providerFactories.getProviderFactory(jmsBinding.getRequestWireFormat().getClass());
+        if (this.requestWireFormatProviderFactory != null){
+            this.requestWireFormatProvider = requestWireFormatProviderFactory.createReferenceWireFormatProvider(component, reference, jmsBinding);
         }
-
-    }
-    
-    protected void setXMLDataBinding(RuntimeComponentReference reference) {
         
-        WebServiceBindingFactory wsFactory = extensions.getExtensionPoint(WebServiceBindingFactory.class);
-        WebServiceBinding wsBinding = wsFactory.createWebServiceBinding();
-        BindingWSDLGenerator.generateWSDL(component, reference, wsBinding, extensions, null);
-        wsdlInterfaceContract = wsBinding.getBindingInterfaceContract();
-        wsdlInterfaceContract.getInterface().resetDataBinding(OMElement.class.getName());
-        
-        // TODO: TUSCANY-xxx, section 5.2 "Default Data Binding" in the JMS binding spec  
-        
-//        try {
-//            InterfaceContract ic = (InterfaceContract)reference.getInterfaceContract().clone();
-//
-//            Interface ii = (Interface)ic.getInterface().clone();
-//            ii.resetDataBinding("org.apache.axiom.om.OMElement");
-//            ic.setInterface(ii);
-//            reference.setInterfaceContract(ic);
-//
-//        } catch (CloneNotSupportedException e) {
-//            throw new RuntimeException(e);
-//        }
+        this.responseWireFormatProviderFactory = 
+            (WireFormatProviderFactory)providerFactories.getProviderFactory(jmsBinding.getResponseWireFormat().getClass());
+        if (this.responseWireFormatProviderFactory != null){
+            this.responseWireFormatProvider = responseWireFormatProviderFactory.createReferenceWireFormatProvider(component, reference, jmsBinding);
+        }      
     }
 
     public Invoker createInvoker(Operation operation) {
@@ -97,8 +107,9 @@
             }
         }
 
-        JMSBindingInvoker invoker = new JMSBindingInvoker(jmsBinding, operation, jmsResourceFactory, reference);
-        jmsBindingInvokers.add(invoker);
+        Invoker invoker = null;
+        invoker = new RRBJMSBindingInvoker(jmsBinding, operation, jmsResourceFactory, reference);
+       
         return invoker;
     }
 
@@ -107,15 +118,10 @@
     }
 
     public InterfaceContract getBindingInterfaceContract() {
-        if (wsdlInterfaceContract != null) {
-            return wsdlInterfaceContract;
-        } else {
-            if (reference.getInterfaceContract() == null) {
-                return reference.getReference().getInterfaceContract();
-            } else {
-                return reference.getInterfaceContract();
-            }
+        if (interfaceContract == null){
+            interfaceContract = this.requestWireFormatProvider.getWireFormatInterfaceContract();
         }
+        return interfaceContract;
     }
 
     public void start() {
@@ -129,5 +135,36 @@
             throw new JMSBindingException(e);
         }
     }
+    
+    /*
+     * set up the reference binding wire with the right set of jms reference
+     * interceptors
+     */
+    public void configureBindingChain(RuntimeWire runtimeWire) {
+        
+        InvocationChain bindingChain = runtimeWire.getBindingInvocationChain();
+        
+        // add transport interceptor
+        bindingChain.addInterceptor(Phase.REFERENCE_BINDING_TRANSPORT, 
+                                    new TransportReferenceInterceptor(jmsBinding,
+                                                                      jmsResourceFactory,
+                                                                      runtimeWire) );
+        
+        // add request wire format 
+        bindingChain.addInterceptor(requestWireFormatProvider.getPhase(), 
+                                    requestWireFormatProvider.createInterceptor());
+        
+        // add response wire format, but only add it if it's different from the request
+        if (!jmsBinding.getRequestWireFormat().equals(jmsBinding.getResponseWireFormat())){
+            bindingChain.addInterceptor(responseWireFormatProvider.getPhase(), 
+                                        responseWireFormatProvider.createInterceptor());
+        }
+        
+        // add the header processor that comes after the wire formatter
+        bindingChain.addInterceptor(Phase.REFERENCE_BINDING_WIREFORMAT, 
+                                    new HeaderReferenceInterceptor(jmsBinding,
+                                                                   jmsResourceFactory,
+                                                                   runtimeWire) );
+    }    
 
 }

Modified: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java (original)
+++ tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingServiceBindingProvider.java Tue Nov 18 21:27:58 2008
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.binding.jms.provider;
 
+import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -26,6 +27,7 @@
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.Topic;
@@ -33,17 +35,37 @@
 
 import org.apache.axiom.om.OMElement;
 import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.binding.jms.JMSBinding;
-import org.apache.tuscany.sca.binding.jms.JMSBindingException;
-import org.apache.tuscany.sca.binding.jms.xml.JMSBindingConstants;
+import org.apache.tuscany.sca.assembly.OperationSelector;
+import org.apache.tuscany.sca.assembly.WireFormat;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
+import org.apache.tuscany.sca.binding.jms.impl.JMSBindingException;
+import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.OperationSelectorJMSDefault;
+import org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.OperationSelectorJMSDefaultServiceInterceptor;
+import org.apache.tuscany.sca.binding.jms.transport.TransportReferenceInterceptor;
+import org.apache.tuscany.sca.binding.jms.transport.TransportServiceInterceptor;
+import org.apache.tuscany.sca.binding.jms.wireformat.jmstextxml.WireFormatJMSTextXML;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
 import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.invocation.InvocationChain;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.provider.BindingProviderFactory;
+import org.apache.tuscany.sca.provider.OperationSelectorProvider;
+import org.apache.tuscany.sca.provider.OperationSelectorProviderFactory;
+import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
 import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.provider.ServiceBindingProviderRRB;
+import org.apache.tuscany.sca.provider.WireFormatProvider;
+import org.apache.tuscany.sca.provider.WireFormatProviderFactory;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.apache.tuscany.sca.runtime.RuntimeWire;
 import org.apache.tuscany.sca.work.WorkScheduler;
 
 /**
@@ -51,7 +73,7 @@
  * 
  * @version $Rev$ $Date$
  */
-public class JMSBindingServiceBindingProvider implements ServiceBindingProvider {
+public class JMSBindingServiceBindingProvider implements ServiceBindingProviderRRB {
     private static final Logger logger = Logger.getLogger(JMSBindingServiceBindingProvider.class.getName());
 
     private RuntimeComponentService service;
@@ -68,16 +90,30 @@
 
     private RuntimeComponent component;
     private InterfaceContract wsdlInterfaceContract;
+    
+
+    private ProviderFactoryExtensionPoint providerFactories;
+    private ModelFactoryExtensionPoint modelFactories;
+    
+    private MessageFactory messageFactory;
+    
+    private OperationSelectorProviderFactory operationSelectorProviderFactory;
+    private OperationSelectorProvider operationSelectorProvider;
+    
+    private WireFormatProviderFactory requestWireFormatProviderFactory;
+    private WireFormatProvider requestWireFormatProvider;
+    
+    private WireFormatProviderFactory responseWireFormatProviderFactory;
+    private WireFormatProvider responseWireFormatProvider;
 
-    public JMSBindingServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, Binding targetBinding, JMSBinding binding, WorkScheduler workScheduler, ExtensionPointRegistry extensionPoints) {
+    public JMSBindingServiceBindingProvider(RuntimeComponent component, RuntimeComponentService service, Binding targetBinding, JMSBinding binding, WorkScheduler workScheduler, ExtensionPointRegistry extensionPoints, JMSResourceFactory jmsResourceFactory) {
         this.component = component;
         this.service = service;
         this.jmsBinding = binding;
         this.workScheduler = workScheduler;
         this.targetBinding = targetBinding;
         this.extensionPoints = extensionPoints;
-
-        jmsResourceFactory = new JMSResourceFactory(binding.getConnectionFactoryName(), binding.getInitialContextFactoryName(), binding.getJndiURL());
+        this.jmsResourceFactory = jmsResourceFactory;
 
         if (jmsBinding.getDestinationName().equals(JMSBindingConstants.DEFAULT_DESTINATION_NAME)) {
             if (!service.isCallback()) {
@@ -85,56 +121,35 @@
                 jmsBinding.setDestinationName(service.getName());
             }
         }
-
-        if (XMLTextMessageProcessor.class.isAssignableFrom(JMSMessageProcessorUtil.getRequestMessageProcessor(jmsBinding).getClass())) {
-            if (!isOnMessage()) {
-                setXMLDataBinding(service);
-            }
-        }
-
-    }
-    
-    protected boolean isOnMessage() {
-        InterfaceContract ic = getBindingInterfaceContract();
-        if (ic.getInterface().getOperations().size() != 1) {
-            return false;
-        }
-        return "onMessage".equals(ic.getInterface().getOperations().get(0).getName());
-    }
-
-    protected void setXMLDataBinding(RuntimeComponentService service) {
-        if (service.getInterfaceContract() != null) {
-            WebServiceBindingFactory wsFactory = extensionPoints.getExtensionPoint(WebServiceBindingFactory.class);
-            WebServiceBinding wsBinding = wsFactory.createWebServiceBinding();
-            BindingWSDLGenerator.generateWSDL(component, service, wsBinding, extensionPoints, null);
-            wsdlInterfaceContract = wsBinding.getBindingInterfaceContract();
-            wsdlInterfaceContract.getInterface().resetDataBinding(OMElement.class.getName());
-            
-            // TODO: TUSCANY-xxx, section 5.2 "Default Data Binding" in the JMS binding spec  
-
-//            try {
-//                InterfaceContract ic = (InterfaceContract)service.getInterfaceContract().clone();
-//                Interface ii = ic.getInterface();
-//                if (ii.getOperations().size() == 1 && "onMessage".equals(ii.getOperations().get(0).getName())) {
-//                    return;
-//                }
-//                ii = (Interface)ii.clone();
-//                ii.resetDataBinding("org.apache.axiom.om.OMElement");
-//                ic.setInterface(ii);
-//                service.setInterfaceContract(ic);
-//
-//            } catch (CloneNotSupportedException e) {
-//                throw new RuntimeException(e);
-//            }
+        
+        // Get Message factory
+        modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+        messageFactory = modelFactories.getFactory(MessageFactory.class);
+
+        // Get the factories/providers for operation selection       
+        this.providerFactories = extensionPoints.getExtensionPoint(ProviderFactoryExtensionPoint.class);
+        this.operationSelectorProviderFactory =
+            (OperationSelectorProviderFactory)providerFactories.getProviderFactory(jmsBinding.getOperationSelector().getClass());
+        if (this.operationSelectorProviderFactory != null){
+            this.operationSelectorProvider = operationSelectorProviderFactory.createServiceOperationSelectorProvider(component, service, jmsBinding);
+        }
+        
+        // Get the factories/providers for wire format        
+        this.requestWireFormatProviderFactory = 
+            (WireFormatProviderFactory)providerFactories.getProviderFactory(jmsBinding.getRequestWireFormat().getClass());
+        if (this.requestWireFormatProviderFactory != null){
+            this.requestWireFormatProvider = requestWireFormatProviderFactory.createServiceWireFormatProvider(component, service, jmsBinding);
+        }
+        
+        this.responseWireFormatProviderFactory = 
+            (WireFormatProviderFactory)providerFactories.getProviderFactory(jmsBinding.getResponseWireFormat().getClass());
+        if (this.responseWireFormatProviderFactory != null){
+            this.responseWireFormatProvider = responseWireFormatProviderFactory.createServiceWireFormatProvider(component, service, jmsBinding);
         }
     }
 
     public InterfaceContract getBindingInterfaceContract() {
-        if (wsdlInterfaceContract != null) {
-            return wsdlInterfaceContract;
-        } else {
-            return service.getInterfaceContract();
-        }
+        return requestWireFormatProvider.getWireFormatInterfaceContract();
     }
 
     public boolean supportsOneWayInvocation() {
@@ -180,7 +195,16 @@
             consumer = session.createConsumer(destination);
         }
 
-        final JMSBindingListener listener = new JMSBindingListener(jmsBinding, jmsResourceFactory, service, targetBinding);
+        MessageListener tmpListener = null;
+        
+        /*
+         * TODO turn on RRB version of JMS binding
+         */
+        tmpListener = new RRBJMSBindingListener(jmsBinding, jmsResourceFactory, service, targetBinding, messageFactory);
+        //tmpListener = new DefaultJMSBindingListener(jmsBinding, jmsResourceFactory, service, targetBinding);
+    
+        final MessageListener listener = tmpListener;
+        
         try {
 
             consumer.setMessageListener(listener);
@@ -304,4 +328,32 @@
             throw new JMSBindingException(e);
         }
     }
+    
+    /*
+     * RRB test methods
+     */
+    public void configureBindingChain(RuntimeWire runtimeWire) {
+        
+        InvocationChain bindingChain = runtimeWire.getBindingInvocationChain();
+        
+        // add transport interceptor
+        bindingChain.addInterceptor(Phase.SERVICE_BINDING_TRANSPORT, 
+                                    new TransportServiceInterceptor(jmsBinding,
+                                                                    jmsResourceFactory,
+                                                                    runtimeWire) );
+
+        // add operation selector interceptor
+        bindingChain.addInterceptor(operationSelectorProvider.getPhase(), 
+                                    operationSelectorProvider.createInterceptor());
+        
+        // add request wire format
+        bindingChain.addInterceptor(requestWireFormatProvider.getPhase(), 
+                                    requestWireFormatProvider.createInterceptor());
+        
+        // add response wire format, but only add it if it's different from the request
+        if (!jmsBinding.getRequestWireFormat().equals(jmsBinding.getResponseWireFormat())){
+            bindingChain.addInterceptor(responseWireFormatProvider.getPhase(), 
+                                        responseWireFormatProvider.createInterceptor());
+        }
+    }
 }

Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSResourceFactoryImpl.java:713805-714043

Modified: tuscany/java/sca/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (original)
+++ tuscany/java/sca/modules/binding-jms/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor Tue Nov 18 21:27:58 2008
@@ -16,4 +16,10 @@
 # under the License. 
 
 # Implementation class for the artifact processor extension
-org.apache.tuscany.sca.binding.jms.xml.JMSBindingProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#binding.jms,model=org.apache.tuscany.sca.binding.jms.JMSBinding
+org.apache.tuscany.sca.binding.jms.impl.JMSBindingProcessor;qname=http://www.osoa.org/xmlns/sca/1.0#binding.jms,model=org.apache.tuscany.sca.binding.jms.impl.JMSBinding
+org.apache.tuscany.sca.binding.jms.wireformat.jmstextxml.WireFormatJMSTextXMLProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#wireFormat.jmsTextXML,model=org.apache.tuscany.sca.binding.jms.wireformat.jmstextxml.WireFormatJMSTextXML
+org.apache.tuscany.sca.binding.jms.wireformat.jmsbytes.WireFormatJMSBytesProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#wireFormat.jmsBytes,model=org.apache.tuscany.sca.binding.jms.wireformat.jmsbytes.WireFormatJMSBytes
+org.apache.tuscany.sca.binding.jms.wireformat.jmstext.WireFormatJMSTextProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#wireFormat.jmsText,model=org.apache.tuscany.sca.binding.jms.wireformat.jmstext.WireFormatJMSText
+org.apache.tuscany.sca.binding.jms.wireformat.jmsobject.WireFormatJMSObjectProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#wireFormat.jmsObject,model=org.apache.tuscany.sca.binding.jms.wireformat.jmsobject.WireFormatJMSObject
+org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.OperationSelectorJMSDefaultProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#operationSelector.jmsDefault,model=org.apache.tuscany.sca.binding.jms.operationselector.jmsdefault.OperationSelectorJMSDefault
+

Propchange: tuscany/java/sca/modules/binding-jsonrpc/
            ('svn:mergeinfo' removed)

Propchange: tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/bean/TestBean.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -1,2 +1,3 @@
 /tuscany/branches/sca-java-1.3/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/TestBean.java:671193
-/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/bean/TestBean.java:694837-694843,694855
+/tuscany/branches/sca-java-1.x/modules/binding-jsonrpc-runtime/src/test/java/bean/TestBean.java:713805-714043
+/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/bean/TestBean.java:694816-713804

Propchange: tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/Echo.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -1,2 +1,3 @@
 /tuscany/branches/sca-java-1.3/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/Echo.java:671193
-/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/Echo.java:694837-694843,694855
+/tuscany/branches/sca-java-1.x/modules/binding-jsonrpc-runtime/src/test/java/echo/Echo.java:713805-714043
+/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/Echo.java:694816-713804

Propchange: tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -1,2 +1,3 @@
 /tuscany/branches/sca-java-1.3/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/BusinessException.java:671193
-/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java:694837-694843,694855
+/tuscany/branches/sca-java-1.x/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java:713805-714043
+/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoBusinessException.java:694816-713804

Propchange: tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -1,2 +1,3 @@
 /tuscany/branches/sca-java-1.3/modules/binding-jsonrpc-runtime/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/EchoComponentImpl.java:671193
-/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java:694837-694843,694855
+/tuscany/branches/sca-java-1.x/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java:713805-714043
+/tuscany/java/sca/modules/binding-jsonrpc-runtime/src/test/java/echo/EchoComponentImpl.java:694816-713804

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/modules/binding-rmi:671193
+/tuscany/branches/sca-java-1.x/modules/binding-rmi-runtime:713805-714043

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/LICENSE
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/LICENSE
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/NOTICE
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/NOTICE
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.x/modules/binding-rmi-runtime/src:713805-714043

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIBindingProviderFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIBindingProviderFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvokerFactory.java:671193,680620-680628
+/tuscany/branches/sca-java-1.x/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java:713805-714043

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceInvoker.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvoker.java:671193,680620-680628
+/tuscany/branches/sca-java-1.x/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceInvoker.java:713805-714043

Propchange: tuscany/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIService.java:671193,680620-680628
+/tuscany/branches/sca-java-1.x/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java:713805-714043

Propchange: tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/impl/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1 @@
+/tuscany/branches/sca-java-1.x/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/impl:713805-714043

Propchange: tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/impl/RMIBindingImpl.java
------------------------------------------------------------------------------
    eol-style = native

Propchange: tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/impl/RMIBindingImpl.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Nov 18 21:27:58 2008
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBinding.java:671193,680620-680628
+/tuscany/branches/sca-java-1.x/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/impl/RMIBindingImpl.java:713805-714043

Modified: tuscany/java/sca/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/WriteTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/WriteTestCase.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/WriteTestCase.java (original)
+++ tuscany/java/sca/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/WriteTestCase.java Tue Nov 18 21:27:58 2008
@@ -64,7 +64,7 @@
         assertNotNull(componentType);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         staxProcessor.write(componentType, outputFactory.createXMLStreamWriter(bos));
-        assertEquals("<?xml version='1.0' encoding='UTF-8'?><componentType xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:ns1=\"http://www.osoa.org/xmlns/sca/1.0\"><service name=\"CalculatorService\"><binding.sca /><interface.java xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" class=\"calculator.CalculatorService\" /></service><reference name=\"addService\"><binding.sca /><interface.java xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" class=\"calculator.AddService\" /></reference></componentType>",
+        assertEquals("<?xml version='1.0' encoding='UTF-8'?><componentType xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:ns1=\"http://www.osoa.org/xmlns/sca/1.0\"><service name=\"CalculatorService\"><binding.sca /><interface.java interface=\"calculator.CalculatorService\" /></service><reference name=\"addService\"><binding.sca /><interface.java interface=\"calculator.AddService\" /></reference></componentType>",
         		     bos.toString());
         }
 
@@ -75,8 +75,8 @@
         assertNotNull(composite);
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
         staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos));
-        assertEquals("<?xml version='1.0' encoding='UTF-8'?><composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:ns1=\"http://www.osoa.org/xmlns/sca/1.0\" targetNamespace=\"http://calc\" name=\"Calculator\"><service name=\"CalculatorService\" promote=\"CalculatorServiceComponent\"><binding.sca /><interface.java xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" interface=\"calculator.CalculatorService\" /></service><component name=\"CalculatorServiceComponent\"><reference name=\"addService\" target=\"AddServiceComponent\"><binding.sca /></reference><reference name=\"subtractService\" target=\"SubtractServiceComponent\" /><reference name=\"multiplyService\" target=\"MultiplyServiceComponent\" /><reference name=\"divideService\" target=\"DivideServiceComponent\" /></component><component name=\"AddServiceComponent\"><service><binding.sca /><interface.java xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" interface=\"calculator.AddService\" /></service></component><component name=\"S
 ubtractServiceComponent\" /><component name=\"MultiplyServiceComponent\" /><component name=\"DivideServiceComponent\" /></composite>",
-                 	 bos.toString() );
+        assertEquals("<?xml version='1.0' encoding='UTF-8'?><composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\" xmlns:ns1=\"http://www.osoa.org/xmlns/sca/1.0\" targetNamespace=\"http://calc\" name=\"Calculator\"><service name=\"CalculatorService\" promote=\"CalculatorServiceComponent\"><binding.sca /><interface.java interface=\"calculator.CalculatorService\" /></service><component name=\"CalculatorServiceComponent\"><implementation.java class=\"calculator.CalculatorServiceImpl\" /><reference name=\"addService\" target=\"AddServiceComponent\"><binding.sca /></reference><reference name=\"subtractService\" target=\"SubtractServiceComponent\" /><reference name=\"multiplyService\" target=\"MultiplyServiceComponent\" /><reference name=\"divideService\" target=\"DivideServiceComponent\" /></component><component name=\"AddServiceComponent\"><implementation.java class=\"calculator.AddServiceImpl\" /><service name=\"AddService\"><binding.sca /><interface.java interface=\"calculator
 .AddService\" /></service></component><component name=\"SubtractServiceComponent\"><implementation.java class=\"calculator.SubtractServiceImpl\" /></component><component name=\"MultiplyServiceComponent\"><implementation.java class=\"calculator.MultiplyServiceImpl\" /></component><component name=\"DivideServiceComponent\"><implementation.java class=\"calculator.DivideServiceImpl\" /></component></composite>",
+                     bos.toString());
     }
 
 }

Modified: tuscany/java/sca/modules/binding-sca-xml/src/test/resources/Calculator.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-sca-xml/src/test/resources/Calculator.composite?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-sca-xml/src/test/resources/Calculator.composite (original)
+++ tuscany/java/sca/modules/binding-sca-xml/src/test/resources/Calculator.composite Tue Nov 18 21:27:58 2008
@@ -38,7 +38,7 @@
 
     <component name="AddServiceComponent">
     <implementation.java class="calculator.AddServiceImpl"/>
-    <service>
+    <service name="AddService">
         <interface.java interface="calculator.AddService"/>
             <binding.sca/>
     </service>        

Modified: tuscany/java/sca/modules/binding-sca-xml/src/test/resources/CalculatorServiceImpl.componentType
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-sca-xml/src/test/resources/CalculatorServiceImpl.componentType?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-sca-xml/src/test/resources/CalculatorServiceImpl.componentType (original)
+++ tuscany/java/sca/modules/binding-sca-xml/src/test/resources/CalculatorServiceImpl.componentType Tue Nov 18 21:27:58 2008
@@ -20,12 +20,12 @@
 <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0">
 
   <service name="CalculatorService">
-        <interface.java class="calculator.CalculatorService" />
+        <interface.java interface="calculator.CalculatorService" />
         <binding.sca/>
   </service>
 
   <reference name="addService">
-        <interface.java class="calculator.AddService" />
+        <interface.java interface="calculator.AddService" />
         <binding.sca/>
   </reference>  
 

Modified: tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor (original)
+++ tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor Tue Nov 18 21:27:58 2008
@@ -17,4 +17,5 @@
 
 # Implementation class for the artifact processor extension
 org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#wsConfigParam,model=org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy
-org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.Axis2BasicAuthenticationPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#axis2BasicAuthentication,model=org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.Axis2BasicAuthenticationPolicy
+org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#axis2TokenAuthentication,model=org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy
+org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicyProcessor;qname=http://tuscany.apache.org/xmlns/sca/1.0#axis2Header,model=org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy

Modified: tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory (original)
+++ tuscany/java/sca/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.PolicyProviderFactory Tue Nov 18 21:27:58 2008
@@ -16,4 +16,5 @@
 # under the License. 
 
 # Implementation class for the policy extension
-org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.Axis2BasicAuthenticationPolicyProviderFactory;model=org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.Axis2BasicAuthenticationPolicy
\ No newline at end of file
+org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicyProviderFactory;model=org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy
+org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicyProviderFactory;model=org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy
\ No newline at end of file

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingInvoker.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingInvoker.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingInvoker.java Tue Nov 18 21:27:58 2008
@@ -21,6 +21,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.namespace.QName;
@@ -39,7 +40,10 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.Axis2BasicAuthenticationReferenceBindingConfigurator;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingBasicAuthenticationConfigurator;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingHeaderConfigurator;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy;
 import org.apache.tuscany.sca.interfacedef.util.FaultException;
 import org.apache.tuscany.sca.invocation.DataExchangeSemantics;
 import org.apache.tuscany.sca.invocation.Invoker;
@@ -73,7 +77,10 @@
     private SOAPFactory soapFactory;    
     private List<PolicyHandler> policyHandlerList = null;
     private WebServiceBinding wsBinding;
+    
     private BasicAuthenticationPolicy basicAuthenticationPolicy = null;
+    private Axis2TokenAuthenticationPolicy axis2TokenAuthenticationPolicy = null;
+    private List<Axis2HeaderPolicy> axis2HeaderPolicies = new ArrayList<Axis2HeaderPolicy>();
 
     public Axis2BindingInvoker(Axis2ServiceClient serviceClient,
                                QName wsdlOperationName,
@@ -95,7 +102,11 @@
                 for (Object p : ps.getPolicies()) {
                     if (BasicAuthenticationPolicy.class.isInstance(p)) {
                         basicAuthenticationPolicy = (BasicAuthenticationPolicy)p;
-                    } else {
+                    } else if (Axis2TokenAuthenticationPolicy.class.isInstance(p)) {
+                        axis2TokenAuthenticationPolicy = (Axis2TokenAuthenticationPolicy)p;
+                    } else if (Axis2HeaderPolicy.class.isInstance(p)) {
+                        axis2HeaderPolicies.add((Axis2HeaderPolicy)p);
+                    }else {
                         // etc. check for other types of policy being present
                     }
                 }
@@ -137,8 +148,17 @@
             policyHandler.beforeInvoke(msg, requestMC, operationClient);
         }
         
+        // set policy specified headers
+        for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
+            Axis2BindingHeaderConfigurator.setHeader(requestMC, msg, policy.getHeaderName());
+        }
+        
         if (basicAuthenticationPolicy != null) {
-            Axis2BasicAuthenticationReferenceBindingConfigurator.setOperationOptions(operationClient, msg, basicAuthenticationPolicy);
+            Axis2BindingBasicAuthenticationConfigurator.setOperationOptions(operationClient, msg, basicAuthenticationPolicy);
+        }
+        
+        if (axis2TokenAuthenticationPolicy != null) {
+            Axis2BindingHeaderConfigurator.setHeader(requestMC, msg, axis2TokenAuthenticationPolicy.getTokenName());
         }
         
         // Allow privileged access to read properties. Requires PropertiesPermission read in
@@ -237,6 +257,11 @@
             sh.addChild(epr);
             requestMC.setFrom(fromEPR);
         }
+        
+        // Set any message headers required by policy
+        // Get the header from the tuscany message
+        // If its not already an OM convert it to OM
+        // add it to the envelope header
 
         // if target endpoint was not specified when this invoker was created, 
         // use dynamically specified target endpoint passed in on this call

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java Tue Nov 18 21:27:58 2008
@@ -69,12 +69,12 @@
 import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
 import org.apache.tuscany.sca.assembly.AbstractContract;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.invocation.MessageFactory;
 import org.apache.tuscany.sca.policy.PolicySet;
 import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy;
 import org.apache.tuscany.sca.policy.util.PolicyHandler;
 import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple;
 import org.apache.tuscany.sca.policy.util.PolicyHandlerUtils;

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceProvider.java Tue Nov 18 21:27:58 2008
@@ -50,6 +50,7 @@
 import org.apache.axiom.soap.SOAPHeader;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.Constants.Configuration;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
@@ -73,7 +74,12 @@
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceClient.URIResolverImpl;
-import org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.basic.Axis2BasicAuthenticationServiceBindingConfigurator;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.authentication.token.Axis2TokenAuthenticationPolicy;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingBasicAuthenticationConfigurator;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingHeaderConfigurator;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2HeaderPolicy;
+import org.apache.tuscany.sca.binding.ws.axis2.policy.header.Axis2SOAPHeaderString;
 import org.apache.tuscany.sca.core.assembly.EndpointReferenceImpl;
 import org.apache.tuscany.sca.host.http.ServletHost;
 import org.apache.tuscany.sca.interfacedef.Interface;
@@ -85,7 +91,6 @@
 import org.apache.tuscany.sca.policy.PolicySet;
 import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
 import org.apache.tuscany.sca.policy.authentication.basic.BasicAuthenticationPolicy;
-import org.apache.tuscany.sca.policy.security.ws.Axis2ConfigParamPolicy;
 import org.apache.tuscany.sca.policy.util.PolicyHandler;
 import org.apache.tuscany.sca.policy.util.PolicyHandlerTuple;
 import org.apache.tuscany.sca.policy.util.PolicyHandlerUtils;
@@ -124,7 +129,10 @@
     private List<PolicyHandlerTuple> policyHandlerClassnames = null;
     private List<PolicyHandler> policyHandlerList = new ArrayList<PolicyHandler>();
     private Map<String, Port> urlMap = new HashMap<String, Port>();
+    
     private BasicAuthenticationPolicy basicAuthenticationPolicy = null;
+    private Axis2TokenAuthenticationPolicy axis2TokenAuthenticationPolicy = null;
+    private List<Axis2HeaderPolicy> axis2HeaderPolicies = new ArrayList<Axis2HeaderPolicy>();
 
     public static final QName QNAME_WSA_ADDRESS =
         new QName(AddressingConstants.Final.WSA_NAMESPACE, AddressingConstants.EPR_ADDRESS);
@@ -187,7 +195,13 @@
         } 
 
         configContext.setContextRoot(servletHost.getContextPath());
-
+        
+        // Enable MTOM if the policy intent is specified.
+        if (AxisPolicyHelper.isIntentRequired(wsBinding, AxisPolicyHelper.MTOM_INTENT)) {
+            configContext.getAxisConfiguration().getParameter(Configuration.ENABLE_MTOM).setLocked(false);
+            configContext.getAxisConfiguration().getParameter(Configuration.ENABLE_MTOM).setValue("true");            
+        }
+        
         // Update port addresses with runtime information, and create a
         // map from endpoint URIs to WSDL ports that eliminates duplicate
         // ports for the same endpoint.
@@ -205,6 +219,10 @@
                 for (Object p : ps.getPolicies()) {
                     if (BasicAuthenticationPolicy.class.isInstance(p)) {
                         basicAuthenticationPolicy = (BasicAuthenticationPolicy)p;
+                    } else if (Axis2TokenAuthenticationPolicy.class.isInstance(p)) {
+                        axis2TokenAuthenticationPolicy = (Axis2TokenAuthenticationPolicy)p;
+                    } else if (Axis2HeaderPolicy.class.isInstance(p)) {
+                        axis2HeaderPolicies.add((Axis2HeaderPolicy)p);
                     } else {
                         // etc. check for other types of policy being present
                     }
@@ -295,7 +313,7 @@
           
             Axis2ServiceServlet servlet = null;
             for (String endpointURL : urlMap.keySet()) {
-                if (endpointURL.startsWith("http://") || endpointURL.startsWith("/")) {
+                if (endpointURL.startsWith("http://") || endpointURL.startsWith("https://") || endpointURL.startsWith("/")) {
                     if (servlet == null) {
                         servlet = new Axis2ServiceServlet();
                         servlet.init(configContext);
@@ -638,6 +656,11 @@
         String callbackAddress = null;
         String callbackID = null;
         Object conversationID = null;
+        
+        // create a message object and set the args as its body
+        Message msg = messageFactory.createMessage();
+        msg.setBody(args);
+        msg.setOperation(op);
 
         //FIXME: can we use the Axis2 addressing support for this?
         SOAPHeader header = inMC.getEnvelope().getHeader();
@@ -666,12 +689,20 @@
                     }
                 }
             }
+            
+            // get policy specified headers
+            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
+                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
+            }
+            
+            if (axis2TokenAuthenticationPolicy != null) {
+                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
+                Axis2BindingHeaderConfigurator.getHeader(inMC, 
+                                                         msg, 
+                                                         axis2TokenAuthenticationPolicy.getTokenName(), 
+                                                         tokenHeader);
+            }
         }
-
-        // create a message object and set the args as its body
-        Message msg = messageFactory.createMessage();
-        msg.setBody(args);
-        msg.setOperation(op);
         
         //fill message with QoS context info 
         fillQoSContext(msg, inMC);
@@ -703,7 +734,7 @@
         }
                 
         if (basicAuthenticationPolicy != null) {
-            Axis2BasicAuthenticationServiceBindingConfigurator.parseHTTPHeader(inMC, msg, basicAuthenticationPolicy);
+            Axis2BindingBasicAuthenticationConfigurator.parseHTTPHeader(inMC, msg, basicAuthenticationPolicy);
         }
         
         // find the runtime wire and invoke it with the message
@@ -782,7 +813,7 @@
                             WSSecurityEngineResult securityResult = 
                                 (WSSecurityEngineResult)wshr.getResults().elementAt(count2);
                             if ( securityResult.get("principal") != null ) {
-                                message.getQoSContext().put(Message.QOS_CTX_SECURITY_PRINCIPAL, securityResult.get("principal"));
+                                message.getHeaders().add(securityResult.get("principal"));
                             }
                         }
                     }

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java Tue Nov 18 21:27:58 2008
@@ -52,7 +52,7 @@
 public class TuscanyAxisConfigurator extends URLBasedAxisConfigurator implements AxisConfigurator {
     
     /* these two fields are part of a temporary fix to solve problems that Maven has with including
-     * rampart-1.3.mar into the classpath and also at the time of Release 1.0 rampart-1.3.mar seems
+     * rampart-1.4.mar into the classpath and also at the time of Release 1.0 rampart-1.4.mar seems
      * to pull in a SNAPSHOT version of rampart-project pom.  Hence rampart.mar has been excluded
      * as a Maven dependency and has been packed with this module 
      */
@@ -61,7 +61,7 @@
         getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml");
     private URL axis2_repository = null;
     private URL rampart_mar_url =
-        getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart-1.3.mar");
+        getResource("/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart-1.4.mar");
     /************** end of fix *************************************************************/
     
     private boolean isRampartRequired;
@@ -157,8 +157,8 @@
             module.setParent(axisConfig);
             //String moduleFile = fileUrl.substring(0, fileUrl.indexOf(".mar"));
             if (module.getName() == null) {
-                module.setName(org.apache.axis2.util.Utils.getModuleName("rampart-1.3"));
-                module.setVersion(org.apache.axis2.util.Utils.getModuleVersion("rampart-1.3"));
+                module.setName(org.apache.axis2.util.Utils.getModuleName("rampart-1.4"));
+                module.setVersion(org.apache.axis2.util.Utils.getModuleVersion("rampart-1.4"));
             }
             populateModule(module, rampart_mar_url);
             module.setFileName(rampart_mar_url);

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml Tue Nov 18 21:27:58 2008
@@ -25,7 +25,7 @@
             xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
             xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0">
             
-    <sca:bindingType type="sca:binding.ws"  mayProvide="SOAP SOAP.1_1 SOAP.1_2" alwaysProvides=""/>
+    <sca:bindingType type="sca:binding.ws"  mayProvide="SOAP SOAP.1_1 SOAP.1_2 MTOM" alwaysProvides=""/>
 
     <!-- PolicyIntents defined by the SCA Runtime Extension for WS Binding Axis 2 -->
     <sca:intent name="SOAP" constrains="sca:binding.ws">

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/axis2.xml Tue Nov 18 21:27:58 2008
@@ -499,5 +499,6 @@
         <phase name="RMPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
+        <phase name="Security"/>
     </phaseOrder>
 </axisconfig>

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/modules.list
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/modules.list?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/modules.list (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/modules.list Tue Nov 18 21:27:58 2008
@@ -1 +1 @@
-rampart-1.3.mar
\ No newline at end of file
+rampart-1.4.mar
\ No newline at end of file

Propchange: tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/engine/config/modules/rampart-1.4.mar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/AbstractHelloWorldOMTestCase.java Tue Nov 18 21:27:58 2008
@@ -33,6 +33,9 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 public abstract class AbstractHelloWorldOMTestCase {
 

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/configparams/security.properties Tue Nov 18 21:27:58 2008
@@ -1,3 +1,19 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+## 
+## http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
 org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
 org.apache.ws.security.crypto.merlin.keystore.type=jks
 org.apache.ws.security.crypto.merlin.keystore.password=TuscanyWsUserPasswd

Modified: tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties (original)
+++ tuscany/java/sca/modules/binding-ws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/itests/policy/mixed/security.properties Tue Nov 18 21:27:58 2008
@@ -1,3 +1,19 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+## 
+## http://www.apache.org/licenses/LICENSE-2.0
+## 
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
 org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
 org.apache.ws.security.crypto.merlin.keystore.type=jks
 org.apache.ws.security.crypto.merlin.keystore.password=TuscanyWsUserPasswd

Modified: tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/package-info.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/package-info.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/package-info.java (original)
+++ tuscany/java/sca/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/other/package-info.java Tue Nov 18 21:27:58 2008
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
 @javax.xml.bind.annotation.XmlSchema(namespace = "http://other.ws.binding.sca.tuscany.apache.org/")
 package org.apache.tuscany.sca.binding.ws.other;
 

Modified: tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java (original)
+++ tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java Tue Nov 18 21:27:58 2008
@@ -73,6 +73,20 @@
 	        monitor.problem(problem);
     	 }
      }
+     
+     /**
+      * Report a exception.
+      * 
+      * @param problems
+      * @param message
+      * @param model
+      */
+     private void error(String message, Object model, Exception ex) {
+         if (monitor != null) {
+             Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-java-validation-messages", Severity.ERROR, model, message, ex);
+             monitor.problem(problem);
+         }
+     }
 
     public QName getArtifactType() {
         return EXPORT_JAVA;
@@ -85,38 +99,44 @@
     /**
      * Process <export package=""/>
      */
-    public JavaExport read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+    public JavaExport read(XMLStreamReader reader) throws ContributionReadException {
         JavaExport javaExport = this.factory.createJavaExport();
         QName element = null;
         
-        while (reader.hasNext()) {
-            int event = reader.getEventType();
-            switch (event) {
-                case START_ELEMENT:
-                    element = reader.getName();
-                    
-                    // Read <export.java>
-                    if (EXPORT_JAVA.equals(element)) {
-                        String packageName = reader.getAttributeValue(null, PACKAGE);
-                        if (packageName == null) {
-                        	error("AttributePackageMissing", reader);
-                            //throw new ContributionReadException("Attribute 'package' is missing");
-                        } else                        
-                            javaExport.setPackage(packageName);
-                    }
-                    break;
-                case XMLStreamConstants.END_ELEMENT:
-                    if (EXPORT_JAVA.equals(reader.getName())) {
-                        return javaExport;
-                    }
-                    break;        
-            }
-            
-            //Read the next element
-            if (reader.hasNext()) {
-                reader.next();
+        try {
+            while (reader.hasNext()) {
+                int event = reader.getEventType();
+                switch (event) {
+                    case START_ELEMENT:
+                        element = reader.getName();
+                        
+                        // Read <export.java>
+                        if (EXPORT_JAVA.equals(element)) {
+                            String packageName = reader.getAttributeValue(null, PACKAGE);
+                            if (packageName == null) {
+                            	error("AttributePackageMissing", reader);
+                                //throw new ContributionReadException("Attribute 'package' is missing");
+                            } else                        
+                                javaExport.setPackage(packageName);
+                        }
+                        break;
+                    case XMLStreamConstants.END_ELEMENT:
+                        if (EXPORT_JAVA.equals(reader.getName())) {
+                            return javaExport;
+                        }
+                        break;        
+                }
+                
+                //Read the next element
+                if (reader.hasNext()) {
+                    reader.next();
+                }
             }
         }
+        catch (XMLStreamException e) {
+            ContributionReadException ex = new ContributionReadException(e);
+            error("XMLStreamException", reader, ex);
+        }
         
         return javaExport;
     }

Modified: tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java (original)
+++ tuscany/java/sca/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java Tue Nov 18 21:27:58 2008
@@ -74,6 +74,20 @@
 	        monitor.problem(problem);
     	 }
      }
+     
+     /**
+      * Report a exception.
+      * 
+      * @param problems
+      * @param message
+      * @param model
+      */
+     private void error(String message, Object model, Exception ex) {
+         if (monitor != null) {
+             Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-java-validation-messages", Severity.ERROR, model, message, ex);
+             monitor.problem(problem);
+         }
+     }
     
     public QName getArtifactType() {
         return IMPORT_JAVA;
@@ -86,41 +100,47 @@
     /**
      * Process <import.java package="" location=""/>
      */
-    public JavaImport read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+    public JavaImport read(XMLStreamReader reader) throws ContributionReadException {
         JavaImport javaImport = this.factory.createJavaImport();
         QName element = null;
         
-        while (reader.hasNext()) {
-            int event = reader.getEventType();
-            switch (event) {
-                case START_ELEMENT:
-                    element = reader.getName();
-
-                    // Read <import.java>
-                    if (IMPORT_JAVA.equals(element)) {
-                        String packageName = reader.getAttributeValue(null, PACKAGE);
-                        if (packageName == null) {
-                        	error("AttributePackageMissing", reader);
-                            //throw new ContributionReadException("Attribute 'package' is missing");
-                        } else
-                        	javaImport.setPackage(packageName);
-                        
-                        String location = reader.getAttributeValue(null, LOCATION);                        
-                        javaImport.setLocation(location);
-                    }
-                    break;
-                case XMLStreamConstants.END_ELEMENT:
-                    if (IMPORT_JAVA.equals(reader.getName())) {
-                        return javaImport;
-                    }
-                    break;        
-            }
-            
-            // Read the next element
-            if (reader.hasNext()) {
-                reader.next();
+        try {
+            while (reader.hasNext()) {
+                int event = reader.getEventType();
+                switch (event) {
+                    case START_ELEMENT:
+                        element = reader.getName();
+    
+                        // Read <import.java>
+                        if (IMPORT_JAVA.equals(element)) {
+                            String packageName = reader.getAttributeValue(null, PACKAGE);
+                            if (packageName == null) {
+                            	error("AttributePackageMissing", reader);
+                                //throw new ContributionReadException("Attribute 'package' is missing");
+                            } else
+                            	javaImport.setPackage(packageName);
+                            
+                            String location = reader.getAttributeValue(null, LOCATION);                        
+                            javaImport.setLocation(location);
+                        }
+                        break;
+                    case XMLStreamConstants.END_ELEMENT:
+                        if (IMPORT_JAVA.equals(reader.getName())) {
+                            return javaImport;
+                        }
+                        break;        
+                }
+                
+                // Read the next element
+                if (reader.hasNext()) {
+                    reader.next();
+                }
             }
         }
+        catch (XMLStreamException e) {
+            ContributionReadException ex = new ContributionReadException(e);
+            error("XMLStreamException", reader, ex);
+        }
         
         return javaImport;
     }

Modified: tuscany/java/sca/modules/contribution-java/src/main/resources/contribution-java-validation-messages.properties
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-java/src/main/resources/contribution-java-validation-messages.properties?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution-java/src/main/resources/contribution-java-validation-messages.properties (original)
+++ tuscany/java/sca/modules/contribution-java/src/main/resources/contribution-java-validation-messages.properties Tue Nov 18 21:27:58 2008
@@ -19,4 +19,5 @@
 #
 #
 AttributePackageMissing = Attribute 'package' is missing
+XMLStreamException = XMLStreamException occured due to : {0}
 

Modified: tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java (original)
+++ tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java Tue Nov 18 21:27:58 2008
@@ -71,6 +71,20 @@
 	        monitor.problem(problem);
     	 }
      }
+     
+     /**
+      * Report a exception.
+      * 
+      * @param problems
+      * @param message
+      * @param model
+      */
+     private void error(String message, Object model, Exception ex) {
+         if (monitor != null) {
+             Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-namespace-validation-messages", Severity.ERROR, model, message, ex);
+             monitor.problem(problem);
+         }
+     }
 
     public QName getArtifactType() {
         return EXPORT;
@@ -83,39 +97,45 @@
     /**
      * Process <export namespace=""/>
      */
-    public NamespaceExport read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+    public NamespaceExport read(XMLStreamReader reader) throws ContributionReadException {
         NamespaceExport namespaceExport = this.factory.createNamespaceExport();
         QName element = null;
         
-        while (reader.hasNext()) {
-            int event = reader.getEventType();
-            switch (event) {
-                case START_ELEMENT:
-                    element = reader.getName();
-                    
-                    // Read <export>
-                    if (EXPORT.equals(element)) {
-                        String ns = reader.getAttributeValue(null, NAMESPACE);
-                        if (ns == null) {
-                        	error("AttributeNameSpaceMissing", reader);
-                            //throw new ContributionReadException("Attribute 'namespace' is missing");
-                        } else
-                            namespaceExport.setNamespace(ns);
-                    } 
-                    
-                    break;
-                case XMLStreamConstants.END_ELEMENT:
-                    if (EXPORT.equals(reader.getName())) {
-                        return namespaceExport;
-                    }
-                    break;        
-            }
-            
-            // Read the next element
-            if (reader.hasNext()) {
-                reader.next();
+        try {
+            while (reader.hasNext()) {
+                int event = reader.getEventType();
+                switch (event) {
+                    case START_ELEMENT:
+                        element = reader.getName();
+                        
+                        // Read <export>
+                        if (EXPORT.equals(element)) {
+                            String ns = reader.getAttributeValue(null, NAMESPACE);
+                            if (ns == null) {
+                            	error("AttributeNameSpaceMissing", reader);
+                                //throw new ContributionReadException("Attribute 'namespace' is missing");
+                            } else
+                                namespaceExport.setNamespace(ns);
+                        } 
+                        
+                        break;
+                    case XMLStreamConstants.END_ELEMENT:
+                        if (EXPORT.equals(reader.getName())) {
+                            return namespaceExport;
+                        }
+                        break;        
+                }
+                
+                // Read the next element
+                if (reader.hasNext()) {
+                    reader.next();
+                }
             }
         }
+        catch (XMLStreamException e) {
+            ContributionReadException ex = new ContributionReadException(e);
+            error("XMLStreamException", reader, ex);
+        }
         
         return namespaceExport;
     }

Modified: tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java?rev=718858&r1=718857&r2=718858&view=diff
==============================================================================
--- tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java (original)
+++ tuscany/java/sca/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java Tue Nov 18 21:27:58 2008
@@ -74,6 +74,20 @@
     	 }
      }
     
+     /**
+      * Report a exception.
+      * 
+      * @param problems
+      * @param message
+      * @param model
+      */
+     private void error(String message, Object model, Exception ex) {
+         if (monitor != null) {
+             Problem problem = new ProblemImpl(this.getClass().getName(), "contribution-namespace-validation-messages", Severity.ERROR, model, message, ex);
+             monitor.problem(problem);
+         }
+     }
+    
     public QName getArtifactType() {
         return IMPORT;
     }
@@ -85,43 +99,49 @@
     /**
      * Process <import namespace="" location=""/>
      */
-    public NamespaceImport read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+    public NamespaceImport read(XMLStreamReader reader) throws ContributionReadException {
         NamespaceImport namespaceImport = this.factory.createNamespaceImport();
         QName element;
         
-        while (reader.hasNext()) {
-            int event = reader.getEventType();
-            switch (event) {
-                case START_ELEMENT:
-                    element = reader.getName();
-
-                    // Read <import>
-                    if (IMPORT.equals(element)) {
-                        String ns = reader.getAttributeValue(null, NAMESPACE);
-                        if (ns == null) {
-                        	error("AttributeNameSpaceMissing", reader);
-                            //throw new ContributionReadException("Attribute 'namespace' is missing");
-                        } else 
-                            namespaceImport.setNamespace(ns);
-
-                        String location = reader.getAttributeValue(null, LOCATION);
-                        if (location != null) {
-                            namespaceImport.setLocation(location);
+        try {
+            while (reader.hasNext()) {
+                int event = reader.getEventType();
+                switch (event) {
+                    case START_ELEMENT:
+                        element = reader.getName();
+    
+                        // Read <import>
+                        if (IMPORT.equals(element)) {
+                            String ns = reader.getAttributeValue(null, NAMESPACE);
+                            if (ns == null) {
+                            	error("AttributeNameSpaceMissing", reader);
+                                //throw new ContributionReadException("Attribute 'namespace' is missing");
+                            } else 
+                                namespaceImport.setNamespace(ns);
+    
+                            String location = reader.getAttributeValue(null, LOCATION);
+                            if (location != null) {
+                                namespaceImport.setLocation(location);
+                            }
                         }
-                    }
-                    break;
-                case XMLStreamConstants.END_ELEMENT:
-                    if (IMPORT.equals(reader.getName())) {
-                        return namespaceImport;
-                    }
-                    break;        
-            }
-            
-            // Read the next element
-            if (reader.hasNext()) {
-                reader.next();
+                        break;
+                    case XMLStreamConstants.END_ELEMENT:
+                        if (IMPORT.equals(reader.getName())) {
+                            return namespaceImport;
+                        }
+                        break;        
+                }
+                
+                // Read the next element
+                if (reader.hasNext()) {
+                    reader.next();
+                }
             }
         }
+        catch (XMLStreamException e) {
+            ContributionReadException ex = new ContributionReadException(e);
+            error("XMLStreamException", reader, ex);
+        }
         
         return namespaceImport;
     }



Mime
View raw message