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 ga...@apache.org on 2007/07/18 07:37:56 UTC
svn commit: r557156 -
/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/TransportHeadersAdapter.java
Author: gawor
Date: Tue Jul 17 22:37:56 2007
New Revision: 557156
URL: http://svn.apache.org/viewvc?view=rev&rev=557156
Log:
propagate HTTP_STATUS_CODE (fix from Jeff and Michael)
Modified:
webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/TransportHeadersAdapter.java
Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/TransportHeadersAdapter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/TransportHeadersAdapter.java?view=diff&rev=557156&r1=557155&r2=557156
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/TransportHeadersAdapter.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/TransportHeadersAdapter.java Tue Jul 17 22:37:56 2007
@@ -20,12 +20,10 @@
import org.apache.axis2.jaxws.ExceptionFactory;
import org.apache.axis2.jaxws.core.MessageContext;
-import org.apache.axis2.jaxws.message.Message;
+import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import javax.activation.DataHandler;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -107,6 +105,12 @@
tha.putAll((Map) map);
}
mc.setProperty(propertyName, tha);
+
+ // If this is a response, then also set the property for the response code
+ if (!isRequest) {
+ Object value = mc.getProperty(HTTPConstants.MC_HTTP_STATUS_CODE);
+ mc.setProperty(javax.xml.ws.handler.MessageContext.HTTP_RESPONSE_CODE, value);
+ }
}
/**
@@ -229,5 +233,9 @@
Map tempMap = new HashMap<String, List<String>>();
tempMap.putAll(this);
return tempMap.entrySet();
+ }
+
+ public String toString() {
+ return "TransportHeadersAdapter: " + getDelegateMap(mc).toString();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org