tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r957864 - in /tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2: ./ src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/ src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/axis2/engine/conf/
Date Fri, 25 Jun 2010 09:39:56 GMT
Author: slaws
Date: Fri Jun 25 09:39:55 2010
New Revision: 957864

URL: http://svn.apache.org/viewvc?rev=957864&view=rev
Log:
Add a little bit more code to include the JAXWSMessageReciever so I can debug some samples
and see if there is any mileage in this approach 

Modified:
    tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/pom.xml
    tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/Axis2EngineIntegration.java
    tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSReferenceBindingProvider.java
    tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSServiceBindingProvider.java
    tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/axis2/engine/conf/tuscany-axis2.xml

Modified: tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/pom.xml?rev=957864&r1=957863&r2=957864&view=diff
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/pom.xml (original)
+++ tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/pom.xml Fri Jun 25
09:39:55 2010
@@ -42,6 +42,12 @@
             <artifactId>tuscany-interface-wsdl</artifactId>
             <version>2.0-SNAPSHOT</version>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-interface-java</artifactId>
+            <version>2.0-SNAPSHOT</version>
+        </dependency>        
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>

Modified: tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/Axis2EngineIntegration.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/Axis2EngineIntegration.java?rev=957864&r1=957863&r2=957864&view=diff
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/Axis2EngineIntegration.java
(original)
+++ tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/Axis2EngineIntegration.java
Fri Jun 25 09:39:55 2010
@@ -230,7 +230,7 @@ public class Axis2EngineIntegration {
                                                     Port port, 
                                                     WebServiceBinding wsBinding) throws AxisFault
{
 
-        Definition definition = wsBinding.getWSDLDocument();
+        Definition definition = wsBinding.getGeneratedWSDLDocument();
         QName serviceQName = wsBinding.getService().getQName();
         Definition def = getDefinition(definition, serviceQName);
 

Modified: tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSReferenceBindingProvider.java?rev=957864&r1=957863&r2=957864&view=diff
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSReferenceBindingProvider.java
(original)
+++ tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSReferenceBindingProvider.java
Fri Jun 25 09:39:55 2010
@@ -50,7 +50,7 @@ public class JAXWSReferenceBindingProvid
         this.wsBinding = (WebServiceBinding) endpointReference.getBinding();
 
         // A WSDL document should always be present in the binding
-        if (wsBinding.getWSDLDocument() == null) {
+        if (wsBinding.getGeneratedWSDLDocument() == null) {
             throw new ServiceRuntimeException("No WSDL document for " + endpointReference.getURI());
         }
 

Modified: tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSServiceBindingProvider.java?rev=957864&r1=957863&r2=957864&view=diff
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSServiceBindingProvider.java
(original)
+++ tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/axis2/JAXWSServiceBindingProvider.java
Fri Jun 25 09:39:55 2010
@@ -20,6 +20,7 @@ package org.apache.tuscany.sca.binding.w
 
 import java.net.URI;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 
 import javax.wsdl.Port;
@@ -28,7 +29,10 @@ import javax.xml.ws.Endpoint;
 
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.jaxws.binding.BindingUtils;
 import org.apache.axis2.jaxws.description.DescriptionFactory;
 import org.apache.axis2.jaxws.description.EndpointDescription;
@@ -37,6 +41,7 @@ import org.apache.axis2.jaxws.descriptio
 import org.apache.axis2.jaxws.description.builder.WebServiceProviderAnnot;
 import org.apache.axis2.jaxws.description.builder.converter.JavaClassToDBCConverter;
 import org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl;
+import org.apache.axis2.jaxws.server.JAXWSMessageReceiver;
 import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
 import org.apache.tuscany.sca.core.ExtensionPointRegistry;
 import org.apache.tuscany.sca.core.FactoryExtensionPoint;
@@ -45,6 +50,7 @@ import org.apache.tuscany.sca.databindin
 import org.apache.tuscany.sca.host.http.SecurityContext;
 import org.apache.tuscany.sca.host.http.ServletHost;
 import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.MessageFactory;
 import org.apache.tuscany.sca.provider.ServiceBindingProvider;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -96,7 +102,7 @@ public class JAXWSServiceBindingProvider
         contract.getInterface().resetDataBinding(OMElement.class.getName());
         
         // A WSDL document should always be present in the binding
-        if (wsBinding.getWSDLDocument() == null) {
+        if (wsBinding.getGeneratedWSDLDocument() == null) {
             throw new ServiceRuntimeException("No WSDL document for " + component.getName()
+ "/" + service.getName());
         }
         
@@ -175,11 +181,13 @@ public class JAXWSServiceBindingProvider
             webServiceProviderAnnot.setTargetNamespace(targetNamespace);
             webServiceProviderAnnot.setServiceName(wsBinding.getService().getQName().getLocalPart());
             webServiceProviderAnnot.setPortName(wsBinding.getPort().getName());
+            webServiceProviderAnnot.setWsdlLocation("D:/sca-java-2.x-contrib/modules/binding-ws-runtime-jaxws-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlport/helloworld.wsdl");
             
             // adjust the service description to match the service we're actually exposing
             DescriptionBuilderComposite dbc = dbcMap.values().iterator().next();
             dbc.setWebServiceProviderAnnot(webServiceProviderAnnot);
-            dbc.setWsdlDefinition(wsBinding.getService().getQName(), wsBinding.getWSDLDefinition().getDefinition());
+            //dbc.setWsdlDefinition(wsBinding.getService().getQName(), wsBinding.getWSDLDefinition().getDefinition());
+
             List<ServiceDescription> serviceDescList = DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(dbcMap,
configContext);
             ServiceDescription sd = null;
             if (serviceDescList != null && serviceDescList.size() > 0) {
@@ -196,6 +204,12 @@ public class JAXWSServiceBindingProvider
             axisService.setName(path);
             axisService.setServiceDescription("Tuscany configured AxisService for service:
" + deployedURI);
             axisService.setClientSide(false);  
+            
+            for (Iterator<?> i = axisService.getOperations(); i.hasNext();) {
+                AxisOperation axisOp = (AxisOperation)i.next();
+                axisOp.setMessageReceiver(new JAXWSMessageReceiver());
+            }
+            
             configContext.getAxisConfiguration().addService(axisService);
             
             // fire up the Axis servlet

Modified: tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/axis2/engine/conf/tuscany-axis2.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/axis2/engine/conf/tuscany-axis2.xml?rev=957864&r1=957863&r2=957864&view=diff
==============================================================================
--- tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/axis2/engine/conf/tuscany-axis2.xml
(original)
+++ tuscany/sca-java-2.x/contrib/modules/binding-ws-runtime-jaxws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/jaxws/axis2/engine/conf/tuscany-axis2.xml
Fri Jun 25 09:39:55 2010
@@ -113,6 +113,8 @@
     <messageReceivers>
 
        <!-- Added by Tuscany -->
+       <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                        class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
        
 <!-- 
         <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
@@ -449,7 +451,9 @@
             <handler name="RequestURIOperationDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
             <handler name="SOAPMessageBodyBasedDispatcher"
-                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
                    
+            <handler name="SOAPMessageBodyBasedOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedOperationDispatcher"/>
                                        
 <!--
             <handler name="HTTPLocationBasedDispatcher"
                      class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>



Mime
View raw message