@Override protected void doStart() throws Exception { if ("1.2".equals(version)) { LOG.debug("Using SOAP 1.2 adapter"); adapter = new Soap12DataFormatAdapter(this); } else { LOG.debug("Using SOAP 1.1 adapter"); adapter = new Soap11DataFormatAdapter(this); } super.doStart(); }
/** * Marshal inputObjects to SOAP xml. If the exchange or message has an EXCEPTION_CAUGTH property * or header then instead of the object the exception is marshaled. * * <p>To determine the name of the top level xml elements the elementNameStrategy is used. * * @throws IOException,SAXException */ public void marshal(Exchange exchange, Object inputObject, OutputStream stream) throws IOException, SAXException { checkElementNameStrategy(exchange); String soapAction = getSoapActionFromExchange(exchange); if (soapAction == null && inputObject instanceof BeanInvocation) { BeanInvocation beanInvocation = (BeanInvocation) inputObject; WebMethod webMethod = beanInvocation.getMethod().getAnnotation(WebMethod.class); if (webMethod != null && webMethod.action() != null) { soapAction = webMethod.action(); } } Object envelope = adapter.doMarshal(exchange, inputObject, stream, soapAction); // and continue in super super.marshal(exchange, envelope, stream); }