axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kei...@apache.org
Subject svn commit: r503607 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: transport/http/util/RESTUtil.java util/SchemaUtil.java
Date Mon, 05 Feb 2007 09:46:58 GMT
Author: keithc
Date: Mon Feb  5 01:46:57 2007
New Revision: 503607

URL: http://svn.apache.org/viewvc?view=rev&rev=503607
Log:
Fixing NPE in RestUtil


Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java?view=diff&rev=503607&r1=503606&r2=503607
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java
Mon Feb  5 01:46:57 2007
@@ -223,9 +223,11 @@
             if ((axisOperation = msgContext.getAxisOperation()) != null) {
                 AxisEndpoint axisEndpoint =
                         (AxisEndpoint) msgContext.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
-                AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisEndpoint
-                        .getBinding().getChild(axisOperation.getName());
-                msgContext.setProperty(Constants.AXIS_BINDING_OPERATION, axisBindingOperation);
+                if (axisEndpoint != null) {
+                    AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisEndpoint
+                            .getBinding().getChild(axisOperation.getName());
+                    msgContext.setProperty(Constants.AXIS_BINDING_OPERATION, axisBindingOperation);
+                }
                 msgContext.setAxisOperation(axisOperation);
             }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java?view=diff&rev=503607&r1=503606&r2=503607
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/SchemaUtil.java
Mon Feb  5 01:46:57 2007
@@ -442,7 +442,8 @@
             }
         }
 
-        if (request.getContentType().indexOf(HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA)
> -1) {
+        String contentType = request.getContentType();
+        if (contentType != null && contentType.indexOf(HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA)
> -1) {
             ServletRequestContext servletRequestContext = new ServletRequestContext(request);
             try {
                 List items = parseRequest(servletRequestContext);



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


Mime
View raw message