You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2010/02/12 13:26:20 UTC
svn commit: r909381 -
/synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java
Author: ruwan
Date: Fri Feb 12 12:26:20 2010
New Revision: 909381
URL: http://svn.apache.org/viewvc?rev=909381&view=rev
Log:
Fixing the issue SYNAPSE-605, applying the patch from Amila
Modified:
synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java
Modified: synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java?rev=909381&r1=909380&r2=909381&view=diff
==============================================================================
--- synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java (original)
+++ synapse/trunk/java/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/ServerWorker.java Fri Feb 12 12:26:20 2010
@@ -21,8 +21,8 @@
import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
-import org.apache.axis2.builder.BuilderUtil;
import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.builder.BuilderUtil;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisOperation;
@@ -32,7 +32,6 @@
import org.apache.axis2.transport.base.MetricsCollector;
import org.apache.axis2.transport.http.HTTPTransportReceiver;
import org.apache.axis2.transport.http.HTTPTransportUtils;
-import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.util.JavaUtils;
import org.apache.axis2.util.MessageContextBuilder;
import org.apache.axis2.wsdl.WSDLConstants;
@@ -437,7 +436,13 @@
if (service != null) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- service.printWSDL(baos, getIpAddress());
+ String parameterValue = parameters.get("wsdl");
+ if (parameterValue == null) {
+ service.printWSDL(baos, getIpAddress());
+ } else {
+ // here the parameter value should be the wsdl file name
+ service.printUserWSDL(baos, parameterValue);
+ }
response.addHeader(CONTENT_TYPE, TEXT_XML);
serverHandler.commitResponseHideExceptions(conn, response);
os.write(baos.toByteArray());