Examples of OperationDesc


Examples of org.apache.axis.description.OperationDesc

    }

    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 (InvalidateReferenceException e) {
            interceptor.createExceptionResult(e.getCause());
        } catch (ApplicationException e) {
            interceptor.createExceptionResult(e.getCause());
        } catch (Throwable throwable) {
            throw new AxisFault("Web Service EJB Invocation failed: method " + operation.getMethod(), throwable);
        }
    }
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

        TypeMapping typeMapping = tmr.getOrMakeTypeMapping(serviceDesc.getUse().getEncoding());

        serviceDesc.setTypeMappingRegistry(tmr);
        serviceDesc.setTypeMapping(typeMapping);

        OperationDesc op = new OperationDesc();
        op.setName("echoString");
        op.setStyle(Style.RPC);
        op.setUse(Use.ENCODED);
        Class beanClass = EchoBean.class;
        op.setMethod(beanClass.getMethod("echoString", String.class));
        ParameterDesc parameter =
            new ParameterDesc(
                new QName("http://ws.apache.org/echosample", "in0"),
                ParameterDesc.IN,
                typeMapping.getTypeQName(String.class),
                String.class,
                false,
                false);
        op.addParameter(parameter);
        serviceDesc.addOperationDesc(op);

        serviceDesc.getOperations();
        ReadOnlyServiceDesc sd = new ReadOnlyServiceDesc(serviceDesc);
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

     */
    public void loadMetaData()
    {     
        for ( Iterator itr = getOperations().iterator(); itr.hasNext(); )
        {
            OperationDesc operation = ( OperationDesc ) itr.next();
           
            customizeOperation( operation );
           
            if ( !isValidOperation( operation ) ||
                 hideOperation( operation ) )
            {
                log.debug( "Removing method " + operation.getName() );
                itr.remove();
            }
        }
    }
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

        if (methodType > -1)
        {
            // Already set, nothing more to do
            return;
        }
        OperationDesc operation = msgContext.getOperation();
        String methodSignature = operation.getMethod().toString().toLowerCase();
        if (methodSignature.indexOf(METHOD_BODYARRAY) != -1)
        {
            methodType = OperationDesc.MSG_METHOD_BODYARRAY;
        }
        else if (methodSignature.indexOf(METHOD_ELEMENTARRAY) != -1)
        {
            methodType = OperationDesc.MSG_METHOD_ELEMENTARRAY;
        }
        else if (methodSignature.indexOf(METHOD_DOCUMENT) != -1)
        {
            methodType = OperationDesc.MSG_METHOD_DOCUMENT;
        }
        else
        {
            methodType = OperationDesc.MSG_METHOD_SOAPENVELOPE;
        }
        operation.setMessageOperationStyle(methodType);
        logger.debug("Now Invoking service (Method Format) " + operation.getMethod().toString());
        logger.debug("Now Invoking service (MethodType) "
                     + String.valueOf(operation.getMessageOperationStyle()));
    }
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

                    parameters[j] = new ParameterDesc(parameter.getName(), mode, parameter.getType());
                }

                soapService.getServiceDescription().addOperationDesc(
                        new OperationDesc(method.getName().getLocalPart(), parameters, method.getReturnType()));
                buf.append(method.getName().getLocalPart() + ",");
            }
            methodNames = buf.toString();
            methodNames = methodNames.substring(0, methodNames.length() - 1);
        }
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

            }
            ArrayList operations = sd.getOperations();
            if (!operations.isEmpty())
            {
                response.write("<ul>");
                OperationDesc desc;
                for (Iterator it = operations.iterator(); it.hasNext();)
                {
                    desc = (OperationDesc)it.next();
                    response.write("<li>" + desc.getName());
                }
                response.write("</ul>");
            }
        }
        response.write("</ul>");
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

            SchemaTypeKey key = (SchemaTypeKey) iter.next();
            qNameToKey.put(key.getqName(), key);
        }

        for (Iterator iter = operations.iterator(); iter.hasNext();) {
            OperationDesc operationDesc = (OperationDesc) iter.next();
            ArrayList parameters = new ArrayList(operationDesc.getParameters());
            ParameterDesc returnParameterDesc = operationDesc.getReturnParamDesc();
            if (null != returnParameterDesc.getTypeQName() &&
                    false == returnParameterDesc.getTypeQName().equals(XMLType.AXIS_VOID)) {
                parameters.add(returnParameterDesc);
            }
            for (Iterator iterator = parameters.iterator(); iterator.hasNext();) {
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

        TypeMapping typeMapping = tmr.getOrMakeTypeMapping(serviceDesc.getUse().getEncoding());

        serviceDesc.setTypeMappingRegistry(tmr);
        serviceDesc.setTypeMapping(typeMapping);

        OperationDesc op = new OperationDesc();
        op.setName("echoString");
        op.setStyle(Style.RPC);
        op.setUse(Use.ENCODED);
        Class beanClass = EchoBean.class;
        op.setMethod(beanClass.getMethod("echoString", new Class[] { String.class }));
        ParameterDesc parameter =
            new ParameterDesc(
                new QName("http://ws.apache.org/echosample", "in0"),
                ParameterDesc.IN,
                typeMapping.getTypeQName(String.class),
                String.class,
                false,
                false);
        op.addParameter(parameter);
        serviceDesc.addOperationDesc(op);

        serviceDesc.getOperations();
        ReadOnlyServiceDesc sd = new ReadOnlyServiceDesc(serviceDesc, Collections.EMPTY_LIST);
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

//        }

        Collection operations = new ArrayList();
        Set wrapperElementQNames = buildOperations(binding, serviceEndpointInterface, isLightweight, portInfo, exceptionMap, classLoader, operations);
        for (Iterator iter = operations.iterator(); iter.hasNext();) {
            OperationDesc operation = (OperationDesc) iter.next();
            serviceDesc.addOperationDesc(operation);
        }

        TypeMappingRegistryImpl tmr = new TypeMappingRegistryImpl();
        tmr.doRegisterFromVersion("1.3");
View Full Code Here

Examples of org.apache.axis.description.OperationDesc

                     if ( !operations.isEmpty(  ) )
                     {
                        sb.append( "<ul>\n" );
                        for ( Iterator it = operations.iterator(  ); it.hasNext(  ); )
                        {
                           OperationDesc desc = (OperationDesc) it.next(  );
                           sb.append( "<li>" + desc.getName(  ) );
                        }

                        sb.append( "</ul>\n" );
                     }
                  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.