From 8c62fb49ba5fca443a34593317b677a8bda06a17 Mon Sep 17 00:00:00 2001 From: theli Date: Tue, 16 Aug 2005 11:09:59 +0000 Subject: [PATCH] *) Bugfix for httpdSoapHandler Initialisation. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@545 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpd.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java index 74f33c1ef..242833ea4 100644 --- a/source/de/anomic/http/httpd.java +++ b/source/de/anomic/http/httpd.java @@ -613,7 +613,14 @@ public final class httpd implements serverHandler { if (this.prop.containsKey("PATH") && this.prop.getProperty("PATH").startsWith("/soap")) { if (soapHandler == null) { try { - soapHandler = (httpdHandler) Class.forName("de.anomic.soap.httpdSoapHandler").newInstance(); + // creating the soap handler class by name + Class soapHandlerClass = Class.forName("de.anomic.soap.httpdSoapHandler"); + + // Look for the proper constructor + Constructor soapHandlerConstructor = soapHandlerClass.getConstructor( new Class[] { serverSwitch.class } ); + + // creating the new object + soapHandler = (httpdHandler)soapHandlerConstructor.newInstance( new Object[] { this.switchboard } ); } catch (Exception e) { sendRespondHeader(this.prop,this.session.out,httpVersion,503,null); return serverCore.TERMINATE_CONNECTION;