Package javax.xml.ws

Examples of javax.xml.ws.RequestWrapper


    }


    private Object buildPayloadFromRequest(Object[] args) {

        RequestWrapper ann = getMethod().getAnnotation(RequestWrapper.class);
        assert ann != null : "failed to get request wrapper annotation";
           
        Object wrapper = createWrapperInstance(ann.className());
        int argIndex = 0;

        Collection<WebParam> annotations = getWebParamAnnotations(getMethod());

        for (WebParam wp : annotations) {
View Full Code Here


    private boolean isRequestPayload(Object payload) {
       
        Method m = getMethod();

        RequestWrapper reqWrapper = m.getAnnotation(RequestWrapper.class);
        ResponseWrapper respWrapper = m.getAnnotation(ResponseWrapper.class);
       
        if (reqWrapper != null) {
            return payload.getClass().getName().equals(reqWrapper.className());
        } else if (respWrapper != null) {
            return !payload.getClass().getName().equals(respWrapper.className());
        }
        return true;
    }
View Full Code Here

                    //ignore - not a valid JAXB fault thing
                }
            }
            try {
                //Get the RequestWrapper
                RequestWrapper reqWrapper = meth.getAnnotation(RequestWrapper.class);
                if (reqWrapper != null) {
                    Class cls = Class.forName(reqWrapper.className(), false,
                                        loader);
                    addClass(cls, classes);
                }
                //Get the RequestWrapper
                ResponseWrapper respWrapper = meth.getAnnotation(ResponseWrapper.class);
View Full Code Here

                                   method,
                                   webFault.name(),
                                   true);
            } else {
                if (ContextUtils.isRequestor(context)) {
                    RequestWrapper requestWrapper =
                        method.getAnnotation(RequestWrapper.class);
                    if (requestWrapper != null) {
                        action = getAction(requestWrapper.targetNamespace(),
                                           method,
                                           requestWrapper.localName(),
                                           false);
                    } else {
                        //TODO: What if the WSDL is RPC-Literal encoded.
                        // We need to get action out of available annotations?
                        //
View Full Code Here

        Method method = clz.getMethod("sayHi", new Class[] {});
        WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
        assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
                     webMethodAnno.operationName());

        RequestWrapper requestWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                  RequestWrapper.class);

        assertEquals("org.objectweb.hello_world_soap_http.types.SayHi", requestWrapperAnn.className());

        ResponseWrapper resposneWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                    ResponseWrapper.class);

        assertEquals("sayHiResponse", resposneWrapperAnn.localName());
View Full Code Here

        javaMethod.setSoapStyle(SOAPBinding.Style.DOCUMENT);
        javaMethod.setWrapperStyle(true);
        setMethodUse(javaMethod, method);

        // process request
        RequestWrapper reqWrapper = method.getAnnotation(RequestWrapper.class);
        String reqClassName = "";
        String reqName = method.getName();
        String reqNS = model.getTargetNameSpace();
        if (reqWrapper != null) {
            reqClassName = reqWrapper.className().length() > 0 ? reqWrapper.className() : reqClassName;
            reqName = reqWrapper.localName().length() > 0 ? reqWrapper.localName() : reqName;
            reqNS = reqWrapper.targetNamespace().length() > 0 ? reqWrapper.targetNamespace() : reqNS;
        } else {
            reqClassName = model.getPackageName() + ".types." + AnnotationUtil.capitalize(method.getName());
        }

        Class reqClass = null;
View Full Code Here

            && !"".equals(webMethodAnno.operationName())) {
            assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
                     webMethodAnno.operationName());
        }

        RequestWrapper requestWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                  RequestWrapper.class);

        assertEquals("org.apache.cxf.w2j.hello_world_soap12_http.types.SayHi",
                     requestWrapperAnn.className());

        ResponseWrapper resposneWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                    ResponseWrapper.class);

        assertEquals("sayHiResponse", resposneWrapperAnn.localName());
View Full Code Here

            && !"".equals(webMethodAnno.operationName())) {
            assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "sayHi",
                     webMethodAnno.operationName());
        }

        RequestWrapper requestWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                  RequestWrapper.class);

        assertEquals("org.apache.cxf.w2j.hello_world_soap_http.types.SayHi", requestWrapperAnn.className());

        ResponseWrapper resposneWrapperAnn = AnnotationUtil.getPrivMethodAnnotation(method,
                                                                                    ResponseWrapper.class);

        assertEquals("sayHiResponse", resposneWrapperAnn.localName());
View Full Code Here

     * @param mdc    - <code>MethodDescriptionComposite</code>
     * @param method - <code>Method</code>
     */
    private void attachRequestWrapperAnnotation(MethodDescriptionComposite mdc, Method
            method) {
        RequestWrapper requestWrapper = (RequestWrapper)ConverterUtils.getAnnotation(
                RequestWrapper.class, method);
        if (requestWrapper != null) {
            RequestWrapperAnnot rwAnnot = RequestWrapperAnnot.createRequestWrapperAnnotImpl();
            rwAnnot.setClassName(requestWrapper.className());
            rwAnnot.setLocalName(requestWrapper.localName());
            rwAnnot.setTargetNamespace(requestWrapper.targetNamespace());
            mdc.setRequestWrapperAnnot(rwAnnot);
        }
    }
View Full Code Here

        }
    }
    @Override
    public String getRequestWrapperPartName(OperationInfo op, Method method) {
        method = getDeclaredMethod(method);
        RequestWrapper rw = method.getAnnotation(RequestWrapper.class);
        if (rw != null) {
            return getWithReflection(RequestWrapper.class, rw, "partName");
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of javax.xml.ws.RequestWrapper

Copyright © 2018 www.massapicom. 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.