You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/02/12 05:39:21 UTC

svn commit: r506277 - in /webservices/axis2/trunk/java/modules: jaxws/src/org/apache/axis2/jaxws/context/utils/ jaxws/src/org/apache/axis2/jaxws/server/ kernel/src/org/apache/axis2/context/

Author: dims
Date: Sun Feb 11 20:39:20 2007
New Revision: 506277

URL: http://svn.apache.org/viewvc?view=rev&rev=506277
Log:
- Add a couple of null checks.
- Need to be able to specify a javax.xml.ws.Binding externally (for use with Geronimo)


Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java?view=diff&rev=506277&r1=506276&r2=506277
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/context/utils/ContextUitls.java Sun Feb 11 20:39:20 2007
@@ -190,7 +190,9 @@
         SOAPMessageContext soapMessageContext = null;
         if(serviceContext !=null){
         	WebServiceContext wsc =(WebServiceContext) serviceContext.getProperty(WEBSERVICE_MESSAGE_CONTEXT);
-        	soapMessageContext = (SOAPMessageContext)wsc.getMessageContext();
+            if(wsc != null) {
+                soapMessageContext = (SOAPMessageContext)wsc.getMessageContext();
+            }
         }
 		OperationDescription op = jaxwsMessageContext.getOperationDescription();
 		

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java?view=diff&rev=506277&r1=506276&r2=506277
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/JAXWSMessageReceiver.java Sun Feb 11 20:39:20 2007
@@ -18,6 +18,7 @@
 package org.apache.axis2.jaxws.server;
 
 import javax.xml.ws.WebServiceException;
+import javax.xml.ws.Binding;
 
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.OperationContext;
@@ -29,6 +30,7 @@
 import org.apache.axis2.jaxws.core.InvocationContext;
 import org.apache.axis2.jaxws.core.InvocationContextImpl;
 import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.core.InvocationContextFactory;
 import org.apache.axis2.jaxws.i18n.Messages;
 import org.apache.axis2.jaxws.message.util.MessageUtils;
 import org.apache.axis2.jaxws.util.Constants;
@@ -47,7 +49,8 @@
 private static final Log log = LogFactory.getLog(JAXWSMessageReceiver.class);
     
     private static String PARAM_SERVICE_CLASS = "ServiceClass";
-    
+    public static String PARAM_BINDING = "Binding";
+
     /**
      * We should have already determined which AxisService we're targetting at
      * this point.  So now, just get the service implementation and invoke
@@ -86,8 +89,9 @@
         	EndpointController endpointCtlr = new EndpointController();
           	
             MessageContext requestMsgCtx = new MessageContext(axisRequestMsgCtx);
-            
-            InvocationContext ic = new InvocationContextImpl();            
+
+            Binding binding = (Binding) axisRequestMsgCtx.getProperty(PARAM_BINDING);
+            InvocationContext ic = InvocationContextFactory.createInvocationContext(binding);
             ic.setRequestMessageContext(requestMsgCtx);
             
             //TODO:Once we the JAX-WS MessageContext one of the next things that

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?view=diff&rev=506277&r1=506276&r2=506277
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Sun Feb 11 20:39:20 2007
@@ -153,7 +153,9 @@
                 messageContext.getOperationContext().setParent(serviceContext);
             }
         }
-        messageContext.getOperationContext().setParent(serviceContext);
+        if(messageContext.getOperationContext() != null) {
+            messageContext.getOperationContext().setParent(serviceContext);
+        }
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org