}
@Override
public void setReturnValue(Object value)
{
EndpointInvocation epInv = getEndpointInvocation();
epInv.setReturnValue(value);
SOAPMessageContext msgContext = (SOAPMessageContext)getInvocationContext().getAttachment(javax.xml.rpc.handler.MessageContext.class);
if (msgContext != null && msgContext.getMessage() == null)
{
try
{
// Bind the response message
OperationMetaData opMetaData = epInv.getOperationMetaData();
CommonBindingProvider bindingProvider = new CommonBindingProvider(opMetaData.getEndpointMetaData());
CommonBinding binding = (CommonBinding)bindingProvider.getCommonBinding();
SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
msgContext.setMessage(resMessage);
}