Examples of WebMethod


Examples of javax.jws.WebMethod

        Class<?> clz = classLoader.loadClass("org.apache.cxf.w2j.hello_world_async_soap_http.GreeterAsync");

        Method method1 = clz.getMethod("greetMeSometimeAsync", new Class[] {java.lang.String.class,
                                                                            javax.xml.ws.AsyncHandler.class});
        WebMethod webMethodAnno1 = AnnotationUtil.getPrivMethodAnnotation(method1, WebMethod.class);

        assertEquals(method1.getName() + "()" + " Annotation : WebMethod.operationName ", "greetMeSometime",
                     webMethodAnno1.operationName());

        java.lang.reflect.Method method2 = clz.getMethod("greetMeSometimeAsync",
                                                         new Class[] {java.lang.String.class});
        WebMethod webMethodAnno2 = AnnotationUtil.getPrivMethodAnnotation(method2, WebMethod.class);
        assertEquals(method2.getName() + "()" + " Annotation : WebMethod.operationName ", "greetMeSometime",
                     webMethodAnno2.operationName());

        method1 = clz.getMethod("greetMeSometimeAsync", new Class[] {java.lang.String.class,
                                                                     javax.xml.ws.AsyncHandler.class});
        try {
            method1 = clz.getMethod("testIntAsync", new Class[] {Integer.TYPE,
View Full Code Here

Examples of javax.jws.WebMethod

        WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
        assertEquals("Greeter", webServiceAnn.name());

        Method method = clz.getMethod("sayHi", new Class[] {});
        WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
        if (webMethodAnno.operationName() != null
            && !"".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());

        WebResult webResultAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class);

        assertEquals("responseType", webResultAnno.name());

        method = clz.getMethod("pingMe", new Class[] {});
        webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
        if (webMethodAnno.operationName() != null
            && !"".equals(webMethodAnno.operationName())) {
            assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "pingMe",
                     webMethodAnno.operationName());
        }
        Class[] exceptionCls = method.getExceptionTypes();
        assertEquals(1, exceptionCls.length);
        assertEquals("org.apache.cxf.w2j.hello_world_soap12_http.PingMeFault",
                     exceptionCls[0].getName());
View Full Code Here

Examples of org.codehaus.enunciate.contract.jaxws.WebMethod

  private WebMethod webMethod;
  private String var = "webFault";

  //Inherited.
  protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException {
    WebMethod webMethod = this.webMethod;
    if (webMethod == null) {
      throw new MissingParameterException("webMethod");
    }

    return webMethod.getWebFaults().iterator();
  }
View Full Code Here

Examples of org.vnetcon.xml.ws.servlet.dao.WebMethod

   

    while (i < publicMethods.length) {
      Method m = publicMethods[i];
      if (m.toString().startsWith("public ")) {
        WebMethod webMethod = new WebMethod(this.wsClass, m);
        webMethods.add(webMethod);
       
//        String retType = webMethod.getReturnType().getSchemaElement();
//        System.out.println("method: " + m.toString());
//        System.out.println("  return: " + retType);
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.