I have a @WebService that has an field declared as an enum type.
I added in the project one handler (implements SOAPHandler<SOAPMessageContext>) for payloads log.
When active this handler:
<S:Envelope xmlns:S="http: //schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns0:Fault xmlns:ns1="http: //www.w3.org/2003/05/soap-envelope" xmlns:ns0="http ://schemas.xmlsoap.org/soap/envelope/">
<faultcode>ns0:Server</faultcode>
<faultstring>Exception Description: No conversion value provided for the value [A] in field [myenum/text()].
Mapping: org.eclipse.persistence.oxm.mappings.XMLDirectMapping[myenum-->myenum/text()]
Descriptor: XMLDescriptor(com.tst.Customer --> [])</faultstring>
</ns0:Fault>
</S:Body>
</S:Envelope>
@Override
public final boolean handleMessage(final SOAPMessageContext context) {
StringWriter writer = new StringWriter();
try {
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http ://xml.apache.org/xslt}indent-amount", "2");
Source source = new DOMSource(context.getMessage().getSOAPPart());
transformer.transform(source, new StreamResult(writer));
} catch (TransformerException e) {
LOGGER.error(e);
}
LOGGER.debug(writer.toString());
return true;
}
I need to keep as it was before insert of the handler. Receive null when the values are different of enum definition...
WebLogic Server 12.1.3