axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uwe Hanisch <Uwe.Hani...@t-systems.com>
Subject Howto deserialize Fault detail into a Java Bean?
Date Tue, 02 Jul 2002 13:15:21 GMT
A SOAP Call returns a SOAP-FAULT with following body:
-----------------------------------------------------------------
<ns0:Fault xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/">
   <faultcode>...</faultcode>
   <faultstring>...</faultstring>
   <detail>
     <ns1:errorDetail xmlns:ns1="http://my.schemas.com/">
     <errorCode>InvalidParameter</errorCode>
     <exceptionStackTrace/>
     </ns1:errorDetail>
   </detail>
</ns0:Fault>
-----------------------------------------------------------------

Corresponding to the fault detail I want to create a
ErrorDetail object:
-----------------------------------------------------------------
public class ErrorDetail implements Serializable{
   protected String errorCode;
   protected String exceptionStackTrace;

   public ErrorDetail () {}
   public String getErrorCode() {
     return errorCode;
   }
   public void setErrorCode(String errorCode) {
     this.errorCode = errorCode;
   }
   public String getExceptionStackTrace() {
     return exceptionStackTrace;
   }
   public void setExceptionStackTrace(String exceptionStackTrace) {
     this.exceptionStackTrace   = exceptionStackTrace;
   }
}
-----------------------------------------------------------------

Exists there a simple way to create a ErrorDetail object from
AxisFault.getFaultDetails()( which returns org.w3c.dom.Element[] ),
e.g. using a BeanDeserializerFactory?

Uwe


Mime
View raw message