Source Code Cross Referenced for RPCLitImpl.java in  » Web-Services-AXIS2 » jax-ws » org » apache » axis2 » jaxws » proxy » rpclit » 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 AXIS2 » jax ws » org.apache.axis2.jaxws.proxy.rpclit 
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:         */
019:        package org.apache.axis2.jaxws.proxy.rpclit;
020:
021:        import java.math.BigInteger;
022:
023:        import javax.jws.WebService;
024:        import javax.xml.bind.annotation.XmlList;
025:        import javax.xml.datatype.DatatypeConstants;
026:        import javax.xml.datatype.DatatypeFactory;
027:        import javax.xml.datatype.XMLGregorianCalendar;
028:        import javax.xml.namespace.QName;
029:        import javax.xml.ws.Holder;
030:
031:        import org.apache.axis2.jaxws.proxy.rpclit.sei.RPCFault;
032:        import org.apache.axis2.jaxws.proxy.rpclit.sei.RPCLit;
033:        import org.apache.axis2.jaxws.TestLogger;
034:        import org.test.proxy.rpclit.ComplexAll;
035:        import org.test.proxy.rpclit.Enum;
036:
037:        /**
038:         * 
039:         *
040:         */
041:        @WebService(targetNamespace="http://org/apache/axis2/jaxws/proxy/rpclit",endpointInterface="org.apache.axis2.jaxws.proxy.rpclit.sei.RPCLit")
042:        public class RPCLitImpl implements  RPCLit {
043:
044:            public static DatatypeFactory df;
045:            public static XMLGregorianCalendar bday;
046:            public static XMLGregorianCalendar holiday;
047:            public static BigInteger bigInt1 = new BigInteger("1");
048:            public static BigInteger bigInt2 = new BigInteger("2");
049:            public static QName qname1 = new QName("urn://sample", "hello");
050:            public static QName qname2 = new QName("urn://sample", "world");
051:
052:            static {
053:                try {
054:                    df = DatatypeFactory.newInstance();
055:                    bday = df.newXMLGregorianCalendarDate(1964, 12, 3,
056:                            DatatypeConstants.FIELD_UNDEFINED);
057:                    holiday = bday = df.newXMLGregorianCalendarDate(2007, 1, 1,
058:                            DatatypeConstants.FIELD_UNDEFINED);
059:                } catch (Exception e) {
060:                }
061:            }
062:
063:            /**
064:             * Echo the input
065:             */
066:            public String testSimple(String simpleIn) {
067:                assertTrue(simpleIn != null); // According to JAX-WS an RPC service should never receive a null
068:
069:                // Test to ensure that returning null causes the proper exception 
070:                if (simpleIn.contains("returnNull")) {
071:                    return null;
072:                }
073:                return simpleIn;
074:            }
075:
076:            /**
077:             * Echo the input
078:             */
079:            public String testSimple2(String simple2In1, String simple2In2) {
080:                return simple2In1 + simple2In2;
081:            }
082:
083:            public QName[] testLists(QName[] qNames,
084:                    XMLGregorianCalendar[] calendars, String[] texts,
085:                    BigInteger[] bigInts, Long[] longs, Enum[] enums,
086:                    String[] text2, ComplexAll all) {
087:                assertTrue(qNames.length == 2);
088:                assertTrue(qNames[0].equals(qname1));
089:                assertTrue(qNames[1].equals(qname2));
090:
091:                return qNames;
092:            }
093:
094:            public XMLGregorianCalendar[] testCalendarList1(
095:                    XMLGregorianCalendar[] cals) {
096:                assertTrue(cals.length == 2);
097:                assertTrue(cals[0].compare(bday) == 0);
098:                assertTrue(cals[1].compare(holiday) == 0);
099:                return cals;
100:
101:            }
102:
103:            public String[] testStringList2(String[] arg20) {
104:
105:                assertTrue(arg20.length == 2);
106:                assertTrue(arg20[0].equals("Hello"));
107:                assertTrue(arg20[1].equals("World"));
108:                return arg20;
109:            }
110:
111:            public BigInteger[] testBigIntegerList3(BigInteger[] arg30) {
112:                assertTrue(arg30.length == 2);
113:                assertTrue(arg30[0].compareTo(bigInt1) == 0);
114:                assertTrue(arg30[1].compareTo(bigInt2) == 0);
115:                return arg30;
116:            }
117:
118:            public Long[] testLongList4(Long[] longs) {
119:                assertTrue(longs.length == 3);
120:                assertTrue(longs[0] == 0);
121:                assertTrue(longs[1] == 1);
122:                assertTrue(longs[2] == 2);
123:                return longs;
124:            }
125:
126:            public Enum[] testEnumList5(Enum[] enums) {
127:                assertTrue(enums.length == 3);
128:                assertTrue(enums[0] == Enum.ONE);
129:                assertTrue(enums[1] == Enum.TWO);
130:                assertTrue(enums[2] == Enum.THREE);
131:                return enums;
132:            }
133:
134:            public ComplexAll testComplexAll6(ComplexAll arg60) {
135:                // TODO Auto-generated method stub
136:                return null;
137:            }
138:
139:            public String[] testEnumList7(String[] arg70) {
140:                assertTrue(arg70.length == 2);
141:                assertTrue(arg70[0].equals("Apple"));
142:                assertTrue(arg70[0].equals("Orange"));
143:                return arg70;
144:            }
145:
146:            private void assertTrue(boolean value) throws RuntimeException {
147:                if (!value) {
148:                    RuntimeException re = new RuntimeException();
149:                    TestLogger.logger.debug("Test FAILURE=" + re);
150:                    throw re;
151:                }
152:            }
153:
154:            public String testHeader(String bodyParam, String headerParam) {
155:                return bodyParam + headerParam;
156:            }
157:
158:            public void testFault() throws RPCFault {
159:                throw new RPCFault("Throw RPCFault", 123);
160:            }
161:
162:            public String testSimpleInOut(Holder<String> simpleInOut) {
163:                return simpleInOut.value;
164:            }
165:
166:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.