PDA

View Full Version : Extension of SoapFaultMappingExceptionResolver



res1st
Sep 15th, 2006, 05:01 AM
Hi,

i want to add a bean to the details element of an soap fault.


I added the marshaller bean to my SoapFaultMappingExceptionResolver, but the marshaller has only the method

marshaller.marshal(faultType, <RESULT>);

and the the SoapFault method

soapFault.addFaultDetail().addFaultDetailElement(<QNAME>)

. Result is only an interface. What element do i have to create? Should i use the

soapContext.getSoapResponse().getPayloadResult()

element for that?
How do i transform my Result element to a QName?

Cheers,

Ingo

res1st
Sep 18th, 2006, 07:26 AM
Arjen, can you please take a look at my questions? :)

Ingo

wlsmith
Sep 18th, 2006, 09:00 AM
It might not be an exact answer to your question, but this thread might help:
Wanting to return the message from a custom Exception as a SOAP Fault string (http://forum.springframework.org/showthread.php?t=28657).
Following that advice, I've been able to marshal and return whatever fault details I wanted.

res1st
Sep 19th, 2006, 02:56 AM
Hi,

thank you for your answer. I didn't understand the way of creating my my xml-string. I hope you can help me.

Arjen used this line:
Source elSource = new StringSource("<message>My application didn't work</message><errorcode>1001</errorcode>");

I've an error-details-bean defined in my WSDL. I instanciate it and want to transform it to an Source element. But how can i do thins with spring?

Ingo