Package org.apache.cxf.tools.common.model

Examples of org.apache.cxf.tools.common.model.JavaAnnotation.addArgument()


        resultAnnotation.addArgument("name", name);
        resultAnnotation.addArgIgnoreEmpty("targetNamespace", targetNamespace, "\"");

        if (method.getSoapStyle() == SOAPBinding.Style.RPC
            || (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT && !method.isWrapperStyle())) {
            resultAnnotation.addArgument("partName", method.getReturn().getName());
        }

        method.addAnnotation("WebResult", resultAnnotation);
        method.getInterface().addImport("javax.jws.WebResult");
    }
View Full Code Here


        JavaParameter asyncHandler = new JavaParameter();
        asyncHandler.setName("asyncHandler");
        asyncHandler.setCallback(true);
        asyncHandler.setClassName(getAsyncClassName(method, "AsyncHandler"));
        JavaAnnotation asyncHandlerAnnotation = new JavaAnnotation("WebParam");
        asyncHandlerAnnotation.addArgument("name", "asyncHandler");
        asyncHandlerAnnotation.addArgument("targetNamespace", "");
        asyncHandler.setAnnotation(asyncHandlerAnnotation);
        asyncHandler.setStyle(JavaType.Style.IN);

        callbackMethod.addParameter(asyncHandler);
View Full Code Here

        asyncHandler.setName("asyncHandler");
        asyncHandler.setCallback(true);
        asyncHandler.setClassName(getAsyncClassName(method, "AsyncHandler"));
        JavaAnnotation asyncHandlerAnnotation = new JavaAnnotation("WebParam");
        asyncHandlerAnnotation.addArgument("name", "asyncHandler");
        asyncHandlerAnnotation.addArgument("targetNamespace", "");
        asyncHandler.setAnnotation(asyncHandlerAnnotation);
        asyncHandler.setStyle(JavaType.Style.IN);

        callbackMethod.addParameter(asyncHandler);
View Full Code Here

                }

                if (headerType == this.resultHeader) {
                    JavaAnnotation resultAnno = jm.getAnnotationMap().get("WebResult");
                    if (resultAnno != null) {
                        resultAnno.addArgument("header", "true", "");
                    }
                }
                processParameter(jm, bop);
            }
        }
View Full Code Here

        } else {
            throw new RuntimeException("WrapperBeanAnnotator expect JavaClass as input");
        }

        JavaAnnotation xmlRootElement = new JavaAnnotation("XmlRootElement");
        xmlRootElement.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlRootElement.addArgument("namespace", wrapperBeanClass.getElementName().getNamespaceURI());

        JavaAnnotation xmlAccessorType = new JavaAnnotation("XmlAccessorType");
        xmlAccessorType.addArgument("XmlAccessType.FIELD", "null", "");
View Full Code Here

            throw new RuntimeException("WrapperBeanAnnotator expect JavaClass as input");
        }

        JavaAnnotation xmlRootElement = new JavaAnnotation("XmlRootElement");
        xmlRootElement.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlRootElement.addArgument("namespace", wrapperBeanClass.getElementName().getNamespaceURI());

        JavaAnnotation xmlAccessorType = new JavaAnnotation("XmlAccessorType");
        xmlAccessorType.addArgument("XmlAccessType.FIELD", "null", "");

        JavaAnnotation xmlType = new JavaAnnotation("XmlType");
View Full Code Here

        JavaAnnotation xmlRootElement = new JavaAnnotation("XmlRootElement");
        xmlRootElement.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlRootElement.addArgument("namespace", wrapperBeanClass.getElementName().getNamespaceURI());

        JavaAnnotation xmlAccessorType = new JavaAnnotation("XmlAccessorType");
        xmlAccessorType.addArgument("XmlAccessType.FIELD", "null", "");

        JavaAnnotation xmlType = new JavaAnnotation("XmlType");
        //xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlType.addArgument("namespace", wrapperBeanClass.getElementName().getNamespaceURI());
View Full Code Here

        JavaAnnotation xmlAccessorType = new JavaAnnotation("XmlAccessorType");
        xmlAccessorType.addArgument("XmlAccessType.FIELD", "null", "");

        JavaAnnotation xmlType = new JavaAnnotation("XmlType");
        //xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlType.addArgument("namespace", wrapperBeanClass.getElementName().getNamespaceURI());
        // Revisit: why annotation is string?
        wrapperBeanClass.addAnnotation(xmlRootElement.toString());
        wrapperBeanClass.addAnnotation(xmlAccessorType.toString());
        wrapperBeanClass.addAnnotation(xmlType.toString());
View Full Code Here

        xmlAccessorType.addArgument("XmlAccessType.FIELD", "null", "");

        JavaAnnotation xmlType = new JavaAnnotation("XmlType");
        //xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
        xmlType.addArgument("namespace", wrapperBeanClass.getElementName().getNamespaceURI());
        // Revisit: why annotation is string?
        wrapperBeanClass.addAnnotation(xmlRootElement.toString());
        wrapperBeanClass.addAnnotation(xmlAccessorType.toString());
        wrapperBeanClass.addAnnotation(xmlType.toString());
View Full Code Here

            throw new RuntimeException("WrapperBeanFiledAnnotator expect JavaField as input");
        }
        String rawName = jField.getRawName();
        JavaAnnotation xmlElementAnnotation = new JavaAnnotation("XmlElement");
       
        xmlElementAnnotation.addArgument("name", rawName);
        xmlElementAnnotation.addArgIgnoreEmpty("namespace", jField.getTargetNamespace(), "\"");

        jField.setAnnotation(xmlElementAnnotation);
        jField.getOwner().addImport("javax.xml.bind.annotation.XmlElement");
    }
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.