Package javax.jws

Examples of javax.jws.WebResult.targetNamespace()


                        parameterModes.set(i, getParameterMode(parameterTypes[i], null));
                    }
                }
                WebResult result = method.getAnnotation(WebResult.class);
                if (result != null) {
                    String ns = getValue(result.targetNamespace(), tns);
                    // Default to <operationName>Response for doc-bare
                    String name = getValue(result.name(), documentStyle ? operationName + "Response" : "return");
                    QName element = new QName(ns, name);
                    Object logical = operation.getOutputType().getLogical();
                    if (logical instanceof XMLType) {
View Full Code Here


                }

                List<ElementInfo> outputElements = new ArrayList<ElementInfo>();
                WebResult result = method.getAnnotation(WebResult.class);
                // Default to "" for doc-lit-wrapped && non-header
                ns = result != null ? result.targetNamespace() : "";
                ns = getValue(ns, documentStyle && (result == null || !result.header()) ? "" : tns);
                name = result != null ? result.name() : "";
                name = getValue(name, "return");
                QName element = new QName(ns, name);
View Full Code Here

            }
        } else {
            Class<?> type = method.getReturnType();
            WebResult webResult = method.getAnnotation(WebResult.class);
            if (webResult != null) {
                return new TypeInfo(type.getName(), new QName(webResult.targetNamespace(), webResult.name()));
            }
        }
        throw new RuntimeCamelException("The method " + method.getName()
                + " has no ResponseWrapper and no suitable return type");
    }
View Full Code Here

            return new TypeInfo(null, null);
        } else {
            Class<?> type = method.getReturnType();
            WebResult webResult = method.getAnnotation(WebResult.class);
            if (webResult != null) {
                return new TypeInfo(type.getName(), new QName(webResult.targetNamespace(), webResult.name()));
            } else {
                throw new IllegalArgumentException("Result type of method " + method.getName()
                    + " is not annotated with WebParam. This is not yet supported");
            }
        }
View Full Code Here

                        parameterModes.set(i, getParameterMode(parameterTypes[i], null));
                    }
                }
                WebResult result = method.getAnnotation(WebResult.class);
                if (result != null) {
                    String ns = getValue(result.targetNamespace(), tns);
                    // Default to <operationName>Response for doc-bare
                    String name = getValue(result.name(), documentStyle ? operationName + "Response" : "return");
                    QName element = new QName(ns, name);
                    Object logical = operation.getOutputType().getLogical();
                    if (logical instanceof XMLType) {
View Full Code Here

                }

                List<ElementInfo> outputElements = new ArrayList<ElementInfo>();
                WebResult result = method.getAnnotation(WebResult.class);
                // Default to "" for doc-lit-wrapped && non-header
                ns = result != null ? result.targetNamespace() : "";
                ns = getValue(ns, documentStyle && (result == null || !result.header()) ? "" : tns);
                name = result != null ? result.name() : "";
                name = getValue(name, "return");
                QName element = new QName(ns, name);
View Full Code Here

        env.put(ToolConstants.CFG_ALLOW_ELEMENT_REFS, "true");
        processor.setContext(env);
        processor.execute();
        Class<?> clz = classLoader.loadClass("org.apache.cxf.tools.fortest.cxf2944.WebResultService");
        WebResult webResult = AnnotationUtil.getWebResult(clz.getMethods()[0]);
        assertEquals("hello/name", webResult.targetNamespace());
        assertEquals("name", webResult.name());
    }

    @Test
    public void testCXF2935() throws Exception {
View Full Code Here

        Class<?> clz = classLoader.loadClass("org.apache.locator.LocatorService");

        Class<?> paraClass = classLoader.loadClass("org.apache.locator.types.QueryEndpoints");
        Method method = clz.getMethod("queryEndpoints", new Class[] {paraClass});
        WebResult webRes = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class);
        assertEquals("http://apache.org/locator/types", webRes.targetNamespace());
        assertEquals("queryEndpointsResponse", webRes.name());
        WebParam webParamAnn = AnnotationUtil.getWebParam(method, "queryEndpoints");
        assertEquals("http://apache.org/locator/types", webParamAnn.targetNamespace());

        method = clz.getMethod("deregisterPeerManager", new Class[] {String.class});
View Full Code Here

        env.put(ToolConstants.CFG_ALLOW_ELEMENT_REFS, "true");
        processor.setContext(env);
        processor.execute();
        Class<?> clz = classLoader.loadClass("org.apache.cxf.tools.fortest.cxf2944.WebResultService");
        WebResult webResult = AnnotationUtil.getWebResult(clz.getMethods()[0]);
        assertEquals("hello/name", webResult.targetNamespace());
        assertEquals("name", webResult.name());     
    }
   
    @Test
    public void testCXF2935() throws Exception {
View Full Code Here

                    String ns = tns;
                    // Default to <operationName>Response for doc-bare
                    String name = (documentStyle ? operationName + "Response" : "return");
                    WebResult result = method.getAnnotation(WebResult.class);
                    if (result != null) {
                        if (!"".equals(result.targetNamespace()))
                            ns = result.targetNamespace();
                        if (!"".equals(result.name()))
                            name = result.name();
                    }
                    QName element = new QName(ns, name);
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.