Examples of SOAPBindingAnnotation


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

       
        return wsa;
    }
   
    private SOAPBindingAnnotation getSOAPBindingAnnotation(Port port) {
        SOAPBindingAnnotation soapBindingAnn = null;
        isDocStyle = port.getStyle() == null || port.getStyle().equals(SOAPStyle.DOCUMENT);
        if(!isDocStyle){
            soapBindingAnn = new SOAPBindingAnnotation();
            soapBindingAnn.setStyle("SOAPBinding.Style.RPC");
            port.setWrapped(true);
        }
        if(isDocStyle){
            boolean first = true;
            boolean isWrapper = true;
            for(Operation operation:port.getOperations()){
                if(first){
                    isWrapper = operation.isWrapped();
                    first = false;
                    continue;
                }
                sameParamStyle = (isWrapper == operation.isWrapped());
                if(!sameParamStyle)
                    break;
            }
            if(sameParamStyle)
                port.setWrapped(isWrapper);
        }
        if(sameParamStyle && !port.isWrapped()){
            if(soapBindingAnn == null)
                soapBindingAnn = new SOAPBindingAnnotation();
            soapBindingAnn.setParameterStyle("SOAPBinding.ParameterStyle.BARE");
        }
       
        return soapBindingAnn;
    }
View Full Code Here

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

    }
   
    private SOAPBindingAnnotation getSOAPBindingAnnotation(Operation operation) {
        //DOC/BARE
     
      SOAPBindingAnnotation soapBindingAnnotation = null;
     
        if (!sameParamStyle) {
            if(!operation.isWrapped()) {
              soapBindingAnnotation = new SOAPBindingAnnotation();
              soapBindingAnnotation.setParameterStyle("SOAPBinding.ParameterStyle.BARE");
             
            }
        }
        return soapBindingAnnotation;
    }
View Full Code Here

Examples of org.codehaus.xfire.annotations.soap.SOAPBindingAnnotation

    }

    public void testGetSOAPBindingAnnotation()
            throws Exception
    {
        SOAPBindingAnnotation soapBinding = webAnnotations.getSOAPBindingAnnotation(echoServiceClass);
        assertNotNull(soapBinding);
        assertEquals(SOAPBindingAnnotation.STYLE_RPC, soapBinding.getStyle());
        assertEquals(SOAPBindingAnnotation.USE_LITERAL, soapBinding.getUse());
        assertEquals(SOAPBindingAnnotation.PARAMETER_STYLE_WRAPPED, soapBinding.getParameterStyle());
    }
View Full Code Here

Examples of org.codehaus.xfire.annotations.soap.SOAPBindingAnnotation

    public SOAPBindingAnnotation getSOAPBindingAnnotation(Class clazz)
    {
        SOAPBinding binding = (SOAPBinding) clazz.getAnnotation(SOAPBinding.class);

        SOAPBindingAnnotation annot = null;
        if (binding != null)
        {
            annot = new SOAPBindingAnnotation();
            if (binding.parameterStyle() == SOAPBinding.ParameterStyle.BARE)
            {
                annot.setParameterStyle(SOAPBindingAnnotation.PARAMETER_STYLE_BARE);
            }
            else if (binding.parameterStyle() == SOAPBinding.ParameterStyle.WRAPPED)
            {
                annot.setParameterStyle(SOAPBindingAnnotation.PARAMETER_STYLE_WRAPPED);
            }

            if (binding.style() == SOAPBinding.Style.DOCUMENT)
            {
                annot.setStyle(SOAPBindingAnnotation.STYLE_DOCUMENT);
            }
            else if (binding.style() == SOAPBinding.Style.RPC)
            {
                annot.setStyle(SOAPBindingAnnotation.STYLE_RPC);
            }

            if (binding.use() == SOAPBinding.Use.ENCODED)
            {
                annot.setUse(SOAPBindingAnnotation.USE_ENCODED);
            }
            else if (binding.use() == SOAPBinding.Use.LITERAL)
            {
                annot.setUse(SOAPBindingAnnotation.USE_LITERAL);
            }
        }

        return annot;
    }
View Full Code Here

Examples of org.codehaus.xfire.annotations.soap.SOAPBindingAnnotation

        webAnnotationsControl.setReturnValue(true);

        webAnnotations.hasHandlerChainAnnotation(EchoServiceImpl.class);
        webAnnotationsControl.setDefaultReturnValue(false);
       
        SOAPBindingAnnotation soapBinding = new SOAPBindingAnnotation();
        soapBinding.setUse(SOAPBindingAnnotation.USE_LITERAL);

        webAnnotations.getSOAPBindingAnnotation(EchoServiceImpl.class);
        webAnnotationsControl.setReturnValue(soapBinding);

        webAnnotations.hasWebServiceAnnotation(EchoServiceImpl.class);
View Full Code Here

Examples of org.codehaus.xfire.annotations.soap.SOAPBindingAnnotation

                portType = createPortType(name, webServiceAnnotation);
            }
           
            if (webAnnotations.hasSOAPBindingAnnotation(endpointInterface))
            {
                SOAPBindingAnnotation soapBindingAnnotation =
                    webAnnotations.getSOAPBindingAnnotation(endpointInterface);
               
                style = soapBindingAnnotation.getStyleString();
                use =  soapBindingAnnotation.getUseString();
            }

            // Allow the user to override informations given in the annotations
            if (!properties.containsKey(PORT_TYPE))
            {
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.