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


001:        /**
002:         * $Id: WebServiceDescriptorException.java,v 1.7 2003/08/13 12:23:01 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;
014:
015:        import java.io.PrintWriter;
016:        import java.io.StringWriter;
017:
018:        /**
019:         * The WebServiceDescriptorException is thrown from the WebServiceFactory
020:         * Class if some problem occured while creating the WebServiceDescriptor.
021:         *
022:         */
023:        public class WebServiceDescriptorException extends Exception {
024:
025:            public static final String INVALID_URL = "INVALID_URL";
026:            public static final String INVALID_WSDL = "INVALID_WSDL";
027:            public static final String UNSUPPORTED_WSDL = "UNSUPPORTED_WSDL";
028:            public static final String OTHER_ERROR = "OTHER_ERROR";
029:
030:            private Throwable targetThrowable = null;
031:            private String faultCode = null;
032:
033:            /**
034:             * Public Constructor.
035:             *
036:             * @param faultCode the WebServiceDescriptorException faultCode.
037:             * @param message the WebServiceDescriptorException message.
038:             * @param targetThrowable the target throwable for the WebServiceDescriptorException.
039:             */
040:            public WebServiceDescriptorException(String faultCode,
041:                    String message, Throwable targetThrowable) {
042:                super (message);
043:                this .faultCode = faultCode;
044:                this .targetThrowable = targetThrowable;
045:            }
046:
047:            /**
048:             * Public Constructor.
049:             * @param faultCode the WebServiceDescriptorException faultCode.
050:             * @param message the WebServiceDescriptorException message.
051:             */
052:            public WebServiceDescriptorException(String faultCode,
053:                    String message) {
054:                this (faultCode, message, null);
055:            }
056:
057:            /**
058:             * Gets the fault code associated with this Exception.
059:             *
060:             * @return the fault code.
061:             */
062:            public String getFaultCode() {
063:                return faultCode;
064:            }
065:
066:            /**
067:             * Gets the target Throwable associated with this Exception.
068:             *
069:             * @return the target Throwable.
070:             */
071:            public Throwable getTargetException() {
072:                return targetThrowable;
073:            }
074:
075:            /**
076:             * Gets the message associated with this Exception.
077:             *
078:             * @return the WebServiceDescriptorException message.
079:             */
080:            public String getMessage() {
081:                StringBuffer strBuf = new StringBuffer();
082:
083:                strBuf.append("WebServiceDescriptorException");
084:
085:                String this Msg = super .getMessage();
086:
087:                String targetMsg = (targetThrowable != null) ? targetThrowable
088:                        .getMessage() : null;
089:
090:                if (this Msg != null
091:                        && (targetMsg == null || !this Msg.equals(targetMsg))) {
092:                    strBuf.append(": " + this Msg);
093:                }
094:
095:                if (targetMsg != null) {
096:                    strBuf.append(": " + targetMsg);
097:                }
098:
099:                if (faultCode != null) {
100:                    strBuf.append("faultCode: " + faultCode);
101:                }
102:
103:                return strBuf.toString();
104:            }
105:
106:            /**
107:             * Gets the String representation for this Exception.
108:             *
109:             * @return the Exception String representation.
110:             */
111:            public String toString() {
112:                StringWriter sw = new StringWriter();
113:                PrintWriter pw = new PrintWriter(sw);
114:
115:                pw.print(getMessage() + ": ");
116:
117:                if (targetThrowable != null) {
118:                    targetThrowable.printStackTrace(pw);
119:                }
120:
121:                return sw.toString();
122:            }
123:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.