axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r890676 - /webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java
Date Tue, 15 Dec 2009 07:12:36 GMT
Author: azeez
Date: Tue Dec 15 07:12:35 2009
New Revision: 890676

URL: http://svn.apache.org/viewvc?rev=890676&view=rev
Log:
Handling service & op not found scenario in REST calls

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

Modified: webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java?rev=890676&r1=890675&r2=890676&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/transport/http/src/org/apache/axis2/transport/http/util/RESTUtil.java
Tue Dec 15 07:12:35 2009
@@ -58,8 +58,13 @@
             msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
             dispatchAndVerify(msgContext);
             in = HTTPTransportUtils.handleGZip(msgContext, in);
-            SOAPEnvelope soapEnvelope = TransportUtils
-                    .createSOAPMessage(msgContext, in, contentType);
+            SOAPEnvelope soapEnvelope;
+            if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null)
{
+                soapEnvelope = TransportUtils.createSOAPEnvelope(null);
+            } else {
+                soapEnvelope = TransportUtils.createSOAPMessage(msgContext, in, contentType);
+            }
+
             msgContext.setEnvelope(soapEnvelope);
             msgContext.setProperty(Constants.Configuration.CONTENT_TYPE,
                                    contentType);
@@ -103,11 +108,14 @@
             // 1. First dispatchAndVerify and find out the service and the operation.
             dispatchAndVerify(msgContext);
             SOAPEnvelope soapEnvelope;
-            try {
-                soapEnvelope = TransportUtils
-                        .createSOAPMessage(msgContext, null, contentType);
-            } catch (XMLStreamException e) {
-                throw AxisFault.makeFault(e);
+            if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null)
{
+                soapEnvelope = TransportUtils.createSOAPEnvelope(null);
+            } else {
+                try {
+                    soapEnvelope = TransportUtils.createSOAPMessage(msgContext, null, contentType);
+                } catch (XMLStreamException e) {
+                    throw AxisFault.makeFault(e);
+                }
             }
 
             msgContext.setEnvelope(soapEnvelope);



Mime
View raw message