Package javax.jws.soap

Examples of javax.jws.soap.SOAPBinding.style()


    }
   
    public void testEcho() throws Exception
    {  
        SOAPBinding ann = EchoPortType.class.getAnnotation(SOAPBinding.class);
        assertEquals(SOAPBinding.Style.RPC, ann.style());
       
        EchoClient stub = new EchoClient();
        EchoPortType client = stub.getEchoPortTypeLocalEndpoint();
   
        assertNotNull(client);
View Full Code Here


            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)
            {
View Full Code Here

            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)
View Full Code Here

        Class clz = classLoader.loadClass("org.objectweb.hello_world_rpclit.GreeterRPCLit");

        SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
        assertEquals("LITERAL", soapBindingAnno.use().toString());
        assertEquals("RPC", soapBindingAnno.style().toString());

        assertEquals("Generate operation error", 3, clz.getMethods().length);

        Class paraClass = classLoader.loadClass("org.objectweb.hello_world_rpclit.types.MyComplexStruct");
        Method method = clz.getMethod("sendReceiveData", new Class[] {paraClass});
View Full Code Here

        assertEquals(3, clz.getMethods().length);

        SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
        assertEquals("BARE", soapBindingAnno.parameterStyle().name());
        assertEquals("LITERAL", soapBindingAnno.use().name());
        assertEquals("DOCUMENT", soapBindingAnno.style().name());

        Class para = classLoader.loadClass("org.objectweb.InoutHeader");

        Method method = clz.getMethod("inoutHeader", new Class[] {para, Holder.class});
View Full Code Here

        assertEquals(1, clz.getMethods().length);

        SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
        assertEquals("BARE", soapBindingAnno.parameterStyle().name());
        assertEquals("LITERAL", soapBindingAnno.use().name());
        assertEquals("DOCUMENT", soapBindingAnno.style().name());

        Class para = classLoader.loadClass("org.objectweb.hello_world_holder.types.GreetMe");
        Method method = clz.getMethod("sayHi", new Class[] {para, Holder.class});
        assertEquals("SayHi", method.getReturnType().getSimpleName());
       
View Full Code Here

    private int getMethodType(Method method) {
        SOAPBinding binding = method.getAnnotation(SOAPBinding.class);
        int result = WSDLConstants.ERORR_STYLE_USE;
        if (binding != null) {
            if (binding.style() == SOAPBinding.Style.RPC) {
                result = WSDLConstants.RPC_WRAPPED;
            }
            if (binding.style() == SOAPBinding.Style.DOCUMENT
                && binding.parameterStyle() == SOAPBinding.ParameterStyle.WRAPPED) {
                result = WSDLConstants.DOC_WRAPPED;
View Full Code Here

        int result = WSDLConstants.ERORR_STYLE_USE;
        if (binding != null) {
            if (binding.style() == SOAPBinding.Style.RPC) {
                result = WSDLConstants.RPC_WRAPPED;
            }
            if (binding.style() == SOAPBinding.Style.DOCUMENT
                && binding.parameterStyle() == SOAPBinding.ParameterStyle.WRAPPED) {
                result = WSDLConstants.DOC_WRAPPED;
            }
            if (binding.style() == SOAPBinding.Style.DOCUMENT
                && binding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) {
View Full Code Here

            }
            if (binding.style() == SOAPBinding.Style.DOCUMENT
                && binding.parameterStyle() == SOAPBinding.ParameterStyle.WRAPPED) {
                result = WSDLConstants.DOC_WRAPPED;
            }
            if (binding.style() == SOAPBinding.Style.DOCUMENT
                && binding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) {
                result = WSDLConstants.DOC_BARE;
            }

        } else {
View Full Code Here

        javax.jws.WebService ws = AnnotationUtil.getPrivClassAnnotation(clz, javax.jws.WebService.class);

        SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
        assertEquals("LITERAL", soapBindingAnno.use().toString());
        assertEquals("RPC", soapBindingAnno.style().toString());
       
        assertEquals("Generate operation error", 3, clz.getMethods().length);

        Class<?> paraClass = classLoader
            .loadClass("org.apache.cxf.w2j.hello_world_rpclit.types.MyComplexStruct");
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.