Hi there,
I am trying to throw a SOAP Fault using subcodes, but whatever i do i
seem to be loosing the subcodes.
I am using the follow code to construct my soap fault:
SOAPFactory sf = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);
SOAPFault f = sf.createFault("Reason", SOAPConstants.SOAP_RECEIVER_FAULT);
QName qname = new QName("http://example.com", "myfault1", "flt1");
f.appendFaultSubcode(qname);
QName qname2 = new QName("http://example2.com", "myfault2", "flt2");
f.appendFaultSubcode(qname2);
QName qname3 = new QName("http://example3.com", "myfault3", "flt3");
f.appendFaultSubcode(qname3);
throw new SOAPFaultException(f);
Whatever i do the result is always a soap fault without!! the subcodes..
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">Reason</soap:Text>
</soap:Reason>
</soap:Fault>
</soap:Body>
Any suggestion on how tackle this?