Source Code Cross Referenced for Interface_Stub.java in  » IDE-Netbeans » mobility » example » serverscript » connector » 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 » IDE Netbeans » mobility » example.serverscript.connector 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *
003:         * Copyright (c) 2007, Sun Microsystems, Inc.
004:         *
005:         * All rights reserved.
006:         *
007:         * Redistribution and use in source and binary forms, with or without
008:         * modification, are permitted provided that the following conditions
009:         * are met:
010:         *
011:         *  * Redistributions of source code must retain the above copyright
012:         *    notice, this list of conditions and the following disclaimer.
013:         *  * Redistributions in binary form must reproduce the above copyright
014:         *    notice, this list of conditions and the following disclaimer in the
015:         *    documentation and/or other materials provided with the distribution.
016:         *  * Neither the name of Sun Microsystems nor the names of its contributors
017:         *    may be used to endorse or promote products derived from this software
018:         *    without specific prior written permission.
019:         *
020:         * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
021:         * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
022:         * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
023:         * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
024:         * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
025:         * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
026:         * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
027:         * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
028:         * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
029:         * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
030:         * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
031:         */
032:        // This class was generated by 172 StubGenerator.
033:        // Contents subject to change without notice.
034:        // @generated
035:        package example.serverscript.connector;
036:
037:        import javax.microedition.xml.rpc.ComplexType;
038:        import javax.microedition.xml.rpc.Element;
039:        import javax.microedition.xml.rpc.Operation;
040:        import javax.microedition.xml.rpc.Type;
041:
042:        import javax.xml.namespace.QName;
043:        import javax.xml.rpc.JAXRPCException;
044:
045:        public class Interface_Stub implements 
046:                example.serverscript.connector.Interface, javax.xml.rpc.Stub {
047:            // 
048:            //  End user methods
049:            // 
050:            protected static final QName _qname_String_1 = new QName("",
051:                    "String_1");
052:            protected static final QName _qname_String_2 = new QName("",
053:                    "String_2");
054:            protected static final QName _qname_result = new QName("", "result");
055:            protected static final QName _qname_request = new QName(
056:                    "http://serverscript.org/types", "request");
057:            protected static final QName _qname_requestResponse = new QName(
058:                    "http://serverscript.org/types", "requestResponse");
059:            protected static final QName _qname_wsdl_request = new QName(
060:                    "http://serverscript.org/wsdl", "request");
061:            protected static final Element _type_request;
062:            protected static final Element _type_requestResponse;
063:
064:            static {
065:                // Create all of the Type's that this stub uses, once.
066:                Element _type_String_1;
067:                _type_String_1 = new Element(_qname_String_1, Type.STRING, 1,
068:                        1, true);
069:
070:                Element _type_String_2;
071:                _type_String_2 = new Element(_qname_String_2, Type.STRING, 1,
072:                        1, true);
073:
074:                ComplexType _complexType_request;
075:                _complexType_request = new ComplexType();
076:                _complexType_request.elements = new Element[2];
077:                _complexType_request.elements[0] = _type_String_1;
078:                _complexType_request.elements[1] = _type_String_2;
079:                _type_request = new Element(_qname_request,
080:                        _complexType_request);
081:
082:                Element _type_result;
083:                _type_result = new Element(_qname_result, Type.STRING, 1, 1,
084:                        true);
085:
086:                ComplexType _complexType_requestResponse;
087:                _complexType_requestResponse = new ComplexType();
088:                _complexType_requestResponse.elements = new Element[1];
089:                _complexType_requestResponse.elements[0] = _type_result;
090:                _type_requestResponse = new Element(_qname_requestResponse,
091:                        _complexType_requestResponse);
092:            }
093:
094:            private String[] _propertyNames;
095:            private Object[] _propertyValues;
096:
097:            public Interface_Stub() {
098:                _propertyNames = new String[] { ENDPOINT_ADDRESS_PROPERTY };
099:                _propertyValues = new Object[] { "http://cds.cmsg.sun.com:80/serverscript/serverscript" };
100:            }
101:
102:            public void _setProperty(String name, Object value) {
103:                int size = _propertyNames.length;
104:
105:                for (int i = 0; i < size; ++i) {
106:                    if (_propertyNames[i].equals(name)) {
107:                        _propertyValues[i] = value;
108:
109:                        return;
110:                    }
111:                }
112:
113:                // Need to expand our array for a new property
114:                String[] newPropNames = new String[size + 1];
115:                System.arraycopy(_propertyNames, 0, newPropNames, 0, size);
116:                _propertyNames = newPropNames;
117:
118:                Object[] newPropValues = new Object[size + 1];
119:                System.arraycopy(_propertyValues, 0, newPropValues, 0, size);
120:                _propertyValues = newPropValues;
121:                _propertyNames[size] = name;
122:                _propertyValues[size] = value;
123:            }
124:
125:            public Object _getProperty(String name) {
126:                for (int i = 0; i < _propertyNames.length; ++i) {
127:                    if (_propertyNames[i].equals(name)) {
128:                        return _propertyValues[i];
129:                    }
130:                }
131:
132:                if (ENDPOINT_ADDRESS_PROPERTY.equals(name)
133:                        || USERNAME_PROPERTY.equals(name)
134:                        || PASSWORD_PROPERTY.equals(name)) {
135:                    return null;
136:                }
137:
138:                if (SESSION_MAINTAIN_PROPERTY.equals(name)) {
139:                    return new java.lang.Boolean(false);
140:                }
141:
142:                throw new JAXRPCException("Stub does not recognize property: "
143:                        + name);
144:            }
145:
146:            protected void _prepOperation(Operation op) {
147:                for (int i = 0; i < _propertyNames.length; ++i) {
148:                    op.setProperty(_propertyNames[i], _propertyValues[i]
149:                            .toString());
150:                }
151:            }
152:
153:            // 
154:            //  Begin user methods
155:            // 
156:            public java.lang.String request(java.lang.String string_1,
157:                    java.lang.String string_2) throws java.rmi.RemoteException {
158:                // Copy the incoming values into an Object array if needed.
159:                Object[] inputObject = new Object[2];
160:                inputObject[0] = string_1;
161:                inputObject[1] = string_2;
162:
163:                Operation op = Operation.newInstance(_qname_wsdl_request,
164:                        _type_request, _type_requestResponse);
165:                _prepOperation(op);
166:                op.setProperty(Operation.SOAPACTION_URI_PROPERTY, "");
167:
168:                Object resultObj;
169:
170:                try {
171:                    resultObj = op.invoke(inputObject);
172:                } catch (JAXRPCException e) {
173:                    Throwable cause = e.getLinkedCause();
174:
175:                    if (cause instanceof  java.rmi.RemoteException) {
176:                        throw (java.rmi.RemoteException) cause;
177:                    }
178:
179:                    throw e;
180:                }
181:
182:                java.lang.String result;
183:
184:                // Convert the result into the right Java type.
185:                // Unwrapped return value
186:                Object resultObj2 = ((Object[]) resultObj)[0];
187:                result = (java.lang.String) resultObj2;
188:
189:                return result;
190:            }
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.