01: /*
02: * The contents of this file are subject to the
03: * Mozilla Public License Version 1.1 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at http://www.mozilla.org/MPL/
06: *
07: * Software distributed under the License is distributed on an "AS IS"
08: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
09: * See the License for the specific language governing rights and
10: * limitations under the License.
11: *
12: * The Initial Developer of the Original Code is Simulacra Media Ltd.
13: * Portions created by Simulacra Media Ltd are Copyright (C) Simulacra Media Ltd, 2004.
14: *
15: * All Rights Reserved.
16: *
17: * Contributor(s):
18: */
19: package org.openharmonise.webdav.client.webservice;
20:
21: import java.net.URL;
22: import java.util.ArrayList;
23: import java.util.List;
24:
25: import javax.xml.namespace.QName;
26: import javax.xml.rpc.ServiceException;
27:
28: import org.apache.axis.client.*;
29:
30: /**
31: * Web Service which provides functionality that WebDAV does not.
32: *
33: * @author Matthew Large
34: * @version $Revision: 1.2 $
35: *
36: */
37: public class SearchDetailsService {
38: public static final String SIMULACRA_WEBSERVICE_NAMESPACE_URI = "webservice.server.dav.openharmonise.org";
39:
40: /**
41: *
42: */
43: public SearchDetailsService() {
44: super ();
45: }
46:
47: /**
48: * Returns the list of stop words used by server when indexing
49: * content
50: *
51: * @param endpoint
52: * @return
53: * @throws java.rmi.RemoteException
54: * @throws ServiceException
55: */
56: public static List getStopWords(URL endpoint)
57: throws java.rmi.RemoteException, ServiceException {
58:
59: Service service = new Service();
60: Call call = (Call) service.createCall();
61:
62: call.setTargetEndpointAddress(endpoint);
63: call.setOperationName(new QName(
64: SIMULACRA_WEBSERVICE_NAMESPACE_URI,
65: "getIndexerStopWords"));
66:
67: call.setReturnType(org.apache.axis.Constants.SOAP_ARRAY);
68: call.setReturnClass(ArrayList.class);
69:
70: List ret = (List) call.invoke((Object[]) null);
71:
72: return ret;
73: }
74:
75: }
|