axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-yves motreff <>
Subject AxisFault how to initialize faultactor
Date Wed, 30 Nov 2011 15:03:56 GMT

I want to generate a custom SOAP Fault, so I use the constructor of
AxisFault below :

AxisFault(QName faultCode, String faultReason, String faultNode, String
faultRole, faultDetail)

-----In my WS---------------------------------------------------------

new AxisFault(new

private static OMElement getFaultDetail(String err){
OMElement detailElt =
OMAbstractFactory.getOMFactory().createOMElement("string", null);
return detailElt;


The message returned is :

*<soapenv:Fault xmlns:wwse="urn:wwse:faulcodes">*
*       <faultcode>my_faultcode</faultcode>*
*       <faultstring>my_faultstring</faultstring>*
*       <detail>*
*          <string>message</string>*
*       </detail>*

1. Why the namespace of my faultCode is in the element "soapenv:Fault"
instead of <faultcode></faultcode>?

received : <soapenv:Fault xmlns:wwse=*"urn:wwse:faultcodes"*
> <faultcode>....
expected : <soapenv:Fault><faultcode xmlns:wwse=*"urn:wwse:faultcodes"*>....

2. Why "<faultactor></faultactor>" isn't displayed ? As discribe in
AxisFault class:  faultActor seems to be mapped with faultNode

*org.apache.axis2.AxisFault *--------------------------

SOAP1.2              SOAP1.1
node                 faultactor
reason(0).text       faultstring
faultcode.value      faultcode
faultcode.subcode    (discarded)
detail               detail
role                 (discarded)




View raw message