Package javax.jws

Examples of javax.jws.WebParam.mode()


        // Marshal parts of mode that should notbe ignored and are not part of
        // the SOAP Headers
        Object[] args = (Object[])objCtx.getMessageObjects();
        for (int idx = 0; idx < noArgs; idx++) {
            WebParam param = callback.getWebParam(idx);
            if ((param.mode() != ignoreParamMode) && param.header()) {
                SOAPHeader header = envelope.getHeader();
                wroteHeader = true;
                Object partValue = args[idx];
                if (param.mode() != WebParam.Mode.IN) {
                    partValue = ((Holder)args[idx]).value;
View Full Code Here


            for (Annotation anno : paraAnns[i]) {
                if (anno.annotationType() == WebParam.class) {
                    WebParam webParam = (WebParam)anno;

                    if (!webParam.header()
                        && (webParam.mode() == WebParam.Mode.IN || webParam.mode() == WebParam.Mode.INOUT)) {
                        criteria1 = true;
                    }

                    if (!method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
                        && (webParam.mode() == WebParam.Mode.OUT || webParam.mode() == WebParam.Mode.INOUT)) {
View Full Code Here

            for (Annotation anno : paraAnns[i]) {
                if (anno.annotationType() == WebParam.class) {
                    WebParam webParam = (WebParam)anno;

                    if (!webParam.header()
                        && (webParam.mode() == WebParam.Mode.IN || webParam.mode() == WebParam.Mode.INOUT)) {
                        criteria1 = true;
                    }

                    if (!method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
                        && (webParam.mode() == WebParam.Mode.OUT || webParam.mode() == WebParam.Mode.INOUT)) {
View Full Code Here

                        && (webParam.mode() == WebParam.Mode.IN || webParam.mode() == WebParam.Mode.INOUT)) {
                        criteria1 = true;
                    }

                    if (!method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
                        && (webParam.mode() == WebParam.Mode.OUT || webParam.mode() == WebParam.Mode.INOUT)) {
                        criteria2 = false;

                    }

                    if (method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
View Full Code Here

                        && (webParam.mode() == WebParam.Mode.IN || webParam.mode() == WebParam.Mode.INOUT)) {
                        criteria1 = true;
                    }

                    if (!method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
                        && (webParam.mode() == WebParam.Mode.OUT || webParam.mode() == WebParam.Mode.INOUT)) {
                        criteria2 = false;

                    }

                    if (method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
View Full Code Here

                        criteria2 = false;

                    }

                    if (method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
                        && (webParam.mode() == WebParam.Mode.OUT || webParam.mode() == WebParam.Mode.INOUT)) {
                        nonHeaderParamCount++;
                    }

                    paraName = webParam.name().length() > 0 ? webParam.name() : paraName;
                    partName = webParam.partName().length() > 0 ? webParam.partName() : paraName;
View Full Code Here

                        criteria2 = false;

                    }

                    if (method.getReturnType().getName().equalsIgnoreCase("void") && !webParam.header()
                        && (webParam.mode() == WebParam.Mode.OUT || webParam.mode() == WebParam.Mode.INOUT)) {
                        nonHeaderParamCount++;
                    }

                    paraName = webParam.name().length() > 0 ? webParam.name() : paraName;
                    partName = webParam.partName().length() > 0 ? webParam.partName() : paraName;
View Full Code Here

                    QName requestQN = new QName(paraTNS, paraName);
                    TypeReference typeref = new TypeReference(requestQN, clazz, paraAnns[i]);
                    JavaParameter jp;
                    if (holder) {
                        if (webParam.mode() == WebParam.Mode.INOUT) {
                            jp = new JavaParameter(typeref.tagName.getLocalPart(), typeref,
                                                   JavaType.Style.INOUT);
                        } else {
                            jp = new JavaParameter(typeref.tagName.getLocalPart(), typeref,
                                                   JavaType.Style.OUT);
View Full Code Here

        }
        WebParam webParamAnno = AnnotationUtil.getWebParam(method, "testHeaderMessage");
        if (webParamAnno == null) {
            fail("Missing 'inoutHeader' WebParam Annotation of method testHeader4!");
        }
        assertEquals("INOUT", webParamAnno.mode().name());
        assertEquals(true, webParamAnno.header());
        assertEquals("inoutHeader", webParamAnno.partName());
    }

    public void testSoapHeaderBinding() throws Exception {
View Full Code Here

        Class clz = classLoader.loadClass("org.objectweb.mapping.SomethingServer");
        Method method = clz.getMethod("doSomething", new Class[] {int.class, javax.xml.ws.Holder.class,
                                                                  javax.xml.ws.Holder.class});
        assertEquals("boolean", method.getReturnType().getSimpleName());
        WebParam webParamAnno = AnnotationUtil.getWebParam(method, "y");
        assertEquals("INOUT", webParamAnno.mode().name());
        webParamAnno = AnnotationUtil.getWebParam(method, "z");
        assertEquals("OUT", webParamAnno.mode().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.