You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by sv...@apache.org on 2005/03/21 04:45:10 UTC
cvs commit: ws-juddi/src/java/org/apache/juddi/datatype/response Result.java
sviens 2005/03/20 19:45:10
Modified: src/java/org/apache/juddi/error
AuthTokenRequiredException.java
MessageTooLargeException.java
InvalidProjectionException.java
AssertionNotFoundException.java
InvalidURLPassedException.java
NameTooLongException.java
UnrecognizedVersionException.java
InvalidCategoryException.java
PublisherCancelledException.java
InvalidTimeException.java
TransferAbortedException.java
ResultSetTooLargeException.java
TooManyOptionsException.java
UserMismatchException.java
LanguageErrorException.java
FatalErrorException.java RegistryException.java
AccountLimitExceededException.java
ValueNotAllowedException.java
RequestTimeoutException.java
RequestDeniedException.java
UnknownUserException.java
AuthTokenExpiredException.java
InvalidCompletionStatusException.java
CategorizationNotAllowedException.java
InvalidValueException.java
UnvalidatableException.java
SecretUnknownException.java
KeyRetiredException.java UnsupportedException.java
OperatorMismatchException.java
InvalidKeyPassedException.java BusyException.java
src/java/org/apache/juddi/handler
RegistryExceptionHandler.java
DispositionReportHandler.java
src/java/org/apache/juddi/function
DiscardAuthTokenFunction.java
DeleteTModelFunction.java
DeleteServiceFunction.java
DeletePublisherFunction.java
DeleteSubscriptionFunction.java
AddPublisherAssertionsFunction.java
DeletePublisherAssertionsFunction.java
DeleteBindingFunction.java
DeleteBusinessFunction.java
ValidateValuesFunction.java
src/java/org/apache/juddi/registry RegistryServlet.java
src/java/org/apache/juddi/transport/axis AxisProcessor.java
src/java/org/apache/juddi/datatype/response Result.java
Log:
Implement internationalization support. Also fix for bug# JUDDI-68 - ErrInfo element not found in E_success messages.
Revision Changes Path
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/AuthTokenRequiredException.java
Index: AuthTokenRequiredException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/AuthTokenRequiredException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AuthTokenRequiredException.java 29 May 2004 01:29:00 -0000 1.3
+++ AuthTokenRequiredException.java 21 Mar 2005 03:45:06 -0000 1.4
@@ -26,21 +26,6 @@
{
public AuthTokenRequiredException(String msg)
{
- super(Result.E_AUTH_TOKEN_REQUIRED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_AUTH_TOKEN_REQUIRED_MSG;
-
- Result result = new Result(
- Result.E_AUTH_TOKEN_REQUIRED,
- Result.E_AUTH_TOKEN_REQUIRED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_AUTH_TOKEN_REQUIRED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/MessageTooLargeException.java
Index: MessageTooLargeException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/MessageTooLargeException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MessageTooLargeException.java 29 May 2004 01:29:00 -0000 1.3
+++ MessageTooLargeException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public MessageTooLargeException(String msg)
{
- super(Result.E_MESSAGE_TOO_LARGE_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_MESSAGE_TOO_LARGE_MSG;
-
- Result result = new Result(
- Result.E_MESSAGE_TOO_LARGE,
- Result.E_MESSAGE_TOO_LARGE_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_MESSAGE_TOO_LARGE,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/InvalidProjectionException.java
Index: InvalidProjectionException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/InvalidProjectionException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InvalidProjectionException.java 29 May 2004 01:29:00 -0000 1.3
+++ InvalidProjectionException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public InvalidProjectionException(String msg)
{
- super(Result.E_INVALID_PROJECTION_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_INVALID_PROJECTION_MSG;
-
- Result result = new Result(
- Result.E_INVALID_PROJECTION,
- Result.E_INVALID_PROJECTION_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_INVALID_PROJECTION,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/AssertionNotFoundException.java
Index: AssertionNotFoundException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/AssertionNotFoundException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AssertionNotFoundException.java 29 May 2004 01:29:00 -0000 1.3
+++ AssertionNotFoundException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public AssertionNotFoundException(String msg)
{
- super(Result.E_ASSERTION_NOT_FOUND_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_ASSERTION_NOT_FOUND_MSG;
-
- Result result = new Result(
- Result.E_ASSERTION_NOT_FOUND,
- Result.E_ASSERTION_NOT_FOUND_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_ASSERTION_NOT_FOUND,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/InvalidURLPassedException.java
Index: InvalidURLPassedException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/InvalidURLPassedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InvalidURLPassedException.java 29 May 2004 01:29:00 -0000 1.3
+++ InvalidURLPassedException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -27,21 +27,6 @@
{
public InvalidURLPassedException(String msg)
{
- super(Result.E_INVALID_URL_PASSED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_INVALID_URL_PASSED_MSG;
-
- Result result = new Result(
- Result.E_INVALID_URL_PASSED,
- Result.E_INVALID_URL_PASSED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_INVALID_URL_PASSED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/NameTooLongException.java
Index: NameTooLongException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/NameTooLongException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NameTooLongException.java 29 May 2004 01:29:00 -0000 1.3
+++ NameTooLongException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public NameTooLongException(String msg)
{
- super(Result.E_NAME_TOO_LONG_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_NAME_TOO_LONG_MSG;
-
- Result result = new Result(
- Result.E_NAME_TOO_LONG,
- Result.E_NAME_TOO_LONG_CODE,
- errMsg);
-
- this.setFaultActor("abc");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_NAME_TOO_LONG,msg);
}
}
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/UnrecognizedVersionException.java
Index: UnrecognizedVersionException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/UnrecognizedVersionException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnrecognizedVersionException.java 29 May 2004 01:29:00 -0000 1.3
+++ UnrecognizedVersionException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public UnrecognizedVersionException(String msg)
{
- super(Result.E_UNRECOGNIZED_VERSION_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_UNRECOGNIZED_VERSION_MSG;
-
- Result result = new Result(
- Result.E_UNRECOGNIZED_VERSION,
- Result.E_UNRECOGNIZED_VERSION_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_UNRECOGNIZED_VERSION,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/InvalidCategoryException.java
Index: InvalidCategoryException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/InvalidCategoryException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InvalidCategoryException.java 29 May 2004 01:29:00 -0000 1.3
+++ InvalidCategoryException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public InvalidCategoryException(String msg)
{
- super(Result.E_INVALID_CATEGORY_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_INVALID_CATEGORY_MSG;
-
- Result result = new Result(
- Result.E_INVALID_CATEGORY,
- Result.E_INVALID_CATEGORY_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_INVALID_CATEGORY,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/PublisherCancelledException.java
Index: PublisherCancelledException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/PublisherCancelledException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PublisherCancelledException.java 29 May 2004 01:29:00 -0000 1.3
+++ PublisherCancelledException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public PublisherCancelledException(String msg)
{
- super(Result.E_PUBLISHER_CANCELLED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_PUBLISHER_CANCELLED_MSG;
-
- Result result = new Result(
- Result.E_PUBLISHER_CANCELLED,
- Result.E_PUBLISHER_CANCELLED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_PUBLISHER_CANCELLED,msg);
}
}
\ No newline at end of file
1.2 +1 -16 ws-juddi/src/java/org/apache/juddi/error/InvalidTimeException.java
Index: InvalidTimeException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/InvalidTimeException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvalidTimeException.java 27 May 2004 01:44:11 -0000 1.1
+++ InvalidTimeException.java 21 Mar 2005 03:45:07 -0000 1.2
@@ -26,21 +26,6 @@
{
public InvalidTimeException(String msg)
{
- super(Result.E_INVALID_TIME_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_INVALID_TIME_MSG;
-
- Result result = new Result(
- Result.E_INVALID_TIME,
- Result.E_INVALID_TIME_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_INVALID_TIME,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/TransferAbortedException.java
Index: TransferAbortedException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/TransferAbortedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TransferAbortedException.java 29 May 2004 01:29:00 -0000 1.3
+++ TransferAbortedException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public TransferAbortedException(String msg)
{
- super(Result.E_TRANSFER_ABORTED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_TRANSFER_ABORTED_MSG;
-
- Result result = new Result(
- Result.E_TRANSFER_ABORTED,
- Result.E_TRANSFER_ABORTED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_TRANSFER_ABORTED,msg);
}
}
\ No newline at end of file
1.2 +1 -16 ws-juddi/src/java/org/apache/juddi/error/ResultSetTooLargeException.java
Index: ResultSetTooLargeException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/ResultSetTooLargeException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ResultSetTooLargeException.java 27 May 2004 01:44:11 -0000 1.1
+++ ResultSetTooLargeException.java 21 Mar 2005 03:45:07 -0000 1.2
@@ -26,21 +26,6 @@
{
public ResultSetTooLargeException(String msg)
{
- super(Result.E_RESULT_SET_TOO_LARGE_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_RESULT_SET_TOO_LARGE_MSG;
-
- Result result = new Result(
- Result.E_RESULT_SET_TOO_LARGE,
- Result.E_RESULT_SET_TOO_LARGE_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_RESULT_SET_TOO_LARGE,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/TooManyOptionsException.java
Index: TooManyOptionsException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/TooManyOptionsException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TooManyOptionsException.java 29 May 2004 01:29:00 -0000 1.3
+++ TooManyOptionsException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public TooManyOptionsException(String msg)
{
- super(Result.E_TOO_MANY_OPTIONS_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_TOO_MANY_OPTIONS_MSG;
-
- Result result = new Result(
- Result.E_TOO_MANY_OPTIONS,
- Result.E_TOO_MANY_OPTIONS_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_TOO_MANY_OPTIONS,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/UserMismatchException.java
Index: UserMismatchException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/UserMismatchException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UserMismatchException.java 29 May 2004 01:29:00 -0000 1.3
+++ UserMismatchException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public UserMismatchException(String msg)
{
- super(Result.E_USER_MISMATCH_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_USER_MISMATCH_MSG;
-
- Result result = new Result(
- Result.E_USER_MISMATCH,
- Result.E_USER_MISMATCH_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_USER_MISMATCH,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/LanguageErrorException.java
Index: LanguageErrorException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/LanguageErrorException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LanguageErrorException.java 29 May 2004 01:29:00 -0000 1.3
+++ LanguageErrorException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public LanguageErrorException(String msg)
{
- super(Result.E_LANGUAGE_ERROR_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_LANGUAGE_ERROR_MSG;
-
- Result result = new Result(
- Result.E_LANGUAGE_ERROR,
- Result.E_LANGUAGE_ERROR_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_LANGUAGE_ERROR,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/FatalErrorException.java
Index: FatalErrorException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/FatalErrorException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FatalErrorException.java 29 May 2004 01:29:00 -0000 1.3
+++ FatalErrorException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public FatalErrorException(String msg)
{
- super(Result.E_FATAL_ERROR_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_FATAL_ERROR_MSG;
-
- Result result = new Result(
- Result.E_FATAL_ERROR,
- Result.E_FATAL_ERROR_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Server",Result.E_FATAL_ERROR,msg);
}
}
\ No newline at end of file
1.3 +140 -52 ws-juddi/src/java/org/apache/juddi/error/RegistryException.java
Index: RegistryException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/RegistryException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RegistryException.java 11 Mar 2004 18:06:14 -0000 1.2
+++ RegistryException.java 21 Mar 2005 03:45:07 -0000 1.3
@@ -15,11 +15,8 @@
*/
package org.apache.juddi.error;
-import java.util.Vector;
-
import org.apache.juddi.datatype.RegistryObject;
import org.apache.juddi.datatype.response.DispositionReport;
-import org.apache.juddi.datatype.response.ErrInfo;
import org.apache.juddi.datatype.response.Result;
/**
@@ -42,37 +39,75 @@
private DispositionReport dispReport;
/**
- * Constructs an empty UDDIException instance.
+ * Constructs a RegistryException instance.
+ * @param msg additional error information
*/
- public RegistryException()
+ public RegistryException(String msg)
{
- super();
+ super(msg);
+
+ setFaultCode(null);
+ setFaultString(msg);
+ setFaultActor(null);
}
/**
- * Constructs a UDDIException instance.
- * @param msg additional error information
+ * Constructs a RegistryException instance.
+ * @param ex the original exception
*/
- public RegistryException(String msg)
+ public RegistryException(Exception ex)
{
- super(msg);
+ super(ex);
+
+ if (ex != null)
+ {
+ // Not sure why this would ever happen but
+ // just in case we are asked to create a new
+ // RegistryException using values from another
+ // let's be sure to grab all relevant values.
+ //
+ if (ex instanceof RegistryException)
+ {
+ RegistryException regex = (RegistryException)ex;
+ setFaultCode(regex.getFaultCode());
+ setFaultString(regex.getFaultString());
+ setFaultActor(regex.getFaultActor());
+ setDispositionReport(regex.getDispositionReport());
+ }
+ else // Not a RegistryException (or subclass)
+ {
+ setFaultString(ex.getMessage());
+ }
+ }
+ }
+
+ /**
+ * Constructs a RegistryException instance.
+ * @param ex the original exception
+ */
+ public RegistryException(String fCode,String fString,String fActor,DispositionReport dispRpt)
+ {
+ super(fString);
- this.setFaultActor(null);
- this.setFaultCode(null);
- this.setFaultString(msg);
+ setFaultCode(fCode);
+ setFaultString(fString);
+ setFaultActor(fActor);
+ setDispositionReport(dispRpt);
}
/**
- * Constructs a UDDIException instance.
+ * Constructs a RegistryException instance.
* @param ex the original exception
*/
- public RegistryException(Exception ex)
+ RegistryException(String fCode,int errno,String msg)
{
- super(ex.getMessage());
+ super(buildMessage(errno,msg));
+
+ String errCode = Result.lookupErrCode(errno);
- this.setFaultActor(null);
- this.setFaultCode(null);
- this.setFaultString(ex.getMessage());
+ setFaultCode(fCode);
+ setFaultString(getMessage());
+ addResult(new Result(errno,errCode,getMessage()));
}
/**
@@ -167,42 +202,44 @@
*/
public String toString()
{
- StringBuffer buff = new StringBuffer(100);
-
- buff.append("RegistryException: "+getMessage()+"\n");
- buff.append(" SOAPFault Actor: "+getFaultActor()+"\n");
- buff.append(" SOAPFault Code: "+getFaultCode()+"\n");
- buff.append(" SOAPFault String: "+getFaultString()+"\n");
-
- // pull the DispositionReport out if it's present
- DispositionReport dispRpt = getDispositionReport();
- if (dispRpt != null)
+ String msg = getMessage();
+ if (msg == null)
+ return "";
+ else
+ return getMessage();
+ }
+
+ private static final String buildMessage(int errno,String msg)
+ {
+ StringBuffer buffer = new StringBuffer();
+
+ String errCode = Result.lookupErrCode(errno);
+ if (errCode != null)
{
- buff.append(" Operator: "+dispRpt.getOperator()+"\n");
-
- Vector results = dispRpt.getResultVector();
- if ((results != null) && (results.size() > 0))
- {
- for (int i=0; i<results.size(); i++)
- {
- Result result = (Result)results.elementAt(i);
- buff.append(" >Errno: "+result.getErrno()+"\n");
-
- ErrInfo errInfo = result.getErrInfo();
- buff.append(" >Error Code: "+errInfo.getErrCode()+"\n");
- buff.append(" >Error Info Text: "+errInfo.getErrMsg()+"\n");
- }
- }
- else
- buff.append("\n >[No Results were present]");
+ buffer.append(errCode);
+ buffer.append(" ");
}
- else
- buff.append("\n [A DispositionReport was not present]");
-
- return buff.toString();
+
+ buffer.append("(");
+ buffer.append(errno);
+ buffer.append(") ");
+
+ String errText = Result.lookupErrText(errno);
+ if (errText != null)
+ {
+ buffer.append(errText);
+ buffer.append(" ");
+ }
+
+ if ((msg != null) && (msg.trim().length() > 0))
+ {
+ buffer.append(msg);
+ }
+
+ return buffer.toString();
}
-
+
/***************************************************************************/
/***************************** TEST DRIVER *********************************/
/***************************************************************************/
@@ -211,6 +248,57 @@
public static void main(String[] args)
throws RegistryException
{
- throw new UnsupportedException("Additional error information.");
+ System.out.println(new AccountLimitExceededException("Additional error information."));
+ System.out.println(new AssertionNotFoundException("Additional error information."));
+ System.out.println(new AuthTokenExpiredException("Additional error information."));
+ System.out.println(new AuthTokenRequiredException("Additional error information."));
+ System.out.println(new BusyException("Additional error information."));
+ System.out.println(new CategorizationNotAllowedException("Additional error information."));
+ System.out.println(new FatalErrorException("Additional error information."));
+ System.out.println(new InvalidCategoryException("Additional error information."));
+ System.out.println(new InvalidCompletionStatusException("Additional error information."));
+ System.out.println(new InvalidKeyPassedException("Additional error information."));
+ System.out.println(new InvalidProjectionException("Additional error information."));
+ System.out.println(new InvalidTimeException("Additional error information."));
+ System.out.println(new InvalidURLPassedException("Additional error information."));
+ System.out.println(new InvalidValueException("Additional error information."));
+ System.out.println(new KeyRetiredException("Additional error information."));
+ System.out.println(new LanguageErrorException("Additional error information."));
+ System.out.println(new MessageTooLargeException("Additional error information."));
+ System.out.println(new NameTooLongException("Additional error information."));
+ System.out.println(new OperatorMismatchException("Additional error information."));
+ System.out.println(new PublisherCancelledException("Additional error information."));
+ System.out.println(new RequestDeniedException("Additional error information."));
+ System.out.println(new RequestTimeoutException("Additional error information."));
+ System.out.println(new ResultSetTooLargeException("Additional error information."));
+ System.out.println(new SecretUnknownException("Additional error information."));
+ System.out.println(new TooManyOptionsException("Additional error information."));
+ System.out.println(new TransferAbortedException("Additional error information."));
+ System.out.println(new UnknownUserException("Additional error information."));
+ System.out.println(new UnknownUserException("Additional error information."));
+ System.out.println(new UnrecognizedVersionException("Additional error information."));
+ System.out.println(new UnsupportedException("Additional error information."));
+ System.out.println(new UnvalidatableException("Additional error information."));
+ System.out.println(new UserMismatchException("Additional error information."));
+ System.out.println(new ValueNotAllowedException("Additional error information."));
+
+ System.out.println("\n----- RegistryException(String) -----");
+
+ System.out.println(new RegistryException((String)null));
+ System.out.println(new RegistryException("Additional error information."));
+
+ System.out.println("\n----- RegistryException(Exception) -----");
+
+ System.out.println(new RegistryException((Exception)null));
+ System.out.println(new RegistryException((Exception)new Exception("Additional error information.")));
+ System.out.println(new RegistryException((Exception)new RegistryException("Additional error information.")));
+ System.out.println(new RegistryException((Exception)new UnknownUserException("Additional error information.")));
+
+ System.out.println("\n----- RegistryException(FaultCode,errno,String) -----");
+
+ System.out.println(new RegistryException(null,-1,null));
+ System.out.println(new RegistryException("Server",-1,null));
+ System.out.println(new RegistryException("Server",Result.E_BUSY,null));
+ System.out.println(new RegistryException("Server",Result.E_BUSY,"Additional error information."));
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/AccountLimitExceededException.java
Index: AccountLimitExceededException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/AccountLimitExceededException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AccountLimitExceededException.java 29 May 2004 01:29:00 -0000 1.3
+++ AccountLimitExceededException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public AccountLimitExceededException(String msg)
{
- super(Result.E_ACCOUNT_LIMIT_EXCEEDED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_ACCOUNT_LIMIT_EXCEEDED_MSG;
-
- Result result = new Result(
- Result.E_ACCOUNT_LIMIT_EXCEEDED,
- Result.E_ACCOUNT_LIMIT_EXCEEDED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_ACCOUNT_LIMIT_EXCEEDED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/ValueNotAllowedException.java
Index: ValueNotAllowedException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/ValueNotAllowedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ValueNotAllowedException.java 29 May 2004 01:29:00 -0000 1.3
+++ ValueNotAllowedException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public ValueNotAllowedException(String msg)
{
- super(Result.E_VALUE_NOT_ALLOWED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_VALUE_NOT_ALLOWED_MSG;
-
- Result result = new Result(
- Result.E_VALUE_NOT_ALLOWED,
- Result.E_VALUE_NOT_ALLOWED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_VALUE_NOT_ALLOWED,msg);
}
}
\ No newline at end of file
1.2 +1 -6 ws-juddi/src/java/org/apache/juddi/error/RequestTimeoutException.java
Index: RequestTimeoutException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/RequestTimeoutException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RequestTimeoutException.java 20 Mar 2005 22:37:01 -0000 1.1
+++ RequestTimeoutException.java 21 Mar 2005 03:45:07 -0000 1.2
@@ -26,11 +26,6 @@
{
public RequestTimeoutException(String msg)
{
- super(
- "Client", // SOAP faultCode
- Result.E_REQUEST_TIMEOUT_NMBR, // UDDI errno
- Result.E_REQUEST_TIMEOUT_CODE, // UDDI errInfo errCode
- Result.E_REQUEST_TIMEOUT_TEXT, // UDDI errInfo text
- msg);
+ super("Client",Result.E_REQUEST_TIMEOUT,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/RequestDeniedException.java
Index: RequestDeniedException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/RequestDeniedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RequestDeniedException.java 29 May 2004 01:29:00 -0000 1.3
+++ RequestDeniedException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public RequestDeniedException(String msg)
{
- super(Result.E_REQUEST_DENIED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_REQUEST_DENIED_MSG;
-
- Result result = new Result(
- Result.E_REQUEST_DENIED,
- Result.E_REQUEST_DENIED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_REQUEST_DENIED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/UnknownUserException.java
Index: UnknownUserException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/UnknownUserException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnknownUserException.java 29 May 2004 01:29:00 -0000 1.3
+++ UnknownUserException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public UnknownUserException(String msg)
{
- super(Result.E_UNKNOWN_USER_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_UNKNOWN_USER_MSG;
-
- Result result = new Result(
- Result.E_UNKNOWN_USER,
- Result.E_UNKNOWN_USER_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_UNKNOWN_USER,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/AuthTokenExpiredException.java
Index: AuthTokenExpiredException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/AuthTokenExpiredException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AuthTokenExpiredException.java 29 May 2004 01:29:00 -0000 1.3
+++ AuthTokenExpiredException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public AuthTokenExpiredException(String msg)
{
- super(Result.E_AUTH_TOKEN_EXPIRED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_AUTH_TOKEN_EXPIRED_MSG;
-
- Result result = new Result(
- Result.E_AUTH_TOKEN_EXPIRED,
- Result.E_AUTH_TOKEN_EXPIRED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_AUTH_TOKEN_EXPIRED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/InvalidCompletionStatusException.java
Index: InvalidCompletionStatusException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/InvalidCompletionStatusException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InvalidCompletionStatusException.java 29 May 2004 01:29:00 -0000 1.3
+++ InvalidCompletionStatusException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public InvalidCompletionStatusException(String msg)
{
- super(Result.E_INVALID_COMPLETION_STATUS_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_INVALID_COMPLETION_STATUS_MSG;
-
- Result result = new Result(
- Result.E_INVALID_COMPLETION_STATUS,
- Result.E_INVALID_COMPLETION_STATUS_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_INVALID_COMPLETION_STATUS,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/CategorizationNotAllowedException.java
Index: CategorizationNotAllowedException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/CategorizationNotAllowedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CategorizationNotAllowedException.java 29 May 2004 01:29:00 -0000 1.3
+++ CategorizationNotAllowedException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -28,21 +28,6 @@
{
public CategorizationNotAllowedException(String msg)
{
- super(Result.E_CATEGORIZATION_NOT_ALLOWED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_CATEGORIZATION_NOT_ALLOWED_MSG;
-
- Result result = new Result(
- Result.E_CATEGORIZATION_NOT_ALLOWED,
- Result.E_CATEGORIZATION_NOT_ALLOWED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_CATEGORIZATION_NOT_ALLOWED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/InvalidValueException.java
Index: InvalidValueException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/InvalidValueException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InvalidValueException.java 29 May 2004 01:29:00 -0000 1.3
+++ InvalidValueException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public InvalidValueException(String msg)
{
- super(Result.E_INVALID_VALUE_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_INVALID_VALUE_MSG;
-
- Result result = new Result(
- Result.E_INVALID_VALUE,
- Result.E_INVALID_VALUE_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_INVALID_VALUE,msg);
}
}
\ No newline at end of file
1.2 +1 -6 ws-juddi/src/java/org/apache/juddi/error/UnvalidatableException.java
Index: UnvalidatableException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/UnvalidatableException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- UnvalidatableException.java 20 Mar 2005 22:37:01 -0000 1.1
+++ UnvalidatableException.java 21 Mar 2005 03:45:07 -0000 1.2
@@ -26,11 +26,6 @@
{
public UnvalidatableException(String msg)
{
- super(
- "Client", // SOAP faultCode
- Result.E_UNVALIDATABLE_NMBR, // UDDI errno
- Result.E_UNVALIDATABLE_CODE, // UDDI errInfo errCode
- Result.E_UNVALIDATABLE_TEXT, // UDDI errInfo text
- msg);
+ super("Client",Result.E_UNVALIDATABLE,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/SecretUnknownException.java
Index: SecretUnknownException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/SecretUnknownException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SecretUnknownException.java 29 May 2004 01:29:00 -0000 1.3
+++ SecretUnknownException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public SecretUnknownException(String msg)
{
- super(Result.E_SECRET_UNKNOWN_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_SECRET_UNKNOWN_MSG;
-
- Result result = new Result(
- Result.E_SECRET_UNKNOWN,
- Result.E_SECRET_UNKNOWN_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_SECRET_UNKNOWN,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/KeyRetiredException.java
Index: KeyRetiredException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/KeyRetiredException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- KeyRetiredException.java 29 May 2004 01:29:00 -0000 1.3
+++ KeyRetiredException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -28,21 +28,6 @@
{
public KeyRetiredException(String msg)
{
- super(Result.E_KEY_RETIRED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_KEY_RETIRED_MSG;
-
- Result result = new Result(
- Result.E_KEY_RETIRED,
- Result.E_KEY_RETIRED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_KEY_RETIRED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/UnsupportedException.java
Index: UnsupportedException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/UnsupportedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- UnsupportedException.java 29 May 2004 01:29:00 -0000 1.3
+++ UnsupportedException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public UnsupportedException(String msg)
{
- super(Result.E_UNSUPPORTED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_UNSUPPORTED_MSG;
-
- Result result = new Result(
- Result.E_UNSUPPORTED,
- Result.E_UNSUPPORTED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_UNSUPPORTED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/OperatorMismatchException.java
Index: OperatorMismatchException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/OperatorMismatchException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- OperatorMismatchException.java 29 May 2004 01:29:00 -0000 1.3
+++ OperatorMismatchException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -28,21 +28,6 @@
{
public OperatorMismatchException(String msg)
{
- super(Result.E_OPERATOR_MISMATCH_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_OPERATOR_MISMATCH_MSG;
-
- Result result = new Result(
- Result.E_OPERATOR_MISMATCH,
- Result.E_OPERATOR_MISMATCH_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_OPERATOR_MISMATCH,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/InvalidKeyPassedException.java
Index: InvalidKeyPassedException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/InvalidKeyPassedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InvalidKeyPassedException.java 29 May 2004 01:29:00 -0000 1.3
+++ InvalidKeyPassedException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -26,21 +26,6 @@
{
public InvalidKeyPassedException(String msg)
{
- super(Result.E_INVALID_KEY_PASSED_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_INVALID_KEY_PASSED_MSG;
-
- Result result = new Result(
- Result.E_INVALID_KEY_PASSED,
- Result.E_INVALID_KEY_PASSED_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Client",Result.E_INVALID_KEY_PASSED,msg);
}
}
\ No newline at end of file
1.4 +1 -16 ws-juddi/src/java/org/apache/juddi/error/BusyException.java
Index: BusyException.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/error/BusyException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BusyException.java 29 May 2004 01:29:00 -0000 1.3
+++ BusyException.java 21 Mar 2005 03:45:07 -0000 1.4
@@ -29,21 +29,6 @@
*/
public BusyException(String msg)
{
- super(Result.E_BUSY_CODE+": "+msg);
-
- // grab the locale specific error
- // message from the ResourceBundle
-
- String errMsg = Result.E_BUSY_MSG;
-
- Result result = new Result(
- Result.E_BUSY,
- Result.E_BUSY_CODE,
- errMsg);
-
- this.setFaultActor("");
- this.setFaultCode("Client");
- this.setFaultString("Client Error");
- this.addResult(result);
+ super("Server",Result.E_BUSY,msg);
}
}
\ No newline at end of file
1.5 +21 -27 ws-juddi/src/java/org/apache/juddi/handler/RegistryExceptionHandler.java
Index: RegistryExceptionHandler.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/handler/RegistryExceptionHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RegistryExceptionHandler.java 8 Mar 2005 03:17:03 -0000 1.4
+++ RegistryExceptionHandler.java 21 Mar 2005 03:45:08 -0000 1.5
@@ -17,13 +17,7 @@
import java.util.Vector;
-import org.apache.juddi.datatype.Address;
-import org.apache.juddi.datatype.AddressLine;
-import org.apache.juddi.datatype.Description;
-import org.apache.juddi.datatype.Email;
-import org.apache.juddi.datatype.Phone;
import org.apache.juddi.datatype.RegistryObject;
-import org.apache.juddi.datatype.business.Contact;
import org.apache.juddi.datatype.response.DispositionReport;
import org.apache.juddi.error.RegistryException;
import org.apache.juddi.util.xml.XMLUtils;
@@ -49,22 +43,32 @@
public RegistryObject unmarshal(Element element)
{
- RegistryException obj = new RegistryException();
Vector nodeList = null;
AbstractHandler handler = null;
+ // Attributes
+ // {none}
+
+ // Text Node Value
+ // {none}
+
+ // Child Elements
+ String fCode = null;
nodeList = XMLUtils.getChildElementsByTagName(element,"faultcode");
if (nodeList.size() > 0)
- obj.setFaultCode(XMLUtils.getText((Element)nodeList.elementAt(0)));
+ fCode = XMLUtils.getText((Element)nodeList.elementAt(0));
+ String fString = null;
nodeList = XMLUtils.getChildElementsByTagName(element,"faultstring");
if (nodeList.size() > 0)
- obj.setFaultString(XMLUtils.getText((Element)nodeList.elementAt(0)));
+ fString = XMLUtils.getText((Element)nodeList.elementAt(0));
+ String fActor = null;
nodeList = XMLUtils.getChildElementsByTagName(element,"faultactor");
if (nodeList.size() > 0)
- obj.setFaultActor(XMLUtils.getText((Element)nodeList.elementAt(0)));
+ fActor = XMLUtils.getText((Element)nodeList.elementAt(0));
+ DispositionReport dispRpt = null;
nodeList = XMLUtils.getChildElementsByTagName(element,"detail");
if (nodeList.size() > 0)
{
@@ -72,10 +76,13 @@
if (nodeList.size() > 0)
{
handler = maker.lookup(DispositionReportHandler.TAG_NAME);
- obj.setDispositionReport((DispositionReport)handler.unmarshal((Element)nodeList.elementAt(0)));
+ dispRpt = ((DispositionReport)handler.unmarshal((Element)nodeList.elementAt(0)));
}
}
+ // Create RegistryException instance and return
+ RegistryException obj = new RegistryException(fCode,fString,fActor,dispRpt);
+
return obj;
}
@@ -139,25 +146,12 @@
Element parent = XMLUtils.newRootElement();
Element child = null;
- Address address = new Address();
- address.setUseType("myAddressUseType");
- address.setSortCode("sortThis");
- address.setTModelKey(null);
- address.addAddressLine(new AddressLine("AddressLine1","keyNameAttr","keyValueAttr"));
- address.addAddressLine(new AddressLine("AddressLine2"));
-
- Contact contact = new Contact();
- //contact.setUseType("myAddressUseType");
- contact.setPersonNameValue("Bob Whatever");
- contact.addDescription(new Description("Bob is a big fat jerk"));
- contact.addDescription(new Description("obBay sIay a igBay atFay erkJay","es"));
- contact.addEmail(new Email("bob@whatever.com"));
- contact.addPhone(new Phone("(603)559-1901"));
- contact.addAddress(address);
+ RegistryException regex =
+ new org.apache.juddi.error.AuthTokenRequiredException("Test Exception");
System.out.println();
- RegistryObject regObject = contact;
+ RegistryObject regObject = regex;
handler.marshal(regObject,parent);
child = (Element)parent.getFirstChild();
parent.removeChild(child);
1.8 +1 -1 ws-juddi/src/java/org/apache/juddi/handler/DispositionReportHandler.java
Index: DispositionReportHandler.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/handler/DispositionReportHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DispositionReportHandler.java 21 Mar 2005 01:52:00 -0000 1.7
+++ DispositionReportHandler.java 21 Mar 2005 03:45:08 -0000 1.8
@@ -144,7 +144,7 @@
errInfo2.setErrMsg(null);
Result result2 = new Result();
- result2.setErrno(Result.E_SUCCESS_NMBR);
+ result2.setErrno(Result.E_SUCCESS);
result2.setErrInfo(errInfo2);
DispositionReport report = new DispositionReport();
1.7 +7 -3 ws-juddi/src/java/org/apache/juddi/function/DiscardAuthTokenFunction.java
Index: DiscardAuthTokenFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DiscardAuthTokenFunction.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DiscardAuthTokenFunction.java 8 Mar 2005 03:17:05 -0000 1.6
+++ DiscardAuthTokenFunction.java 21 Mar 2005 03:45:08 -0000 1.7
@@ -103,12 +103,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.8 +7 -3 ws-juddi/src/java/org/apache/juddi/function/DeleteTModelFunction.java
Index: DeleteTModelFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteTModelFunction.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DeleteTModelFunction.java 8 Mar 2005 03:17:05 -0000 1.7
+++ DeleteTModelFunction.java 21 Mar 2005 03:45:08 -0000 1.8
@@ -134,12 +134,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.7 +7 -3 ws-juddi/src/java/org/apache/juddi/function/DeleteServiceFunction.java
Index: DeleteServiceFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteServiceFunction.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DeleteServiceFunction.java 8 Mar 2005 03:17:05 -0000 1.6
+++ DeleteServiceFunction.java 21 Mar 2005 03:45:08 -0000 1.7
@@ -132,12 +132,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.8 +7 -4 ws-juddi/src/java/org/apache/juddi/function/DeletePublisherFunction.java
Index: DeletePublisherFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeletePublisherFunction.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DeletePublisherFunction.java 8 Mar 2005 03:17:05 -0000 1.7
+++ DeletePublisherFunction.java 21 Mar 2005 03:45:08 -0000 1.8
@@ -122,14 +122,17 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
-
}
1.4 +7 -3 ws-juddi/src/java/org/apache/juddi/function/DeleteSubscriptionFunction.java
Index: DeleteSubscriptionFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteSubscriptionFunction.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DeleteSubscriptionFunction.java 8 Mar 2005 03:22:08 -0000 1.3
+++ DeleteSubscriptionFunction.java 21 Mar 2005 03:45:08 -0000 1.4
@@ -105,12 +105,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.8 +7 -3 ws-juddi/src/java/org/apache/juddi/function/AddPublisherAssertionsFunction.java
Index: AddPublisherAssertionsFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/AddPublisherAssertionsFunction.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AddPublisherAssertionsFunction.java 8 Mar 2005 03:17:05 -0000 1.7
+++ AddPublisherAssertionsFunction.java 21 Mar 2005 03:45:08 -0000 1.8
@@ -160,12 +160,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.7 +7 -3 ws-juddi/src/java/org/apache/juddi/function/DeletePublisherAssertionsFunction.java
Index: DeletePublisherAssertionsFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeletePublisherAssertionsFunction.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DeletePublisherAssertionsFunction.java 8 Mar 2005 03:17:05 -0000 1.6
+++ DeletePublisherAssertionsFunction.java 21 Mar 2005 03:45:08 -0000 1.7
@@ -108,12 +108,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.7 +7 -3 ws-juddi/src/java/org/apache/juddi/function/DeleteBindingFunction.java
Index: DeleteBindingFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteBindingFunction.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DeleteBindingFunction.java 8 Mar 2005 03:17:05 -0000 1.6
+++ DeleteBindingFunction.java 21 Mar 2005 03:45:08 -0000 1.7
@@ -134,12 +134,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.7 +7 -3 ws-juddi/src/java/org/apache/juddi/function/DeleteBusinessFunction.java
Index: DeleteBusinessFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/DeleteBusinessFunction.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DeleteBusinessFunction.java 8 Mar 2005 03:17:05 -0000 1.6
+++ DeleteBusinessFunction.java 21 Mar 2005 03:45:08 -0000 1.7
@@ -130,12 +130,16 @@
dataStore.release();
}
- // didn't encounter an exception so let's create
- // and return a successfull DispositionReport
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.7 +8 -2 ws-juddi/src/java/org/apache/juddi/function/ValidateValuesFunction.java
Index: ValidateValuesFunction.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/function/ValidateValuesFunction.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ValidateValuesFunction.java 25 Jun 2004 02:44:50 -0000 1.6
+++ ValidateValuesFunction.java 21 Mar 2005 03:45:08 -0000 1.7
@@ -76,14 +76,20 @@
if ((tModelVector != null) && (tModelVector.size() > 0))
validateTModelVector(tModelVector);
- // We don't currently support teh validate_values
+ // We don't currently support thh validate_values
// function so to keep things moving along let's
// just return a successful DispositionReport.
+ // We didn't encounter any problems so let's create an
+ // E_SUCCESS Result, embed it in a DispositionReport
+ // and return it.
+ Result result = new Result(Result.E_SUCCESS);
+ result.setErrCode(Result.lookupErrCode(Result.E_SUCCESS));
DispositionReport dispRpt = new DispositionReport();
dispRpt.setGeneric(generic);
dispRpt.setOperator(Config.getOperator());
- dispRpt.addResult(new Result(Result.E_SUCCESS));
+ dispRpt.addResult(result);
+
return dispRpt;
}
1.22 +13 -11 ws-juddi/src/java/org/apache/juddi/registry/RegistryServlet.java
Index: RegistryServlet.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/registry/RegistryServlet.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- RegistryServlet.java 21 Mar 2005 00:21:57 -0000 1.21
+++ RegistryServlet.java 21 Mar 2005 03:45:09 -0000 1.22
@@ -330,7 +330,7 @@
// UDDI DispositionReport values
String errno = null;
String errCode = null;
- String errMsg = null;
+ String errText = null;
// All RegistryException and subclasses of RegistryException
// should contain values for populating a SOAP Fault as well
@@ -373,7 +373,7 @@
if (errInfo != null)
{
errCode = errInfo.getErrCode(); // UDDI ErrInfo errCode
- errMsg = errInfo.getErrMsg(); // UDDI ErrInfo errMsg
+ errText = errInfo.getErrMsg(); // UDDI ErrInfo errMsg
}
}
}
@@ -398,9 +398,10 @@
// FatalError DispositionReport within the message from the
// SAX parsing problem in the SOAP Fault anyway.
- errno = String.valueOf(Result.E_FATAL_ERROR_NMBR);
- errCode = Result.E_FATAL_ERROR_CODE;
- errMsg = ex.getMessage();
+ // TODO Must lookup 'errCode' and pull 'errMsg' from the MessageBundle.
+ errno = String.valueOf(Result.E_FATAL_ERROR);
+ errCode = "E_fatalError";
+ errText = ex.getMessage();
}
else // anything else
{
@@ -427,11 +428,12 @@
// subclass) but we're going to be friendly and include a
// FatalError DispositionReport within the SOAP Fault anyway.
- errno = String.valueOf(Result.E_FATAL_ERROR_NMBR);
- errCode = Result.E_FATAL_ERROR_CODE;
- errMsg = "An internal UDDI server error has " +
- "occurred. Please report this error " +
- "to the UDDI server administrator.";
+ // TODO Must lookup 'errCode' and pull 'errMsg' from the MessageBundle.
+ errno = String.valueOf(Result.E_FATAL_ERROR);
+ errCode = "E_fatalError";
+ errText = "An internal UDDI server error has " +
+ "occurred. Please report this error " +
+ "to the UDDI server administrator.";
}
// We should have everything we need to assemble
@@ -459,7 +461,7 @@
SOAPElement errInfo = result.addChildElement("errInfo");
errInfo.setAttribute("errCode",errCode);
- errInfo.setValue(errMsg);
+ errInfo.setValue(errText);
}
catch (Exception e) { // if we end up in here it's just NOT good.
log.error("A serious error has occured while assembling the SOAP Fault.",e);
1.10 +8 -7 ws-juddi/src/java/org/apache/juddi/transport/axis/AxisProcessor.java
Index: AxisProcessor.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/transport/axis/AxisProcessor.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AxisProcessor.java 1 Mar 2005 14:03:38 -0000 1.9
+++ AxisProcessor.java 21 Mar 2005 03:45:09 -0000 1.10
@@ -226,7 +226,7 @@
String faultActor = null;
String errno = null;
String errCode = null;
- String errMsg = null;
+ String errText = null;
// All RegistryException and subclasses of RegistryException
// should contain values for populating a SOAP Fault as well
@@ -265,7 +265,7 @@
if (errInfo != null)
{
errCode = errInfo.getErrCode(); // UDDI DispositionReport errCode
- errMsg = errInfo.getErrMsg(); // UDDI DispositionReport errMsg
+ errText = errInfo.getErrMsg(); // UDDI DispositionReport errMsg
}
}
}
@@ -282,11 +282,12 @@
faultString = ex.getMessage();
faultActor = null;
+ // TODO Must lookup 'errCode' and pull 'errMsg' from the MessageBundle.
errno = String.valueOf(Result.E_FATAL_ERROR);
- errCode = Result.E_FATAL_ERROR_CODE;
- errMsg = "An internal UDDI server error has " +
- "occurred. Please report this error " +
- "to the UDDI server administrator.";
+ errCode = "E_fatalError";
+ errText = "An internal UDDI server error has " +
+ "occurred. Please report this error " +
+ "to the UDDI server administrator.";
}
// We should have everything we need to assemble
@@ -311,7 +312,7 @@
SOAPElement errInfo = result.addChildElement("errInfo");
errInfo.setAttribute("errCode",errCode);
- errInfo.setValue(errMsg);
+ errInfo.setValue(errText);
}
catch (Exception e) {
e.printStackTrace();
1.6 +124 -236 ws-juddi/src/java/org/apache/juddi/datatype/response/Result.java
Index: Result.java
===================================================================
RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/datatype/response/Result.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Result.java 7 Jun 2004 23:48:12 -0000 1.5
+++ Result.java 21 Mar 2005 03:45:10 -0000 1.6
@@ -16,6 +16,7 @@
package org.apache.juddi.datatype.response;
import org.apache.juddi.datatype.RegistryObject;
+import org.apache.juddi.i18n.RegistryResourceBundle;
/**
* Used in response DispositionReport.
@@ -24,257 +25,40 @@
*/
public class Result implements RegistryObject
{
- // Signifies that the authentication token information has timed out.
public static final int E_ASSERTION_NOT_FOUND = 30000;
- public static final String E_ASSERTION_NOT_FOUND_CODE = "E_assertionNotFound";
- public static final String E_ASSERTION_NOT_FOUND_MSG = "A particular publisher " +
- "assertion cannot be identified in a save or delete operation.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_AUTH_TOKEN_EXPIRED = 10110;
- public static final String E_AUTH_TOKEN_EXPIRED_CODE = "E_authTokenExpired";
- public static final String E_AUTH_TOKEN_EXPIRED_MSG = "Authentication token " +
- "information has timed out.";
-
- // Signifies that an invalid authentication token was passed to an API call
- // that requires authentication.
public static final int E_AUTH_TOKEN_REQUIRED = 10120;
- public static final String E_AUTH_TOKEN_REQUIRED_CODE = "E_authTokenRequired";
- public static final String E_AUTH_TOKEN_REQUIRED_MSG = "An invalid authentication " +
- "token was passed to an API call that requires authentication.";
-
- // Signifies that a save request exceeded the quantity limits for a given
- // structure type. See "Structure Limits" in Appendix D for details.
public static final int E_ACCOUNT_LIMIT_EXCEEDED = 10160;
- public static final String E_ACCOUNT_LIMIT_EXCEEDED_CODE = "E_accountLimitExceeded";
- public static final String E_ACCOUNT_LIMIT_EXCEEDED_MSG = "Authentication token " +
- "information has timed out.";
-
- // Signifies that the request cannot be processed at the current time.
public static final int E_BUSY = 10400;
- public static final String E_BUSY_CODE = "E_busy";
- public static final String E_BUSY_MSG = "The request cannot be processed at " +
- "the current time.";
-
- // Restrictions have been placed by the on the types of information that can
- // categorized within a specific taxonomy. The data provided does not conform
- // to the restrictions placed on the category used. Used with cateborization
- // only.
public static final int E_CATEGORIZATION_NOT_ALLOWED = 20100;
- public static final String E_CATEGORIZATION_NOT_ALLOWED_CODE = "E_categorizationNotAllowed";
- public static final String E_CATEGORIZATION_NOT_ALLOWED_MSG = "The data " +
- "provided does not conform to the restrictions placed on the category used.";
-
- // Signifies that a serious technical exception has occurred while processing the
- // request.
public static final int E_FATAL_ERROR = 10500;
- public static final String E_FATAL_ERROR_CODE = "E_fatalError";
- public static final String E_FATAL_ERROR_MSG = "A serious technical exception " +
- "has occurred while processing the request.";
-
- // Signifies that the uuid_key value passed did not match with any known key
- // values. The details on the invalid key will be included in the
- // dispositionReport structure.
public static final int E_INVALID_KEY_PASSED = 10210;
- public static final String E_INVALID_KEY_PASSED_CODE = "E_invalidKeyPassed";
- public static final String E_INVALID_KEY_PASSED_MSG = "The uuid_key value " +
- "passed did not match with any known key values.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_INVALID_PROJECTION = 20230;
- public static final String E_INVALID_PROJECTION_CODE = "E_invalidProjection";
- public static final String E_INVALID_PROJECTION_MSG = "An attempt was made " +
- "to save a business entity containing a service projection that does not " +
- "match the business service being projected.";
-
- // Signifies that the given keyValue did not correspond to a category within
- // the taxonomy identified by the tModelKey. Used with categorization only.
public static final int E_INVALID_CATEGORY = 20000;
- public static final String E_INVALID_CATEGORY_CODE = "E_invalidCategory";
- public static final String E_INVALID_CATEGORY_MSG = "The given keyValue did " +
- "not correspond to a category within the taxonomy identified by the tModelKey.";
-
- // Signifies that the authentication token information has timed out.
- // NOTE: The UDDI specification indicates that the errno value should be 30100
- // but this value conflicts with the E_MESSAGE_TOO_LARGE errno. The value for
- // E_MESSAGE_TOO_LARGE errno has been changed to 30101. This is the same approach
- // Idoox (now Systinet) took.
public static final int E_INVALID_COMPLETION_STATUS = 30100;
- public static final String E_INVALID_COMPLETION_STATUS_CODE = "E_invalidCompletionStatus";
- public static final String E_INVALID_COMPLETION_STATUS_MSG = "One of the " +
- "assertion status values passed is unrecognized.";
-
- // Signifies that an exception occurred during processing of a save server
- // involving accessing data from a remote URL. The details of the HTTP Get
- // report will be included in the dispositionReport structure.
public static final int E_INVALID_URL_PASSED = 10220;
- public static final String E_INVALID_URL_PASSED_CODE = "E_invalidURLPassed";
- public static final String E_INVALID_URL_PASSED_MSG = "An exception occurred " +
- "during processing of a save server involving accessing data from a remote URL.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_INVALID_VALUE = 20200;
- public static final String E_INVALID_VALUE_CODE = "E_invalidValue";
- public static final String E_INVALID_VALUE_MSG = "A value that was passed " +
- "in a keyValue attribute did not pass validation. This applies to checked " +
- "categorizations, identifiers and other validated code lists.";
-
- // Signifies that a uuid_key value passed has been removed from the registry.
- // While the key was once valid as an accessor, and is still possibly valid,
- // the publisher has removed the information referenced by the uuid_key passed.
public static final int E_KEY_RETIRED = 10310;
- public static final String E_KEY_RETIRED_CODE = "E_keyRetired";
- public static final String E_KEY_RETIRED_MSG = "A uuid_key value passed has " +
- "been removed from the registry.";
-
- // Signifies that an exception was detected while processing elements that were
- // annotated with xml:lang qualifiers. Presently, only the description element
- // supports xml:lang qualifiacations.
public static final int E_LANGUAGE_ERROR = 10060;
- public static final String E_LANGUAGE_ERROR_CODE = "E_languageError";
- public static final String E_LANGUAGE_ERROR_MSG = "An exception was detected " +
- "while processing elements that were annotated with xml:lang qualifiers.";
-
- // Signifies that the authentication token information has timed out.
- // NOTE: The UDDI specification indicates that the errno value should be 30100
- // but this value conflicts with the E_INVALID_COMPLETION_STATUS. The v2.0
- // Errata document corrects this exception by using 30110. This has been changed.
public static final int E_MESSAGE_TOO_LARGE = 30110;
- public static final String E_MESSAGE_TOO_LARGE_CODE = "E_messageTooLarge";
- public static final String E_MESSAGE_TOO_LARGE_MSG = "The message is too large.";
-
- // Signifies that the partial name value passed exceeds the maximum name
- // length designated by the policy of an implementation or Operator Site.
public static final int E_NAME_TOO_LONG = 10020;
- public static final String E_NAME_TOO_LONG_CODE = "E_nameTooLong";
- public static final String E_NAME_TOO_LONG_MSG = "The partial name value " +
- "passed exceeds the maximum name length designated by the policy of an " +
- "implementation or Operator Site.";
-
- // Signifies that an attempt was made to use the publishing API to change data
- // that is mastered at another Operator Site. This exception is only relevant to the
- // public Operator Sites and does not apply to other UDDI compatible registries.
public static final int E_OPERATOR_MISMATCH = 10130;
- public static final String E_OPERATOR_MISMATCH_CODE = "E_operatorMismatch";
- public static final String E_OPERATOR_MISMATCH_MSG = "An attempt was made " +
- "to use the publishing API to change data that is mastered at another Operator " +
- "Site.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_PUBLISHER_CANCELLED = 30220;
- public static final String E_PUBLISHER_CANCELLED_CODE = "E_publisherCancelled";
- public static final String E_PUBLISHER_CANCELLED_MSG = "The target publisher " +
- "cancelled the custody transfer.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_REQUEST_DENIED = 30210;
- public static final String E_REQUEST_DENIED_CODE = "E_requestDenied";
- public static final String E_REQUEST_DENIED_MSG = "A custody transfer " +
- "request has been refused.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_SECRET_UNKNOWN = 30230;
- public static final String E_SECRET_UNKNOWN_CODE = "E_secretUnknown";
- public static final String E_SECRET_UNKNOWN_MSG = "The target publisher " +
- "was unable to match the shared secret and the five (5) attempt limit was " +
- "exhausted. The target publisher automatically cancelled the transfer operation.";
-
- // Signifies no failure occurred. This return code is used with the
- // dispositionReport for reporting results from requests with no natural
- // response document.
public static final int E_SUCCESS = 0;
- public static final String E_SUCCESS_CODE = "E_success";
- public static final String E_SUCCESS_MSG = null;
-
- // Signifies that incompatible arguments were passed.
public static final int E_TOO_MANY_OPTIONS = 10030;
- public static final String E_TOO_MANY_OPTIONS_CODE = "E_tooManyOptions";
- public static final String E_TOO_MANY_OPTIONS_MSG = "Incompatible arguments " +
- "were passed.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_TRANSFER_ABORTED = 30200;
- public static final String E_TRANSFER_ABORTED_CODE = "E_transferAborted";
- public static final String E_TRANSFER_ABORTED_MSG = "Signifies that a " +
- "custody transfer request will not succeed.";
-
- // Signifies that the value of the generic attribute passed is unsupported by
- // the Operator Instance being queried.
public static final int E_UNRECOGNIZED_VERSION = 10040;
- public static final String E_UNRECOGNIZED_VERSION_CODE = "E_unrecognizedVersion";
- public static final String E_UNRECOGNIZED_VERSION_MSG = "The value of the " +
- "generic attribute passed is unsupported by the Operator Instance being queried.";
-
- // Signifies that the user ID and password pair passed in a get_authToken
- // message is not known to the Operator Site or is not valid.
public static final int E_UNKNOWN_USER = 10150;
- public static final String E_UNKNOWN_USER_CODE = "E_unknownUser";
- public static final String E_UNKNOWN_USER_MSG = "The user ID and password " +
- "pair passed in a get_authToken message is not known to the Operator Site " +
- "or is not valid.";
-
- // Signifies that the implementor does not support a feature or API.
public static final int E_UNSUPPORTED = 10050;
- public static final String E_UNSUPPORTED_CODE = "E_unsupported";
- public static final String E_UNSUPPORTED_MSG = "The implementor does not " +
- "support a feature or API.";
-
- // Signifies that an attempt was made to use the publishing API to change data
- // that is controlled by another party. In certain cases, E_operatorMismatch
- // takes precedence in reporting an exception.
public static final int E_USER_MISMATCH = 10140;
- public static final String E_USER_MISMATCH_CODE = "E_userMismatch";
- public static final String E_USER_MISMATCH_MSG = "An attempt was made to " +
- "use the publishing API to change data that is controlled by another party.";
-
- // Signifies that the authentication token information has timed out.
public static final int E_VALUE_NOT_ALLOWED = 20210;
- public static final String E_VALUE_NOT_ALLOWED_CODE = "E_valueNotAllowed";
- public static final String E_VALUE_NOT_ALLOWED_MSG = "A value did not " +
- "pass validation because of contextual issues. The value may be valid in " +
- "some contexts, but not in the contextused.";
-
- // The specification incorrectly omits the exception code E_unvalidatable,
- // numerical value 20220, from the list of valid exception codes. This has
- // been corrected.
public static final int E_UNVALIDATABLE = 20220;
- public static final String E_UNVALIDATABLE_CODE = "E_unvalidatable";
- public static final String E_UNVALIDATABLE_MSG = "";
-
- // Signifies that the request could not be carried out because a needed
- // web service, such as validate_values, did not respond in a reasonable
- // amount of time.
public static final int E_REQUEST_TIMEOUT = 20240;
- public static final String E_REQUEST_TIMEOUT_CODE = "E_requestTimeout";
- public static final String E_REQUEST_TIMEOUT_MSG = "The request could not " +
- "be carried out because a needed web service, such as validate_values, " +
- "did not respond in a reasonable amount of time.";
-
- public static final int E_MONITOR_FAILED = 20260;
- public static final String E_MONITOR_FAILED_CODE = "E_monitorFailed";
- public static final String E_MONITOR_FAILED_MSG = "Failure in the monitor";
-
- // Signifies that the time period, the date/time, or the pair of date/time
- // is invalid. The error structure signifies the condition that occurred
- // and the error text clearly calls out the cause of the problem.
public static final int E_INVALID_TIME = 40030;
- public static final String E_INVALID_TIME_CODE = "E_invalidTime";
- public static final String E_INVALID_TIME_MSG = "Signifies that the time " +
- "period, the date/time, or the pair of date/time is invalid. The error " +
- "structure signifies the condition that occurred and the error text " +
- "clearly calls out the cause of the problem.";
-
- // Signifies that the UDDI node deems that a result set from an inquiry
- // is too large, and requests to obtain the results are not honored, even
- // using subsets. The inquiry that triggered this error should be refined
- // and re-issued.
public static final int E_RESULT_SET_TOO_LARGE = 40300;
- public static final String E_RESULT_SET_TOO_LARGE_CODE = "E_resultSetTooLarge";
- public static final String E_RESULT_SET_TOO_LARGE_MSG = "Signifies that the " +
- "UDDI node deems that a result set from an inquiry is too large, and " +
- "requests to obtain the results are not honored, even using subsets. " +
- "The inquiry that triggered this error should be refined and re-issued.";
-
+
int errno;
ErrInfo errInfo;
@@ -356,31 +140,135 @@
}
/**
- *
+ * Sets the exception code of this ErrInfo to the given value.
+ * @param errcode The new code number for this ErrInfo.
*/
- public String toString()
+ public void setErrCode(String errCode)
{
- StringBuffer buffer = new StringBuffer();
- buffer.append("org.apache.juddi.datatype.response.Result.errno=");
- buffer.append(this.errno);
- buffer.append("\n");
- buffer.append(this.errInfo);
-
- return buffer.toString();
+ if (this.errInfo == null)
+ errInfo = new ErrInfo();
+ errInfo.setErrCode(errCode);
}
- // test driver
- public static void main(String[] args)
+ /**
+ * Returns the exception code of this ErrInfo.
+ * @return The exception code of this ErrInfo.
+ */
+ public String getErrCode()
{
- Result obj = new Result();
- obj.setErrno(123);
+ if (this.errInfo == null)
+ return null;
+ else
+ return errInfo.getErrCode();
+ }
- ErrInfo errInfo = new ErrInfo();
- errInfo.setErrCode("abc");
- errInfo.setErrMsg("def");
+ /**
+ * Sets the exception message of this ErrInfo to the given value.
+ * @param msg The new exception message for this ErrInfo.
+ */
+ public void setErrText(String errText)
+ {
+ if (this.errInfo == null)
+ errInfo = new ErrInfo();
+ errInfo.setErrMsg(errText);
+ }
- obj.setErrInfo(errInfo);
+ /**
+ * Returns the error text of this ErrInfo.
+ * @return The error text of this ErrInfo.
+ */
+ public String getErrText()
+ {
+ if (this.errInfo == null)
+ return null;
+ else
+ return errInfo.getErrMsg();
+ }
- System.out.println(obj);
+ /**
+ *
+ */
+ public String toString()
+ {
+ if (errInfo == null)
+ return String.valueOf(errno);
+
+ StringBuffer buffer = new StringBuffer();
+
+ String errCode = errInfo.getErrCode();
+ if (errCode != null)
+ {
+ buffer.append(errCode);
+ buffer.append(" ");
+ }
+
+ buffer.append("(");
+ buffer.append(errno);
+ buffer.append(") ");
+
+ String errText = errInfo.getErrMsg();
+ if (errText != null)
+ {
+ buffer.append(errText);
+ buffer.append(" ");
+ }
+
+ return buffer.toString();
}
+
+ /**
+ *
+ */
+ public static final String lookupErrCode(int errno)
+ {
+ switch (errno)
+ {
+ case E_ACCOUNT_LIMIT_EXCEEDED : return "E_accountLimitExceeded";
+ case E_ASSERTION_NOT_FOUND : return "E_assertionNotFound";
+ case E_AUTH_TOKEN_EXPIRED : return "E_authTokenExpired";
+ case E_AUTH_TOKEN_REQUIRED : return "E_authTokenRequired";
+ case E_BUSY : return "E_busy";
+ case E_CATEGORIZATION_NOT_ALLOWED : return "E_categorizationNotAllowed";
+ case E_FATAL_ERROR : return "E_fatalError";
+ case E_INVALID_CATEGORY : return "E_invalidCategory";
+ case E_INVALID_COMPLETION_STATUS : return "E_invalidCompletionStatus";
+ case E_INVALID_KEY_PASSED : return "E_invalidKeyPassed";
+ case E_INVALID_PROJECTION : return "E_invalidProjection";
+ case E_INVALID_TIME : return "E_invalidTime";
+ case E_INVALID_URL_PASSED : return "E_invalidURLPassed";
+ case E_INVALID_VALUE : return "E_invalidValue";
+ case E_KEY_RETIRED : return "E_keyRetired";
+ case E_LANGUAGE_ERROR : return "E_languageError";
+ case E_MESSAGE_TOO_LARGE : return "E_messageTooLarge";
+ case E_NAME_TOO_LONG : return "E_nameTooLong";
+ case E_OPERATOR_MISMATCH : return "E_operatorMismatch";
+ case E_PUBLISHER_CANCELLED : return "E_publisherCancelled";
+ case E_REQUEST_DENIED : return "E_requestDenied";
+ case E_REQUEST_TIMEOUT : return "E_requestTimeout";
+ case E_RESULT_SET_TOO_LARGE : return "E_resultSetTooLarge";
+ case E_SECRET_UNKNOWN : return "E_secretUnknown";
+ case E_SUCCESS : return "E_success";
+ case E_TOO_MANY_OPTIONS : return "E_tooManyOptions";
+ case E_TRANSFER_ABORTED : return "E_transferAborted";
+ case E_UNKNOWN_USER : return "E_unknownUser";
+ case E_UNRECOGNIZED_VERSION : return "E_unrecognizedVersion";
+ case E_UNSUPPORTED : return "E_unsupported";
+ case E_UNVALIDATABLE : return "E_unvalidatable";
+ case E_USER_MISMATCH : return "E_userMismatch";
+ case E_VALUE_NOT_ALLOWED : return "E_valueNotAllowed";
+ default : return null;
+ }
+ }
+
+ /**
+ *
+ */
+ public static final String lookupErrText(int errno)
+ {
+ String errCode = lookupErrCode(errno);
+ if (errCode == null)
+ return null;
+
+ return RegistryResourceBundle.getString(errCode);
+ }
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org