Source Code Cross Referenced for J2C_MyEIS_CustomerInfoProxy.java in  » Web-Services » wsif » com » myeis » customer » 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 » Web Services » wsif » com.myeis.customer 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.myeis.customer;
002:
003:        import org.apache.wsif.*;
004:        import org.apache.wsif.base.*;
005:
006:        import com.myeis.services.Customer;
007:
008:        import javax.xml.namespace.QName;
009:
010:        /**
011:         * J2C_MyEIS_CustomerInfoProxy
012:         * Generated code. Only edit user code sections.
013:         * @generated
014:         */
015:        public class J2C_MyEIS_CustomerInfoProxy {
016:            /**
017:             * @generated
018:             */
019:            private static final int INPUT_ONLY = 0;
020:            /**
021:             * @generated
022:             */
023:            private static final int REQUEST_RESPONSE = 1;
024:            /**
025:             * @generated
026:             */
027:            private WSIFPort fieldPort;
028:            /**
029:             * @generated
030:             */
031:            private WSIFService fieldService;
032:            /**
033:             * @generated
034:             */
035:            private static WSIFService fieldStaticService = null;
036:
037:            /**
038:             * getPort
039:             * @generated
040:             */
041:            public WSIFPort getPort() {
042:                return fieldPort;
043:            }
044:
045:            /**
046:             * setPort
047:             * @generated
048:             */
049:            public void setPort(WSIFPort newPort) {
050:                fieldPort = newPort;
051:            }
052:
053:            /**
054:             * getService
055:             * @generated
056:             */
057:            public WSIFService getService() {
058:                return fieldService;
059:            }
060:
061:            /**
062:             * setService
063:             * @generated
064:             */
065:            public void setService(WSIFService newService) {
066:                fieldService = newService;
067:            }
068:
069:            /**
070:             * getCustomer
071:             * @generated
072:             */
073:            public com.myeis.services.Customer getCustomer(
074:                    java.lang.String argNumber)
075:                    throws org.apache.wsif.WSIFException {
076:
077:                try {
078:
079:                    // user code begin {pre_execution}
080:                    // user code end
081:
082:                    WSIFDefaultMessage inputMessage = new WSIFDefaultMessage();
083:                    inputMessage.setObjectPart("number", argNumber);
084:
085:                    WSIFMessage outputMessage = execute("getCustomer",
086:                            "getCustomerRequest", "getCustomerResponse",
087:                            inputMessage, REQUEST_RESPONSE);
088:
089:                    // user code begin {post_execution}
090:                    // user code end
091:
092:                    return (com.myeis.services.Customer) outputMessage
093:                            .getObjectPart("result");
094:
095:                } catch (Exception e) {
096:                    // user code begin {exception_handling}
097:                    // user code end
098:                    if (e instanceof  org.apache.wsif.WSIFException)
099:                        throw (org.apache.wsif.WSIFException) e;
100:                    throw new org.apache.wsif.WSIFException(e.getMessage(), e);
101:                }
102:            }
103:
104:            /**
105:             * constructor
106:             * @generated
107:             */
108:            public J2C_MyEIS_CustomerInfoProxy() throws WSIFException {
109:
110:                // user code begin {custom_initialization}
111:                // user code end
112:
113:                if (this .fieldStaticService == null) {
114:
115:                    this .fieldStaticService = WSIFServiceFactory
116:                            .newInstance()
117:                            .getService(
118:                                    "com/myeis/customer/CustomerInfoMYEISService.wsdl",
119:                                    this .getClass().getClassLoader(),
120:                                    "http://customer.myeis.com/",
121:                                    "CustomerInfoMYEISService",
122:                                    "http://customer.myeis.com/",
123:                                    "CustomerInfo");
124:
125:                    if (this .fieldStaticService == null)
126:                        return;
127:
128:                    this .fieldStaticService.mapType(new QName(
129:                            "http://services.myeis.com/", "Customer"),
130:                            com.myeis.services.Customer.class);
131:
132:                    // user code begin {port_factory_setup}
133:                    // user code end
134:                }
135:            }
136:
137:            /**
138:             * main method (for proxy unit testing)
139:             * @generated
140:             */
141:            public static void main(String[] args) {
142:
143:                try {
144:
145:                    J2C_MyEIS_CustomerInfoProxy aProxy = new J2C_MyEIS_CustomerInfoProxy();
146:
147:                    // user code begin {proxy_method_calls}
148:                    String custNum = "33333";
149:                    Customer customer = aProxy.getCustomer(custNum);
150:                    System.out.println("Customer number: " + custNum);
151:                    System.out.println("Customer name:   "
152:                            + customer.getFirstName() + " "
153:                            + customer.getLastName());
154:
155:                    // user code end
156:
157:                } catch (Exception e) {
158:
159:                    // user code begin {exception_handling}
160:                    e.printStackTrace();
161:                    // user code end
162:                }
163:            }
164:
165:            /**
166:             * execute (base message-level execution)
167:             * @generated
168:             */
169:            public WSIFMessage execute(String operationName, String inputName,
170:                    String outputName, WSIFMessage aMessage, int operationType)
171:                    throws WSIFException, Exception {
172:
173:                WSIFPort port;
174:                if (this .fieldPort == null) {
175:                    if (this .fieldService == null)
176:                        this .fieldService = fieldStaticService;
177:                    if (this .fieldService == null)
178:                        throw new WSIFException(
179:                                "Failed to resolve WSIFService.");
180:                    port = this .fieldService.getPort("CustomerInfoMyEISPort");
181:                } else {
182:                    port = this .fieldPort;
183:                }
184:
185:                WSIFOperation operation = port.createOperation(operationName,
186:                        inputName, outputName);
187:
188:                WSIFMessage inputMessage = operation.createInputMessage();
189:
190:                String partName;
191:                java.util.Iterator iterator = aMessage.getPartNames();
192:                while (iterator.hasNext()) {
193:                    partName = (String) iterator.next();
194:                    inputMessage.setObjectPart(partName, aMessage
195:                            .getObjectPart(partName));
196:                }
197:
198:                WSIFMessage outputMessage = operation.createOutputMessage();
199:                WSIFMessage faultMessage = operation.createFaultMessage();
200:                boolean success = true;
201:                if (operationType == INPUT_ONLY)
202:                    operation.executeInputOnlyOperation(inputMessage);
203:                else if (operationType == REQUEST_RESPONSE)
204:                    success = operation.executeRequestResponseOperation(
205:                            inputMessage, outputMessage, faultMessage);
206:
207:                if (this .fieldPort == null)
208:                    port.close();
209:
210:                if (!success) {
211:                    java.util.Iterator i = faultMessage.getParts();
212:                    if (i.hasNext()) {
213:                        Object part = i.next();
214:                        if (part instanceof  Exception)
215:                            throw (Exception) part;
216:                        else
217:                            throw new WSIFException(String.valueOf(part));
218:                    }
219:                }
220:
221:                return outputMessage;
222:            }
223:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.