Using axis2-0.94 When creating a fault with a value and subcode the element added last is lost when the fault is serialized.
SOAPFactory sf = OMAbstractFactory.getSOAP12Factory(); SOAPEnvelope env = sf.createSOAPEnvelope(); SOAPBody body = sf.createSOAPBody(env); SOAPFault fault = sf.createSOAPFault(body); SOAPFaultCode faultCode = sf.createSOAPFaultCode(fault); SOAPFaultValue faultValue = sf.createSOAPFaultValue(faultCode); SOAPFaultSubCode subCode = sf.createSOAPFaultSubCode(faultCode; fault.serialize(System.out); Will print: <soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Code> <soapenv:Value /> </soapenv:Code> </soapenv:Fault> If I create the subcode before the value: SOAPFactory sf = OMAbstractFactory.getSOAP12Factory(); SOAPEnvelope env = sf.createSOAPEnvelope(); SOAPBody body = sf.createSOAPBody(env); SOAPFault fault = sf.createSOAPFault(body); SOAPFaultCode faultCode = sf.createSOAPFaultCode(fault); SOAPFaultSubCode subCode = sf.createSOAPFaultSubCode(faultCode); SOAPFaultValue faultValue = sf.createSOAPFaultValue(faultCode); fault.serialize(System.out); Will print: <soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Code> <soapenv:Subcode /> </soapenv:Code> </soapenv:Fault> fault.getCode().getSubCode() and fault.getCode().getValue() both return the expected values no matter the order they are created in. Thanks Jesse
