You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by gd...@apache.org on 2006/01/03 01:51:38 UTC
svn commit: r365499 -
/webservices/axis/trunk/java/src/org/apache/axis/AxisFault.java
Author: gdaniels
Date: Mon Jan 2 16:51:36 2006
New Revision: 365499
URL: http://svn.apache.org/viewcvs?rev=365499&view=rev
Log:
Add a quick way of getting an AxisFault as a SOAPEnvelope (including headers).
Modified:
webservices/axis/trunk/java/src/org/apache/axis/AxisFault.java
Modified: webservices/axis/trunk/java/src/org/apache/axis/AxisFault.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/src/org/apache/axis/AxisFault.java?rev=365499&r1=365498&r2=365499&view=diff
==============================================================================
--- webservices/axis/trunk/java/src/org/apache/axis/AxisFault.java (original)
+++ webservices/axis/trunk/java/src/org/apache/axis/AxisFault.java Mon Jan 2 16:51:36 2006
@@ -576,7 +576,6 @@
*
* This is new in SOAP 1.2
* @since axis1.1
- * @return
*/
public String getFaultNode() {
return( faultNode );
@@ -737,12 +736,29 @@
* @throws Exception
*/
public void output(SerializationContext context) throws Exception {
-
SOAPConstants soapConstants = Constants.DEFAULT_SOAP_VERSION;
if (context.getMessageContext() != null) {
soapConstants = context.getMessageContext().getSOAPConstants();
}
+ SOAPEnvelope envelope = getAsEnvelope(soapConstants);
+ envelope.output(context);
+ }
+
+ /**
+ * Get this fault as a SOAPEnvelope
+ */
+ public SOAPEnvelope getAsEnvelope()
+ throws Exception {
+ return getAsEnvelope(Constants.DEFAULT_SOAP_VERSION);
+ }
+
+ /**
+ * Get this fault as a SOAPEnvelope with a particular version
+ */
+ public SOAPEnvelope getAsEnvelope(SOAPConstants soapConstants)
+ throws Exception {
+
SOAPEnvelope envelope = new SOAPEnvelope(soapConstants);
SOAPFault fault = new SOAPFault(this);
@@ -756,7 +772,7 @@
}
}
- envelope.output(context);
+ return envelope;
}
/**