One of the interop scenarios require the service endpoint to populate a
custom fault code. Our SOAP 1.2 implementation is throwing a
SOAPFaultException on that (stack trace below). SAAJ seems to restrict
the fault codes to only the list given in the spec. I could not find
such a requirement in the SOAP 1.2 spec [1].
This is happening in SOAP 1.2 only. SOAP 1.1 implementation does not
seem to be restricting the list of faultcodes that can be specified
which seems the correct behavior to me. Here is the stack trace:
Caused by: javax.xml.ws.addressing.AddressingException:
com.sun.xml.messaging.saaj.SOAPExceptionImpl: {
http://example.or
g/echo}EmptyEchoString is not a standard Code value
at w3c.s12.server.WsaTestImpl.createSOAPFault(WsaTestImpl.java:83)
at w3c.s12.server.WsaTestImpl.echo(WsaTestImpl.java:70)
... 37 more
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl:
{
http://example.org/echo}EmptyEchoString is not a standard Code
value
at
com.sun.xml.messaging.saaj.soap.ver1_2.Fault1_2Impl.checkIfStandardFaultCode(Fault1_2Impl.java:115)
at
com.sun.xml.messaging.saaj.soap.impl.FaultImpl.setFaultCode(FaultImpl.java:105)
at
com.sun.xml.messaging.saaj.soap.impl.FaultImpl.setFaultCode(FaultImpl.java:119)
at w3c.s12.server.WsaTestImpl.createSOAPFault(WsaTestImpl.java:79)
... 38 more
Am I missing some requirement from the spec ? If not then this needs to
be fixed.
[1]
http://www.w3.org/TR/2003/REC-soap12-part1-20030624/#faultcodes
-Arun
--
got Web Services ?
Download Java Web Services Developer Pack from
http://java.sun.com/webservices