Package javax.jws

Examples of javax.jws.WebParam.header()


                for (int i = 0; i < 2; i++) {
                    assertTrue(annotations[i][0] instanceof WebParam);
                    WebParam parm = (WebParam)annotations[i][0];
                    if ("Toppings".equals(parm.name())) {
                        assertEquals("http://cxf.apache.org/pizza_wrapped/types", parm.targetNamespace());
                        assertTrue(!parm.header());
                    } else if ("CallerIDHeader".equals(parm.name())) {
                        assertEquals("http://cxf.apache.org/pizza_wrapped/types", parm.targetNamespace());
                        assertTrue(parm.header());
                    } else {
                        fail("No WebParam found!");
View Full Code Here


                    if ("Toppings".equals(parm.name())) {
                        assertEquals("http://cxf.apache.org/pizza_wrapped/types", parm.targetNamespace());
                        assertTrue(!parm.header());
                    } else if ("CallerIDHeader".equals(parm.name())) {
                        assertEquals("http://cxf.apache.org/pizza_wrapped/types", parm.targetNamespace());
                        assertTrue(parm.header());
                    } else {
                        fail("No WebParam found!");
                    }
                }
            }
View Full Code Here

        //assertNotNull(soapBindingAnno);
        //assertEquals(SOAPBinding.ParameterStyle.BARE, soapBindingAnno.parameterStyle());

        WebParam webParamAnno = AnnotationUtil.getWebParam(method, "SOAPHeaderInfo");
        assertEquals("INOUT", webParamAnno.mode().name());
        assertEquals(true, webParamAnno.header());
        assertEquals("header_info", webParamAnno.partName());

    }

    @Test
View Full Code Here

        Class<?> para = classLoader.loadClass("org.apache.cxf.w2j.hello_world_holder.types.GreetMe");
        Method method = clz.getMethod("sayHi", new Class[] {Holder.class, para});
        assertEquals("GreetMeResponse", method.getReturnType().getSimpleName());

        WebParam webParamAnno = AnnotationUtil.getWebParam(method, "greetMe");
        assertEquals(true, webParamAnno.header());

        webParamAnno = AnnotationUtil.getWebParam(method, "sayHi");
        assertEquals("INOUT", webParamAnno.mode().name());

    }
View Full Code Here

                assertTrue(annotations[1][0] instanceof WebParam);
                WebParam parm = (WebParam)annotations[1][0];
                assertEquals("http://apache.org/header_test/rpc/types", parm.targetNamespace());
                assertEquals("inHeader", parm.partName());
                assertEquals("headerMessage", parm.name());
                assertTrue(parm.header());
            }
        }

        for (Method m : meths) {
            if ("testInOutHeader".equals(m.getName())) {
View Full Code Here

                assertTrue(annotations[1][0] instanceof WebParam);
                WebParam parm = (WebParam)annotations[1][0];
                assertEquals("http://apache.org/header_test/rpc/types", parm.targetNamespace());
                assertEquals("inOutHeader", parm.partName());
                assertEquals("headerMessage", parm.name());
                assertTrue(parm.header());
            }
        }
    }

    @Test
View Full Code Here

        Class sei =  classLoader.loadClass("org.apache.cxf.helloworld.HelloWorldServiceImpl");
        Method m[] = sei.getDeclaredMethods();
        assertEquals(1, m.length);
        assertTrue(m[0].getParameterAnnotations()[1][0] instanceof WebParam);
        WebParam wp = (WebParam)m[0].getParameterAnnotations()[1][0];
        assertTrue(wp.header());
    }

}
View Full Code Here

        String tns = null;
        String local = null;
        if (param != null) {
            //if it's a "wrapped" thing, the WebParam namespace is irrelevant
            //as the generated element has to be in the namespace of the wrapper type
            if (param.header() || !op.isUnwrapped()) {
                tns = param.targetNamespace();
            }
            local = param.name();
        }
       
View Full Code Here

        if (webResult != null
            && webResult.header()) {
            for (int x = 0; x < method.getParameterTypes().length; x++) {
                WebParam parm = getWebParam(method, x);
                if (parm != null
                    && !parm.header()
                    && parm.mode() != WebParam.Mode.IN) {
                    return null;
                }
            }
            //all outs are headers, thus it's an empty body part
View Full Code Here

    @Override
    public Boolean isHeader(Method method, int j) {
        method = getDeclaredMethod(method);
        if (j >= 0) {
            WebParam webParam = getWebParam(method, j);
            return webParam != null && webParam.header();
        } else {
            WebResult webResult = getWebResult(method);
            return webResult != null && webResult.header();
        }
    }
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.