Spring WS Adding Detail to SoapFault Exception Handling

You may also like...

5
Leave a Reply

avatar
4 Comment threads
1 Thread replies
1 Followers
 
Most reacted comment
Hottest comment thread
5 Comment authors
MemoryNotFoundMatiastjm1706AntonBalRanj Recent comment authors
  Subscribe  
newest oldest
Notify of
BalRanj
Guest
BalRanj

Fantastic. Just worked by referring the above steps. Thanks for your efforts.

Anton
Guest
Anton

Thanks!

BTW, you can use detail.getResult to marshal fault info into detail element. For example, if you have FaultInfo class generated by JAXB from WSDL, you can use:

if (nonNull(faultInfo)) {
SoapFaultDetail detail = fault.addFaultDetail();
Result result = detail.getResult();
try {
JAXB_CTX.createMarshaller().marshal(faultInfo, result);
} catch (JAXBException e) {
LOGGER.error(“Error serializing [{}] fault info”, ex.getClass().getSimpleName(), e);
}
}

tjm1706
Guest
tjm1706

Looks great.
How can I call this from e.g. Chome Widzler? Then I need an URL with a WSDL .

Matias
Guest
Matias

How do you customize the fault code?