Source Code Cross Referenced for ServiceInfo.java in  » ESB » cbesb-1.2 » com » bostechcorp » cbesb » common » wsdl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » cbesb 1.2 » com.bostechcorp.cbesb.common.wsdl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * ChainBuilder ESB
003:         *          Visual Enterprise Integration
004:         * 
005:         * Copyright (C) 2007 Bostech Corporation
006:         * 
007:         * This program is free software; you can redistribute it and/or modify it 
008:         * under the terms of the GNU General Public License as published by the 
009:         * Free Software Foundation; either version 2 of the License, or (at your option) 
010:         * any later version.
011:         *
012:         * This program is distributed in the hope that it will be useful, 
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
014:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
015:         * for more details.
016:         * 
017:         * You should have received a copy of the GNU General Public License along with 
018:         * this program; if not, write to the Free Software Foundation, Inc., 
019:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020:         *
021:         *
022:         * $Id: ServiceInfo.java 10081 2007-11-14 16:43:38Z mpreston $
023:         */
024:
025:        package com.bostechcorp.cbesb.common.wsdl;
026:
027:        import java.util.ArrayList;
028:        import java.util.Iterator;
029:        import java.util.LinkedHashMap;
030:        import java.util.List;
031:        import java.util.Map;
032:        import java.util.Set;
033:
034:        import javax.wsdl.Definition;
035:        import javax.wsdl.Port;
036:        import javax.wsdl.Service;
037:        import javax.wsdl.WSDLException;
038:        import javax.xml.namespace.QName;
039:
040:        /**
041:         * Represents a single service in a WSDL
042:         *
043:         */
044:
045:        public class ServiceInfo extends ComponentInfo {
046:
047:            /** The list of ports defined for this service */
048:            private LinkedHashMap<String, PortInfo> ports;
049:
050:            /**
051:             * Constructor
052:             */
053:            public ServiceInfo() {
054:                super ();
055:                ports = new LinkedHashMap<String, PortInfo>();
056:            }
057:
058:            protected static ServiceInfo load(WsdlInfo wsdlInfo,
059:                    Service wsdlService) throws WSDLException {
060:                ServiceInfo svcInfo = new ServiceInfo();
061:
062:                // Get the qualified service name information
063:                QName qName = wsdlService.getQName();
064:                String namespace = qName.getNamespaceURI();
065:                String name = qName.getLocalPart();
066:                svcInfo.setName(name);
067:                svcInfo.setNamespaceURI(namespace);
068:
069:                // Get the defined ports for this service
070:                Map ports = wsdlService.getPorts();
071:                Iterator iter = ports.values().iterator();
072:                while (iter.hasNext()) {
073:                    // Get the next defined port
074:                    Port port = (Port) iter.next();
075:                    PortInfo portInfo = PortInfo.load(wsdlInfo, port);
076:
077:                    if (portInfo != null)
078:                        svcInfo.addPort(portInfo);
079:                }
080:
081:                return svcInfo;
082:            }
083:
084:            /**
085:             * Add a new PortInfo object to the Service
086:             * @param port
087:             */
088:            public void addPort(PortInfo port) {
089:                ports.put(port.getName(), port);
090:            }
091:
092:            /**
093:             * Returns an array containing the names of all
094:             * of the Ports defined in this service
095:             * @return
096:             */
097:            public String[] getPortNames() {
098:                String[] retArray = null;
099:                Set Names = ports.keySet();
100:                retArray = new String[Names.size()];
101:                int i = 0;
102:                for (Iterator iter = Names.iterator(); iter.hasNext();) {
103:                    retArray[i] = (String) iter.next();
104:                    i++;
105:                }
106:                return retArray;
107:            }
108:
109:            /**
110:             * Returns a List containing all of the PortInfo
111:             * objects defined in this service
112:             * @return
113:             */
114:            public List getPorts() {
115:                return new ArrayList<PortInfo>(ports.values());
116:            }
117:
118:            /**
119:             * Return the named PortInfo object
120:             * @param name
121:             * @return
122:             */
123:            public PortInfo getPort(String name) {
124:                return ports.get(name);
125:            }
126:
127:            /**
128:             * For debugging
129:             */
130:            public String toString() {
131:                StringBuffer buffer = new StringBuffer();
132:                buffer.append("Service: " + name + "\n");
133:
134:                for (Iterator iter = getPorts().iterator(); iter.hasNext();) {
135:                    PortInfo port = (PortInfo) iter.next();
136:                    buffer.append(port.toString() + "\n");
137:                }
138:                return buffer.toString();
139:            }
140:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.