Source Code Cross Referenced for BindingDescriptorImpl.java in  » Portal » Open-Portal » com » sun » portal » providers » simplewebservice » wsdl » impl » 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 » Portal » Open Portal » com.sun.portal.providers.simplewebservice.wsdl.impl 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $Id: BindingDescriptorImpl.java,v 1.6 2003/06/03 10:49:23 sy131129 Exp $
003:         * Copyright 2002-2003 Sun Microsystems, Inc. All
004:         * rights reserved. Use of this product is subject
005:         * to license terms. Federal Acquisitions:
006:         * Commercial Software -- Government Users
007:         * Subject to Standard License Terms and
008:         * Conditions.
009:         *
010:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011:         * are trademarks or registered trademarks of Sun Microsystems,
012:         * Inc. in the United States and other countries.
013:         */package com.sun.portal.providers.simplewebservice.wsdl.impl;
014:
015:        import java.util.List;
016:        import java.util.ArrayList;
017:        import java.util.Iterator;
018:
019:        import com.sun.portal.providers.simplewebservice.wsdl.BindingDescriptor;
020:        import com.sun.portal.providers.simplewebservice.wsdl.BindingOperationDescriptor;
021:        import com.sun.portal.providers.simplewebservice.wsdl.BindingOperationInputDescriptor;
022:        import com.sun.portal.providers.simplewebservice.wsdl.BindingOperationOutputDescriptor;
023:
024:        /**
025:         * This class represents a port type BindingDescriptor and describes the
026:         * protocol required for using operations in a port type.
027:         *
028:         */
029:        public class BindingDescriptorImpl implements  BindingDescriptor {
030:
031:            private String name = null;
032:            private String portTypeDescriptorName = null;
033:            private List bindingOperationDescriptors = new ArrayList();
034:            private String soapBindingStyle = null;
035:            private String soapBindingTransport = null;
036:
037:            /**
038:             * Default Constructor.
039:             *
040:             * @param name the name of the BindingDescriptor.
041:             * @param portTypeDescriptorName the name of the PortTypeDescriptor that is part of the BindingDescriptor.
042:             * @param bindingOperationDescriptors the BindingOperationDescriptors that are part of the BindingDescriptor.
043:             * @param soapBindingStyle the style for this SOAP Binding.
044:             * @param soapBindingTransport the transport for this SOAP Binding.
045:             */
046:            public BindingDescriptorImpl(String name,
047:                    String portTypeDescriptorName,
048:                    List bindingOperationDescriptors, String soapBindingStyle,
049:                    String soapBindingTransport) {
050:                this .name = name;
051:                this .portTypeDescriptorName = portTypeDescriptorName;
052:                this .bindingOperationDescriptors = bindingOperationDescriptors;
053:                this .soapBindingStyle = soapBindingStyle;
054:                this .soapBindingTransport = soapBindingTransport;
055:            }
056:
057:            /**
058:             * Get the name of this BindingDescriptor.
059:             *
060:             * @return the BindingDescriptor name
061:             */
062:            public String getName() {
063:                return name;
064:            }
065:
066:            /**
067:             * Get the name of the PortTypeDescriptor associated with this 
068:             * BindingDescriptor.
069:             *
070:             * @return the name of the associated port type
071:             */
072:            public String getPortTypeDescriptorName() {
073:                return portTypeDescriptorName;
074:            }
075:
076:            /**
077:             * Get the specified BindingOperationDescriptor. Note that operation 
078:             * names can be overloaded within a PortType. In case of overloading, the
079:             * names of the input and output messages can be used to further
080:             * refine the search.
081:             *
082:             * @param name the name of the desired BindingOperationDescriptor.
083:             * @param inputName the name of the BindingInputDescriptor; if this is null
084:             * it will be ignored.
085:             * @param outputName the name of the BindingOutputDescriptor; if this is null
086:             * it will be ignored.
087:             *
088:             * @return the corresponding BindingOperationDescriptor, or null if there wasn't
089:             * any matching BindingOperationDescriptor.
090:             */
091:            public BindingOperationDescriptor getBindingOperationDescriptor(
092:                    String name, String inputName, String outputName) {
093:                // @@ further verify this logic
094:
095:                Iterator bindingOperationDescriptorIterator = bindingOperationDescriptors
096:                        .iterator();
097:
098:                while (bindingOperationDescriptorIterator.hasNext()) {
099:                    BindingOperationDescriptor bindingOperationDescriptor = (BindingOperationDescriptor) bindingOperationDescriptorIterator
100:                            .next();
101:                    String opName = bindingOperationDescriptor.getName();
102:
103:                    if (name != null && opName != null) {
104:                        if (!name.equals(opName)) {
105:                            bindingOperationDescriptor = null;
106:                        }
107:                    } else if (name != null || opName != null) {
108:                        bindingOperationDescriptor = null;
109:                    }
110:
111:                    if (bindingOperationDescriptor != null && inputName != null) {
112:                        BindingOperationInputDescriptor inputDescriptor = bindingOperationDescriptor
113:                                .getBindingOperationInputDescriptor();
114:
115:                        if (inputDescriptor != null) {
116:                            String opInputName = inputDescriptor.getName();
117:
118:                            if (opInputName == null
119:                                    || !opInputName.equals(inputName)) {
120:                                bindingOperationDescriptor = null;
121:                            }
122:                        } else {
123:                            bindingOperationDescriptor = null;
124:                        }
125:                    }
126:
127:                    if (bindingOperationDescriptor != null
128:                            && outputName != null) {
129:                        BindingOperationOutputDescriptor outputDescriptor = bindingOperationDescriptor
130:                                .getBindingOperationOutputDescriptor();
131:
132:                        if (outputDescriptor != null) {
133:                            String opOutputName = outputDescriptor.getName();
134:
135:                            if (opOutputName == null
136:                                    || !opOutputName.equals(outputName)) {
137:                                bindingOperationDescriptor = null;
138:                            }
139:                        } else {
140:                            bindingOperationDescriptor = null;
141:                        }
142:                    }
143:
144:                    if (bindingOperationDescriptor != null) {
145:                        return bindingOperationDescriptor;
146:                    }
147:                }
148:
149:                return null;
150:            }
151:
152:            /**
153:             * Get all the BindingOperationDescriptors defined here.
154:             *
155:             * @return the BindingOperationDescriptors.   
156:             */
157:            public List getBindingOperationDescriptors() {
158:                return bindingOperationDescriptors;
159:            }
160:
161:            /**
162:             * Get the SOAP Binding Style for this BindingDescriptor.
163:             *
164:             * @return the BindingDescriptor SOAP Binding Style.
165:             */
166:            public String getSOAPBindingStyle() {
167:                return soapBindingStyle;
168:            }
169:
170:            /**
171:             * Get the SOAP Binding Transport for this BindingDescriptor.
172:             *
173:             * @return the BindingDescriptor SOAP Binding Transport.
174:             */
175:            public String getSOAPBindingTransport() {
176:                return soapBindingTransport;
177:            }
178:
179:            /**
180:             * Get the String representation of this BindingDescriptor.
181:             *
182:             * @return the String representation of this BindingDescriptor.
183:             */
184:            public String toString() {
185:                StringBuffer strBuf = new StringBuffer();
186:
187:                strBuf.append("\nBindingDescriptor: name=" + name);
188:
189:                if (portTypeDescriptorName != null) {
190:                    strBuf.append("\ntype=" + portTypeDescriptorName);
191:                }
192:
193:                if (soapBindingStyle != null) {
194:                    strBuf.append("\nSOAP Binding Style=" + soapBindingStyle);
195:                }
196:
197:                if (soapBindingTransport != null) {
198:                    strBuf.append("\nSOAP Binding Transport="
199:                            + soapBindingTransport);
200:                }
201:
202:                if (bindingOperationDescriptors != null) {
203:                    Iterator bindingOperationDescriptorIterator = bindingOperationDescriptors
204:                            .iterator();
205:
206:                    while (bindingOperationDescriptorIterator.hasNext()) {
207:                        strBuf.append("\n"
208:                                + bindingOperationDescriptorIterator.next());
209:                    }
210:                }
211:
212:                return strBuf.toString();
213:            }
214:        }
ww___w__.___j_a__v__a2_s___.c_o__m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.