01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.ideaplugin.bean;
20:
21: import java.util.ArrayList;
22:
23: /**
24: * Author: Deepal Jayasinghe
25: * Date: Sep 22, 2005
26: * Time: 11:11:48 PM
27: */
28: public class ServiceObj {
29: private String serviceName;
30: private String serviceClass;
31: private ArrayList operations;
32:
33: public ServiceObj(String serviceName, String serviceClass,
34: ArrayList operations) {
35: this .serviceName = serviceName;
36: this .serviceClass = serviceClass;
37: this .operations = operations;
38: }
39:
40: public String getServiceName() {
41: return serviceName;
42: }
43:
44: public String getServiceClass() {
45: return serviceClass;
46: }
47:
48: public ArrayList getOperations() {
49: return operations;
50: }
51:
52: public String toString() {
53: String serviceXML = "<service name=\""
54: + serviceName
55: + "\" >\n"
56: + " <description>\n"
57: + " Please Type your service description here\n"
58: + " </description>\n"
59: + " <messageReceivers>\n"
60: + " <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-only\" \n"
61: + " class=\"org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver\" />\n "
62: + " <messageReceiver mep=\"http://www.w3.org/2004/08/wsdl/in-out\"\n "
63: + " class=\"org.apache.axis2.rpc.receivers.RPCMessageReceiver\" /> \n"
64: + " </messageReceivers>\n "
65: + " <parameter name=\"ServiceClass\" locked=\"false\">"
66: + serviceClass + "</parameter>\n";
67: if (operations.size() > 0) {
68: serviceXML = serviceXML + " <excludeOperations>\n";
69: for (int i = 0; i < operations.size(); i++) {
70: String s = (String) operations.get(i);
71: String op = " <operation>" + s + "</operation>\n";
72: serviceXML = serviceXML + op;
73: }
74: serviceXML = serviceXML + " </excludeOperations>\n";
75: }
76: serviceXML = serviceXML + "</service>\n";
77: return serviceXML;
78: }
79:
80: }
|