/** * {@inheritDoc} */ @Override protected void setTargetService(SOAPMessageContext soapMsgContext, AddressingHeaders headers) throws Exception { org.apache.axis.MessageContext axisMsgContext = (org.apache.axis.MessageContext) soapMsgContext; // TODO: why is the below code necessary? - add comments if (axisMsgContext.getService() == null && axisMsgContext.getTargetService() == null) { axisMsgContext.setTargetService(getTargetServiceName(headers)); // This is to ensure the SOAPEnvelope is rebuilt with the right type mappings and // MessageContext is set with the right properties. if (axisMsgContext.getTargetService() != null) { ((Message) axisMsgContext.getMessage()).getSOAPPartAsString(); } } }
private Object[] demarshallArguments() throws Exception { final SOAPMessage message = messageContext.getMessage(); messageContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION, Boolean.TRUE); if (message != null) {
public void processMessage(final MessageContext msgContext, final SOAPEnvelope reqEnv, final SOAPEnvelope resEnv, final Object obj) throws Exception { final RPCElement body = getBody(reqEnv, msgContext); final OperationDesc operation = getOperationDesc(msgContext, body); final AxisRpcInterceptor interceptor = new AxisRpcInterceptor(operation, msgContext); final SOAPMessage message = msgContext.getMessage(); try { message.getSOAPPart().getEnvelope(); msgContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION, Boolean.FALSE); final RpcContainer container = (RpcContainer) ejbDeployment.getContainer(); final Object[] arguments = {msgContext, interceptor}; final Class callInterface = ejbDeployment.getServiceEndpointInterface(); final Object result = container.invoke(ejbDeployment.getDeploymentID(), InterfaceType.SERVICE_ENDPOINT, callInterface, operation.getMethod(), arguments, null); interceptor.createResult(result); } catch (final InvalidateReferenceException e) { interceptor.createExceptionResult(e.getCause()); } catch (final ApplicationException e) { interceptor.createExceptionResult(e.getCause()); } catch (final Throwable throwable) { throw new AxisFault("Web Service EJB Invocation failed: method " + operation.getMethod(), throwable); } }