axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ias" <iasan...@tmax.co.kr>
Subject Approach to support WS-I BP 1.0 R2714
Date Mon, 21 Jun 2004 12:20:11 GMT
This is the requirement:

R2714 For one-way operations, an INSTANCE MUST NOT return a HTTP response
that contains a SOAP envelope. Specifically, the HTTP response entity-body
must be empty. 

I simply added

            if (msgContext.getOperation() != null) {
		// We can test this in a WSDL-centric manner, too.
            	if
(msgContext.getOperation().getReturnClass().equals(void.class)) {
                		responseMsg = null;
            	}
            }

in front of sendResponse of /* Send response back along the wire...  */ if
clause in AxisServlet.doPost() and confirmed that it worked fine by all-
tests as well. Please review this change.

Thanks,

Ias

---------------------------------------------------------diff---------------
-------------------------------------------------------------
Index: AxisServlet.java
===================================================================
RCS file: /home/cvspublic/ws-
axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
retrieving revision 1.178
diff -u -r1.178 AxisServlet.java
--- AxisServlet.java	1 Apr 2004 20:48:43 -0000	1.178
+++ AxisServlet.java	21 Jun 2004 12:05:15 -0000
@@ -695,6 +695,13 @@
             }
             //determine content type from message response
             contentType =
responseMsg.getContentType(msgContext.getSOAPConstants());
+
+            if (msgContext.getOperation() != null) {
+            	if
(msgContext.getOperation().getReturnClass().equals(void.class)) {
+                		responseMsg = null;
+            	}
+            }
+
             sendResponse(contentType, res, responseMsg);
         } else {
             // No content, so just indicate accepted


Mime
View raw message