Skip to content

Instantly share code, notes, and snippets.

@vanto
Created August 15, 2013 15:38
Show Gist options
  • Save vanto/6241851 to your computer and use it in GitHub Desktop.
Save vanto/6241851 to your computer and use it in GitHub Desktop.
Index: src/java/com/sun/xml/messaging/saaj/soap/SOAPPartImpl.java
===================================================================
--- src/java/com/sun/xml/messaging/saaj/soap/SOAPPartImpl.java (revision 450)
+++ src/java/com/sun/xml/messaging/saaj/soap/SOAPPartImpl.java (working copy)
@@ -285,7 +285,7 @@
log.severe("SAAJ0545.soap.cannot.set.src.for.part");
throw new SOAPExceptionImpl(
- "Error setting the source for SOAPPart: " + ex.getMessage());
+ "Error setting the source for SOAPPart: " + ex.getLocalizedMessage(), ex);
}
}
Index: src/java/com/sun/xml/messaging/saaj/soap/AttachmentPartImpl.java
===================================================================
--- src/java/com/sun/xml/messaging/saaj/soap/AttachmentPartImpl.java (revision 450)
+++ src/java/com/sun/xml/messaging/saaj/soap/AttachmentPartImpl.java (working copy)
@@ -171,7 +171,7 @@
Level.SEVERE,
"SAAJ0573.soap.attachment.getrawbytes.ioexception",
new String[] { ex.getLocalizedMessage()});
- throw new SOAPExceptionImpl("Raw InputStream Error: " + ex);
+ throw new SOAPExceptionImpl("Raw InputStream Error: " + ex.getLocalizedMessage(), ex);
}
} else {
ByteOutputStream bout = new ByteOutputStream();
@@ -182,7 +182,7 @@
Level.SEVERE,
"SAAJ0501.soap.data.handler.err",
new String[] { ex.getLocalizedMessage()});
- throw new SOAPExceptionImpl("Data handler error: " + ex);
+ throw new SOAPExceptionImpl("Data handler error: " + ex.getLocalizedMessage(), ex);
}
return bout.size();
}
@@ -213,7 +213,7 @@
}
} catch (Exception ex) {
log.log(Level.SEVERE, "SAAJ0575.soap.attachment.getcontent.exception", ex);
- throw new SOAPExceptionImpl(ex.getLocalizedMessage());
+ throw new SOAPExceptionImpl(ex.getLocalizedMessage(), ex);
}
}
@@ -416,7 +416,7 @@
setMimeHeader("Content-Type", contentType);
} catch (Exception e) {
log.log(Level.SEVERE, "SAAJ0578.soap.attachment.setbase64content.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
+ throw new SOAPExceptionImpl(e.getLocalizedMessage(), e);
} finally {
if (bos != null)
bos.close();
@@ -438,14 +438,14 @@
stream = rawContent.getInputStream();
} catch (Exception e) {
log.log(Level.SEVERE,"SAAJ0579.soap.attachment.getbase64content.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
+ throw new SOAPExceptionImpl(e.getLocalizedMessage(), e);
}
} else if (dataHandler != null) {
try {
stream = dataHandler.getInputStream();
} catch (IOException e) {
log.severe("SAAJ0574.soap.attachment.datahandler.ioexception");
- throw new SOAPExceptionImpl("DataHandler error" + e);
+ throw new SOAPExceptionImpl("DataHandler error: " + e.getLocalizedMessage(), e);
}
} else {
log.severe("SAAJ0572.soap.no.content.for.attachment");
@@ -474,7 +474,7 @@
} catch (Exception e) {
// throw new SOAPException
log.log(Level.SEVERE,"SAAJ0579.soap.attachment.getbase64content.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
+ throw new SOAPExceptionImpl(e.getLocalizedMessage(), e);
} finally {
try {
stream.close();
@@ -509,7 +509,7 @@
setMimeHeader("Content-Type", contentType);
} catch (Exception e) {
log.log(Level.SEVERE, "SAAJ0576.soap.attachment.setrawcontent.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
+ throw new SOAPExceptionImpl(e.getLocalizedMessage(), e);
} finally {
if (bos != null)
bos.close();
@@ -558,7 +558,7 @@
} catch (Exception e) {
log.log(Level.SEVERE,
"SAAJ0576.soap.attachment.setrawcontent.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
+ throw new SOAPExceptionImpl(e.getLocalizedMessage(), e);
}
}
@@ -571,14 +571,14 @@
return rawContent.getInputStream();
} catch (Exception e) {
log.log(Level.SEVERE,"SAAJ0577.soap.attachment.getrawcontent.exception", e);
- throw new SOAPExceptionImpl(e.getLocalizedMessage());
+ throw new SOAPExceptionImpl(e.getLocalizedMessage(), e);
}
} else if (dataHandler != null) {
try {
return dataHandler.getInputStream();
} catch (IOException e) {
log.severe("SAAJ0574.soap.attachment.datahandler.ioexception");
- throw new SOAPExceptionImpl("DataHandler error" + e);
+ throw new SOAPExceptionImpl("DataHandler error: " + e.getLocalizedMessage(), e);
}
} else {
log.severe("SAAJ0572.soap.no.content.for.attachment");
@@ -611,7 +611,7 @@
return ASCIIUtility.getBytes(ret);
} catch (IOException e) {
log.severe("SAAJ0574.soap.attachment.datahandler.ioexception");
- throw new SOAPExceptionImpl("DataHandler error" + e);
+ throw new SOAPExceptionImpl("DataHandler error: " + e.getLocalizedMessage(), e);
}
} else {
log.severe("SAAJ0572.soap.no.content.for.attachment");
Index: src/java/com/sun/xml/messaging/saaj/soap/MessageFactoryImpl.java
===================================================================
--- src/java/com/sun/xml/messaging/saaj/soap/MessageFactoryImpl.java (revision 450)
+++ src/java/com/sun/xml/messaging/saaj/soap/MessageFactoryImpl.java (working copy)
@@ -110,7 +110,7 @@
} catch (ParseException e) {
log.severe("SAAJ0531.soap.cannot.parse.Content-Type");
throw new SOAPExceptionImpl(
- "Unable to parse content type: " + e.getMessage());
+ "Unable to parse content type: " + e.getLocalizedMessage(), e);
}
}
Index: src/java/com/sun/xml/messaging/saaj/client/p2p/HttpSOAPConnection.java
===================================================================
--- src/java/com/sun/xml/messaging/saaj/client/p2p/HttpSOAPConnection.java (revision 450)
+++ src/java/com/sun/xml/messaging/saaj/client/p2p/HttpSOAPConnection.java (working copy)
@@ -135,13 +135,13 @@
// TBD -- exception chaining
log.log(Level.SEVERE,"SAAJ0004.p2p.internal.err",ex);
throw new SOAPExceptionImpl(
- "Internal error: " + ex.getMessage());
+ "Internal error: " + ex.getLocalizedMessage(), ex);
}
try {
endPoint = new URL(url);
} catch (MalformedURLException mex) {
log.log(Level.SEVERE,"SAAJ0005.p2p.", mex);
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getLocalizedMessage(), mex);
}
}
}
@@ -151,7 +151,7 @@
endPoint = new URL((String) endPoint);
} catch (MalformedURLException mex) {
log.log(Level.SEVERE, "SAAJ0006.p2p.bad.URL", mex);
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getLocalizedMessage(), mex);
}
}
@@ -352,7 +352,7 @@
} catch (Exception ex) {
log.log(Level.SEVERE,"SAAJ0010.p2p.cannot.read.resp", ex);
throw new SOAPExceptionImpl(
- "Unable to read response: " + ex.getMessage());
+ "Unable to read response: " + ex.getMessage(), ex);
} finally {
if (httpIn != null)
httpIn.close();
@@ -388,13 +388,13 @@
} catch (Exception ex) {
log.severe("SAAJ0004.p2p.internal.err");
throw new SOAPExceptionImpl(
- "Internal error: " + ex.getMessage());
+ "Internal error: " + ex.getMessage(), ex);
}
try {
endPoint = new URL(url);
} catch (MalformedURLException mex) {
log.severe("SAAJ0005.p2p.");
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getLocalizedMessage(), mex);
}
}
}
@@ -404,7 +404,7 @@
endPoint = new URL((String) endPoint);
} catch (MalformedURLException mex) {
log.severe("SAAJ0006.p2p.bad.URL");
- throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage());
+ throw new SOAPExceptionImpl("Bad URL: " + mex.getLocalizedMessage(), mex);
}
}
@@ -549,7 +549,7 @@
"SAAJ0010.p2p.cannot.read.resp",
ex);
throw new SOAPExceptionImpl(
- "Unable to read response: " + ex.getMessage());
+ "Unable to read response: " + ex.getMessage(), ex);
} finally {
if (httpIn != null)
httpIn.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment