Package javax.jws

Examples of javax.jws.WebParam.header()


                    assertTrue(annotations[i][0] instanceof WebParam);
                    WebParam parm = (WebParam)annotations[i][0];
                    if ("OrderPizza".equals(parm.name())) {
                        assertEquals("http://mypizzaco.com/pizza/types", parm.targetNamespace());
                        assertEquals("OrderPizza", parm.name());
                        assertTrue(!parm.header());
                    } else if ("CallerIDHeader".equals(parm.name())) {
                        fail("If the exsh turned off, should not generate this parameter");
                    } else {
                        fail("No WebParam found!");
                    }
View Full Code Here


                    assertTrue(annotations[i][0] instanceof WebParam);
                    WebParam parm = (WebParam)annotations[i][0];
                    if ("OrderPizza".equals(parm.name())) {
                        assertEquals("http://mypizzaco.com/pizza/types", parm.targetNamespace());
                        assertEquals("OrderPizza", parm.name());
                        assertTrue(!parm.header());
                    } else if ("CallerIDHeader".equals(parm.name())) {
                        fail("If the exsh turned off, should not generate this parameter");
                    } else {
                        fail("No WebParam found!");
                    }
View Full Code Here

                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

        assertEquals("LITERAL", soapBindingAnno.use().name());
        assertEquals("DOCUMENT", soapBindingAnno.style().name());


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

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

        method = clz.getMethod("testInOut", Holder.class, Integer.TYPE);
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());
    }
   
    @Test
    public void testCXFNotType() throws Exception {
        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world.wsdl"));
View Full Code Here

                List<ElementInfo> inputElements = new ArrayList<ElementInfo>();
                for (int i = 0; i < method.getParameterTypes().length; i++) {
                    WebParam param = getAnnotation(method, i, WebParam.class);
                    ns = param != null ? param.targetNamespace() : "";
                    // Default to "" for doc-lit-wrapped && non-header
                    ns = getValue(ns, documentStyle && (param == null || !param.header()) ? "" : tns);
                    name = param != null ? param.name() : "";
                    name = getValue(name, "arg" + i);
                    QName element = new QName(ns, name);
                    Object logical = operation.getInputType().getLogical().get(i).getLogical();
                    if (logical instanceof XMLType) {
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.