public void afterPropertiesSet() throws Exception { Assert.notNull(getMarshaller(), "marshaller is required"); Assert.notNull(getUnmarshaller(), "unmarshaller is required"); }
/** * Creates a new <code>MarshallingMethodEndpointAdapter</code> with the given marshaller and unmarshaller. * * @param marshaller the marshaller to use * @param unmarshaller the unmarshaller to use */ public MarshallingMethodEndpointAdapter(Marshaller marshaller, Unmarshaller unmarshaller) { Assert.notNull(marshaller, "marshaller must not be null"); Assert.notNull(unmarshaller, "unmarshaller must not be null"); this.setMarshaller(marshaller); this.setUnmarshaller(unmarshaller); }
/** * Supports a method with a single, unmarshallable parameter, and that return <code>void</code> or a marshallable * type. * * @see Marshaller#supports(Class) * @see Unmarshaller#supports(Class) */ @Override protected boolean supportsInternal(MethodEndpoint methodEndpoint) { Method method = methodEndpoint.getMethod(); return supportsReturnType(method) && supportsParameters(method); }
@Override protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception { WebServiceMessage request = messageContext.getRequest(); Object requestObject = unmarshalRequest(request); Object responseObject = methodEndpoint.invoke(new Object[]{requestObject}); if (responseObject != null) { WebServiceMessage response = messageContext.getResponse(); marshalResponse(responseObject, response); } }
private boolean supportsParameters(Method method) { if (method.getParameterTypes().length != 1) { return false; } else { return getUnmarshaller().supports(method.getParameterTypes()[0]); } } }
private void marshalResponse(Object responseObject, WebServiceMessage response) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Marshalling [" + responseObject + "] to response payload"); } MarshallingUtils.marshal(getMarshaller(), responseObject, response); }
@Override protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception { WebServiceMessage request = messageContext.getRequest(); Object requestObject = unmarshalRequest(request); Object responseObject = methodEndpoint.invoke(new Object[]{requestObject}); if (responseObject != null) { WebServiceMessage response = messageContext.getResponse(); marshalResponse(responseObject, response); } }
private Object unmarshalRequest(WebServiceMessage request) throws IOException { Object requestObject = MarshallingUtils.unmarshal(getUnmarshaller(), request); if (logger.isDebugEnabled()) { logger.debug("Unmarshalled payload request to [" + requestObject + "]"); } return requestObject; }
private void marshalResponse(Object responseObject, WebServiceMessage response) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Marshalling [" + responseObject + "] to response payload"); } MarshallingUtils.marshal(getMarshaller(), responseObject, response); }
/** * Creates a new {@code MarshallingMethodEndpointAdapter} with the given marshaller and unmarshaller. * * @param marshaller the marshaller to use * @param unmarshaller the unmarshaller to use */ public MarshallingMethodEndpointAdapter(Marshaller marshaller, Unmarshaller unmarshaller) { Assert.notNull(marshaller, "marshaller must not be null"); Assert.notNull(unmarshaller, "unmarshaller must not be null"); this.setMarshaller(marshaller); this.setUnmarshaller(unmarshaller); }
@Override protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception { WebServiceMessage request = messageContext.getRequest(); Object requestObject = unmarshalRequest(request); Object responseObject = methodEndpoint.invoke(new Object[]{requestObject}); if (responseObject != null) { WebServiceMessage response = messageContext.getResponse(); marshalResponse(responseObject, response); } }
/** * Supports a method with a single, unmarshallable parameter, and that return {@code void} or a marshallable * type. * * @see Marshaller#supports(Class) * @see Unmarshaller#supports(Class) */ @Override protected boolean supportsInternal(MethodEndpoint methodEndpoint) { Method method = methodEndpoint.getMethod(); return supportsReturnType(method) && supportsParameters(method); }
@Override public void afterPropertiesSet() throws Exception { Assert.notNull(getMarshaller(), "marshaller is required"); Assert.notNull(getUnmarshaller(), "unmarshaller is required"); }
private Object unmarshalRequest(WebServiceMessage request) throws IOException { Object requestObject = MarshallingUtils.unmarshal(getUnmarshaller(), request); if (logger.isDebugEnabled()) { logger.debug("Unmarshalled payload request to [" + requestObject + "]"); } return requestObject; }
private void marshalResponse(Object responseObject, WebServiceMessage response) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Marshalling [" + responseObject + "] to response payload"); } MarshallingUtils.marshal(getMarshaller(), responseObject, response); }
/** * Creates a new {@code MarshallingMethodEndpointAdapter} with the given marshaller and unmarshaller. * * @param marshaller the marshaller to use * @param unmarshaller the unmarshaller to use */ public MarshallingMethodEndpointAdapter(Marshaller marshaller, Unmarshaller unmarshaller) { Assert.notNull(marshaller, "marshaller must not be null"); Assert.notNull(unmarshaller, "unmarshaller must not be null"); this.setMarshaller(marshaller); this.setUnmarshaller(unmarshaller); }
@Override protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception { WebServiceMessage request = messageContext.getRequest(); Object requestObject = unmarshalRequest(request); Object responseObject = methodEndpoint.invoke(new Object[]{requestObject}); if (responseObject != null) { WebServiceMessage response = messageContext.getResponse(); marshalResponse(responseObject, response); } }
/** * Supports a method with a single, unmarshallable parameter, and that return {@code void} or a marshallable * type. * * @see Marshaller#supports(Class) * @see Unmarshaller#supports(Class) */ @Override protected boolean supportsInternal(MethodEndpoint methodEndpoint) { Method method = methodEndpoint.getMethod(); return supportsReturnType(method) && supportsParameters(method); }
@Override public void afterPropertiesSet() throws Exception { Assert.notNull(getMarshaller(), "marshaller is required"); Assert.notNull(getUnmarshaller(), "unmarshaller is required"); }
private boolean supportsParameters(Method method) { if (method.getParameterTypes().length != 1) { return false; } else { return getUnmarshaller().supports(method.getParameterTypes()[0]); } } }