Examples of WebParamAnnotation


Examples of com.leansoft.mwsc.model.annotation.WebParamAnnotation

        }
        return soapBindingAnnotation;
    }
   
    private WebParamAnnotation getWebParamAnnotation(Operation operation, JavaParameter javaParameter) {
      WebParamAnnotation webParamAnnotation = new WebParamAnnotation();
     
        Parameter param = javaParameter.getParameter();
        Request req = operation.getRequest();
        Response res = operation.getResponse();

        boolean header = isHeaderParam(param, req) ||
            (res != null && isHeaderParam(param, res));

        String name;
        boolean isWrapped = operation.isWrapped();

        if((param.getBlock().getLocation() == Block.HEADER) || (isDocStyle && !isWrapped))
            name = param.getBlock().getName().getLocalPart();
        else
            name = param.getName();

        webParamAnnotation.setName(name);

        String ns= null;

        if (isDocStyle) {
            ns = param.getBlock().getName().getNamespaceURI(); // its bare nsuri
            if(isWrapped){
                ns = param.getType().getName().getNamespaceURI();
            }
        }else if(header){
            ns = param.getBlock().getName().getNamespaceURI();
        }

        if((ns != null) && (!ns.equals(serviceNS) || (isDocStyle && isWrapped)))
            webParamAnnotation.setTargetNamespace(ns);

        if (header) {
            webParamAnnotation.setHeader(true);
        }

        if (param.isINOUT()){
            webParamAnnotation.setMode("javax.jws.WebParam.Mode.INOUT");
        }else if ((res != null) && (isMessageParam(param, res) || isHeaderParam(param, res) || isAttachmentParam(param, res) ||
                isUnboundParam(param,res) || param.isOUT())){
            webParamAnnotation.setMode("javax.jws.WebParam.Mode.OUT");
        }

        //doclit wrapped could have additional headers
        if(!(isDocStyle && isWrapped) || header)
          webParamAnnotation.setPartName(javaParameter.getParameter().getName());
       
        return webParamAnnotation;
    }
View Full Code Here

Examples of org.apache.axis2.jsr181.WebParamAnnotation

    protected String getParameterName(Annotation[][] parameterAnnotation,
                                      int j,
                                      String[] parameterNames) {
        String parameterName = null;
        if (parameterAnnotation.length > 0) {
            WebParamAnnotation annotation =
                    JSR181Helper.INSTANCE.getWebParamAnnotation(parameterAnnotation[j]);
            if (annotation != null) {
                parameterName = annotation.getName();
            }
        }
        if (parameterName == null || "".equals(parameterName)) {
            if(parameterNames != null && parameterNames.length > j) {
                parameterName = parameterNames[j];
View Full Code Here

Examples of org.apache.axis2.jsr181.WebParamAnnotation

    protected String getParameterName(Annotation[][] parameterAnnotation,
                                      int j,
                                      String[] parameterNames) {
        String parameterName = null;
        if (parameterAnnotation.length > 0) {
            WebParamAnnotation annotation =
                    JSR181Helper.INSTANCE.getWebParamAnnotation(parameterAnnotation[j]);
            if (annotation != null) {
                parameterName = annotation.getName();
            }
        }
        if (parameterName == null || "".equals(parameterName)) {
            if(parameterNames != null && parameterNames.length > j) {
                parameterName = parameterNames[j];
View Full Code Here

Examples of org.apache.axis2.jsr181.WebParamAnnotation

    protected String getParameterName(Annotation[][] parameterAnnotation,
                                      int j,
                                      String[] parameterNames) {
        String parameterName = null;
        if (parameterAnnotation.length > 0) {
            WebParamAnnotation annotation =
                    JSR181Helper.INSTANCE.getWebParamAnnotation(parameterAnnotation[j]);
            if (annotation != null) {
                parameterName = annotation.getName();
            }
        }
        if (parameterName == null || "".equals(parameterName)) {
            if(parameterNames != null && parameterNames.length > j) {
                parameterName = parameterNames[j];
View Full Code Here

Examples of org.codehaus.xfire.annotations.WebParamAnnotation

                break;
            }
        }
        if (webParam != null)
        {
            WebParamAnnotation annot = new WebParamAnnotation();
            annot.setName(webParam.name());
            annot.setTargetNamespace(webParam.targetNamespace());
            annot.setHeader(webParam.header());
            annot.setPartName(webParam.partName());
           
            if (webParam.mode() == WebParam.Mode.IN)
            {
                annot.setMode(WebParamAnnotation.MODE_IN);
            }
            else if (webParam.mode() == WebParam.Mode.INOUT)
            {
                annot.setMode(WebParamAnnotation.MODE_INOUT);
            }
            else if (webParam.mode() == WebParam.Mode.OUT)
            {
                annot.setMode(WebParamAnnotation.MODE_OUT);
            }

            return annot;
        }
        else
View Full Code Here

Examples of org.codehaus.xfire.annotations.WebParamAnnotation

    }

    public void testGetWebParamAnnotation()
            throws Exception
    {
        WebParamAnnotation webParam = webAnnotations.getWebParamAnnotation(echoMethod, 0);
        assertNotNull(webParam);
        assertEquals("echoParam", webParam.getName());
    }
View Full Code Here

Examples of org.codehaus.xfire.annotations.WebParamAnnotation

    }

    public void testGetNullWebParamAnnotation()
            throws Exception
    {
        WebParamAnnotation webParam = webAnnotations.getWebParamAnnotation(dummyMethod, 0);
        assertNull(webParam);
    }
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.