Search in sources :

Example 1 with RPCElement

use of org.apache.axis.message.RPCElement in project tomee by apache.

the class EjbRpcProvider method processMessage.

public void processMessage(MessageContext msgContext, SOAPEnvelope reqEnv, SOAPEnvelope resEnv, Object obj) throws Exception {
    RPCElement body = getBody(reqEnv, msgContext);
    OperationDesc operation = getOperationDesc(msgContext, body);
    AxisRpcInterceptor interceptor = new AxisRpcInterceptor(operation, msgContext);
    SOAPMessage message = msgContext.getMessage();
    try {
        message.getSOAPPart().getEnvelope();
        msgContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION, Boolean.FALSE);
        RpcContainer container = (RpcContainer) ejbDeployment.getContainer();
        Object[] arguments = { msgContext, interceptor };
        Class callInterface = ejbDeployment.getServiceEndpointInterface();
        Object result = container.invoke(ejbDeployment.getDeploymentID(), InterfaceType.SERVICE_ENDPOINT, callInterface, operation.getMethod(), arguments, null);
        interceptor.createResult(result);
    } catch (ApplicationException e) {
        interceptor.createExceptionResult(e.getCause());
    } catch (Throwable throwable) {
        throw new AxisFault("Web Service EJB Invocation failed: method " + operation.getMethod(), throwable);
    }
}
Also used : AxisFault(org.apache.axis.AxisFault) RpcContainer(org.apache.openejb.RpcContainer) ApplicationException(org.apache.openejb.ApplicationException) RPCElement(org.apache.axis.message.RPCElement) OperationDesc(org.apache.axis.description.OperationDesc) SOAPMessage(javax.xml.soap.SOAPMessage)

Aggregations

SOAPMessage (javax.xml.soap.SOAPMessage)1 AxisFault (org.apache.axis.AxisFault)1 OperationDesc (org.apache.axis.description.OperationDesc)1 RPCElement (org.apache.axis.message.RPCElement)1 ApplicationException (org.apache.openejb.ApplicationException)1 RpcContainer (org.apache.openejb.RpcContainer)1