Source Code Cross Referenced for DerivedGreeterImpl.java in  » Web-Services-apache-cxf-2.0.1 » testutils » org » apache » hello_world_soap_http » 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 apache cxf 2.0.1 » testutils » org.apache.hello_world_soap_http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Licensed to the Apache Software Foundation (ASF) under one
003:         * or more contributor license agreements. See the NOTICE file
004:         * distributed with this work for additional information
005:         * regarding copyright ownership. The ASF licenses this file
006:         * to you under the Apache License, Version 2.0 (the
007:         * "License"); you may not use this file except in compliance
008:         * with the License. You may obtain a copy of the License at
009:         *
010:         * http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         * Unless required by applicable law or agreed to in writing,
013:         * software distributed under the License is distributed on an
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         * KIND, either express or implied. See the License for the
016:         * specific language governing permissions and limitations
017:         * under the License.
018:         */package org.apache.hello_world_soap_http;
019:
020:        import java.rmi.RemoteException;
021:        import java.util.HashMap;
022:        import java.util.Map;
023:        import java.util.concurrent.Future;
024:        import java.util.logging.Logger;
025:
026:        import javax.xml.ws.AsyncHandler;
027:        import javax.xml.ws.Response;
028:
029:        import org.apache.hello_world_soap_http.types.BareDocumentResponse;
030:        import org.apache.hello_world_soap_http.types.GreetMeLaterResponse;
031:        import org.apache.hello_world_soap_http.types.GreetMeResponse;
032:        import org.apache.hello_world_soap_http.types.GreetMeSometimeResponse;
033:        import org.apache.hello_world_soap_http.types.SayHiResponse;
034:        import org.apache.hello_world_soap_http.types.TestDocLitFaultResponse;
035:        import org.apache.hello_world_soap_http.types.TestNillableResponse;
036:
037:        @javax.jws.WebService(name="Greeter",serviceName="SOAPService",targetNamespace="http://apache.org/hello_world_soap_http",wsdlLocation="tetutils/hello_world.wsdl")
038:        public class DerivedGreeterImpl implements  Greeter {
039:
040:            private static final Logger LOG = Logger
041:                    .getLogger(DerivedGreeterImpl.class.getName());
042:            private final Map<String, Integer> invocationCount = new HashMap<String, Integer>();
043:
044:            public DerivedGreeterImpl() {
045:                invocationCount.put("sayHi", 0);
046:                invocationCount.put("greetMe", 0);
047:                invocationCount.put("greetMeLater", 0);
048:                invocationCount.put("greetMeOneWay", 0);
049:                invocationCount.put("overloadedSayHi", 0);
050:            }
051:
052:            public int getInvocationCount(String method) {
053:                if (invocationCount.containsKey(method)) {
054:                    return invocationCount.get(method).intValue();
055:                } else {
056:                    System.out.println("No invocation count for method: "
057:                            + method);
058:                    return 0;
059:                }
060:            }
061:
062:            /**
063:             * overloaded method - present for test purposes
064:             */
065:            public String sayHi(String me) throws RemoteException {
066:                incrementInvocationCount("overloadedSayHi");
067:                return "Hi " + me + "!";
068:            }
069:
070:            @javax.jws.WebMethod(operationName="sayHi")
071:            /*
072:             * @javax.jws.WebResult(name="responseType",
073:             * targetNamespace="http://apache.org/hello_world_soap_http")
074:             */
075:            public String sayHi() {
076:                incrementInvocationCount("sayHi");
077:                return "Hi";
078:            }
079:
080:            public void testDocLitFault(String faultType)
081:                    throws BadRecordLitFault, NoSuchCodeLitFault {
082:            }
083:
084:            public Response<TestDocLitFaultResponse> testDocLitFaultAsync(
085:                    String faultType) {
086:                return null;
087:                /*not called */
088:            }
089:
090:            public Response<TestDocLitFaultResponse> testDocLitFaultAsync(
091:                    String faultType, AsyncHandler<TestDocLitFaultResponse> ah) {
092:                return null;
093:                /*not called */
094:            }
095:
096:            public String greetMe(String me) {
097:                incrementInvocationCount("greetMe");
098:                return "Bonjour " + me + "!";
099:            }
100:
101:            public String greetMeLater(long delay) {
102:                if (delay > 0) {
103:                    try {
104:                        Thread.sleep(delay);
105:                    } catch (InterruptedException ex) {
106:                        /// ignore
107:                    }
108:                }
109:                incrementInvocationCount("greetMeLater");
110:                return "Hello, finally!";
111:            }
112:
113:            public String greetMeSometime(String me) {
114:                incrementInvocationCount("greetMeSometime");
115:                return "Hello there " + me + "!";
116:            }
117:
118:            public Future<?> greetMeSometimeAsync(String requestType,
119:                    AsyncHandler<GreetMeSometimeResponse> asyncHandler) {
120:                return null;
121:                /* to be implemented */
122:            }
123:
124:            public Response<GreetMeSometimeResponse> greetMeSometimeAsync(
125:                    String requestType) {
126:                return null;
127:                /* to be implemented */
128:            }
129:
130:            public Future<?> greetMeAsync(String requestType,
131:                    AsyncHandler<GreetMeResponse> asyncHandler) {
132:                return null;
133:                /*not called */
134:            }
135:
136:            public Response<GreetMeResponse> greetMeAsync(String requestType) {
137:                return null;
138:                /*not called */
139:            }
140:
141:            public Future<?> greetMeLaterAsync(long requestType,
142:                    AsyncHandler<GreetMeLaterResponse> asyncHandler) {
143:                return null;
144:                /*not called */
145:            }
146:
147:            public Response<GreetMeLaterResponse> greetMeLaterAsync(
148:                    long requestType) {
149:                return null;
150:                /*not called */
151:            }
152:
153:            public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> asyncHandler) {
154:                return null;
155:                /*not called */
156:            }
157:
158:            public Response<SayHiResponse> sayHiAsync() {
159:                return null;
160:                /*not called */
161:            }
162:
163:            public Future<?> testDocLitBareAsync(String in,
164:                    AsyncHandler<BareDocumentResponse> asyncHandler) {
165:                return null;
166:                /*not called */
167:            }
168:
169:            public Response<BareDocumentResponse> testDocLitBareAsync(String in) {
170:                return null;
171:                /*not called */
172:            }
173:
174:            public void greetMeOneWay(String me) {
175:                incrementInvocationCount("greetMeOneWay");
176:            }
177:
178:            public BareDocumentResponse testDocLitBare(String in) {
179:                incrementInvocationCount("testDocLitBare");
180:                BareDocumentResponse res = new BareDocumentResponse();
181:                res.setCompany("CXF");
182:                res.setId(1);
183:                return res;
184:            }
185:
186:            private void incrementInvocationCount(String method) {
187:                LOG.info("Executing " + method);
188:                int n = invocationCount.get(method);
189:                invocationCount.put(method, n + 1);
190:            }
191:
192:            public String testNillable(String nillElem, int intElem) {
193:                // TODO Auto-generated method stub
194:                return null;
195:            }
196:
197:            public Response<TestNillableResponse> testNillableAsync(
198:                    String nillElem, int intElem) {
199:                return null;
200:            }
201:
202:            public Future<?> testNillableAsync(String nillElem, int intElem,
203:                    AsyncHandler<TestNillableResponse> asyncHandler) {
204:                return null;
205:            }
206:
207:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.