MarshallingPayloadMethodProcessor extends AbstractPayloadMethodProcessor { @Override public Object resolveArgument(MessageContext messageContext, MethodParameter parameter) throws Exception { Unmarshaller unmarshaller = getUnmarshaller(); Assert.state(unmarshaller != null, "unmarshaller must not be null"); WebServiceMessage request = messageContext.getRequest(); Object argument = MarshallingUtils.unmarshal(unmarshaller, request); if (logger.isDebugEnabled()) { logger.debug("Unmarshalled payload request to [" + argument + "]"); } return argument; } MarshallingPayloadMethodProcessor();  MarshallingPayloadMethodProcessor(Marshaller marshaller);  MarshallingPayloadMethodProcessor(Marshaller marshaller, Unmarshaller unmarshaller); Marshaller getMarshaller(); void setMarshaller(Marshaller marshaller); Unmarshaller getUnmarshaller(); void setUnmarshaller(Unmarshaller unmarshaller); @Override Object resolveArgument(MessageContext messageContext, MethodParameter parameter); @Override void handleReturnValue(MessageContext messageContext, MethodParameter returnType, Object returnValue);  }
@Test public void resolveArgument() throws Exception { MyObject expected = new MyObject(); expect(unmarshaller.unmarshal(isA(Source.class))).andReturn(expected); replay(marshaller, unmarshaller); MessageContext messageContext = createMockMessageContext(); Object result = processor.resolveArgument(messageContext, supportedParameter); assertEquals("Invalid return argument", expected, result); verify(marshaller, unmarshaller); }