Hi, 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, org.apache.axiom.om.OMElement faultDetail) -----In my WS--------------------------------------------------------- new AxisFault(new QName("urn:wwse:faultcodes","my_faultcode","wwse"),"my_faultstring","my_actor","", *getFaultDetail*("message")); private static OMElement getFaultDetail(String err){ OMElement detailElt = OMAbstractFactory.getOMFactory().createOMElement("string", null); detailElt.setText(err); 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>* *</soapenv:Fault>* 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) ---------------------------------------------------- Regards, -- *Py. MOTREFF*