Package org.codehaus.xfire.gen

Examples of org.codehaus.xfire.gen.SchemaSupport


            return;
        }
       
        JDefinedClass jc = context.getCodeModel()._class(clsName, getClassType());
       
        SchemaSupport schema = context.getSchemaGenerator();
        String documentation = service.getServiceInfo().getDocumentation();
        if( documentation != null ){
            jc.javadoc().add(documentation);   
        }
       
View Full Code Here


    private void generateOperation(GenerationContext context, OperationInfo op, JMethod method)
        throws GenerationException
    {
        Collection bindings = getCurrentService().getBindings();
        SchemaSupport schema = context.getSchemaGenerator();
       
        List<String> partNames = new ArrayList<String>();
       
        Map<String, ParamInfo> params = new HashMap<String, ParamInfo>();
        // input parts
        MessageInfo inputMsg = op.getInputMessage();
        for (Iterator pitr = inputMsg.getMessageParts().iterator(); pitr.hasNext();)
        {
            MessagePartInfo part = (MessagePartInfo) pitr.next();
           
            String varName = getUniqueName(javify(part.getName().getLocalPart()), partNames);
            partNames.add(varName);

            JType paramType = schema.getType(context, part);
            ParamInfo param = new ParamInfo(paramType,varName);
            param.setIn(true);
            param.setName(part.getName());
            param.setPart(part);
            params.put(varName, param );

        }
  
        // input parts for each binding
        for (Iterator itr = bindings.iterator(); itr.hasNext();)
        {
            Binding binding = (Binding) itr.next();
            annotate(context, op, method, binding);
           
            List headers = binding.getHeaders(inputMsg).getMessageParts();
            for (Iterator bitr = headers.iterator(); bitr.hasNext();)
            {
                MessagePartInfo part = (MessagePartInfo) bitr.next();
               
                String varName = getUniqueName(javify(part.getName().getLocalPart()), partNames);
                partNames.add(varName);

                JType paramType = schema.getType(context, part);

                ParamInfo param = new ParamInfo(paramType,varName, true);
                param.setIn(true);
                param.setName(part.getName());
                param.setPart(part);
View Full Code Here

    protected JClass generateExceptionClass(GenerationContext context, FaultInfo fault, MessagePartInfo part)
        throws GenerationException
    {
        JCodeModel model = context.getCodeModel();
        SchemaSupport schema = context.getSchemaGenerator();
       
        String name = javify(fault.getMessageName().getLocalPart());
        name = name.substring(0, 1).toUpperCase() + name.substring(1);
        JType paramType = schema.getType(context, part);

        String clsName = getPackage(fault.getOperation().getService().getService().getName(), context) + "." + name;
       
        JDefinedClass exCls;
        try
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.gen.SchemaSupport

Copyright © 2018 www.massapicom. 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.