Package org.codehaus.xfire.annotations

Examples of org.codehaus.xfire.annotations.WebServiceAnnotation


        control.setReturnValue(false);
        webAnnotations.hasSOAPBindingAnnotation(EchoImpl.class);
        control.setReturnValue(false);
        webAnnotations.hasWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(true);
        WebServiceAnnotation serviceAnnotation = new WebServiceAnnotation();
        serviceAnnotation.setServiceName("EchoService");
        webAnnotations.getWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(serviceAnnotation);
        webAnnotations.getWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(serviceAnnotation);
       
View Full Code Here


        throws Exception
    {
        MockControl control = MockControl.createControl(WebAnnotations.class);
        WebAnnotations webAnnotations = (WebAnnotations) control.getMock();
       
        WebServiceAnnotation serviceAnnotation = new WebServiceAnnotation();
        webAnnotations.getWebServiceAnnotation(Echo.class);
        control.setDefaultReturnValue(serviceAnnotation);
       
        webAnnotations.hasWebServiceAnnotation(Echo.class);
        control.setDefaultReturnValue(true);
       
        webAnnotations.hasWebServiceAnnotation(EchoImpl.class);
        control.setDefaultReturnValue(true);
        webAnnotations.hasHandlerChainAnnotation(EchoImpl.class);
        control.setReturnValue(false);
        webAnnotations.hasSOAPBindingAnnotation(Echo.class);
        control.setReturnValue(false);
        webAnnotations.hasWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(true);
       
        serviceAnnotation = new WebServiceAnnotation();
        serviceAnnotation.setServiceName("Echo");
        serviceAnnotation.setTargetNamespace("urn:Echo");
        serviceAnnotation.setEndpointInterface(Echo.class.getName());
        webAnnotations.getWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(serviceAnnotation);
        webAnnotations.getWebServiceAnnotation(EchoImpl.class);
        control.setReturnValue(serviceAnnotation);
       
View Full Code Here

        throws Exception
    {
        MockControl control = MockControl.createControl(WebAnnotations.class);
        WebAnnotations webAnnotations = (WebAnnotations) control.getMock();
       
        WebServiceAnnotation serviceAnnotation = new WebServiceAnnotation();
        webAnnotations.getWebServiceAnnotation(Echo.class);
        control.setDefaultReturnValue(serviceAnnotation);
       
        webAnnotations.hasWebServiceAnnotation(Echo.class);
        control.setDefaultReturnValue(true);
       
        webAnnotations.hasSOAPBindingAnnotation(Echo.class);
        control.setReturnValue(false);
       
        serviceAnnotation = new WebServiceAnnotation();
        serviceAnnotation.setServiceName("Echo");
        serviceAnnotation.setTargetNamespace("urn:Echo");
        webAnnotations.getWebServiceAnnotation(Echo.class);
        control.setDefaultReturnValue(serviceAnnotation);
       
        Method echoMethod = EchoImpl.class.getMethod("echo", new Class[]{String.class});
        webAnnotations.hasWebMethodAnnotation(echoMethod);
View Full Code Here

        return null;
    }

    public WebServiceAnnotation getWebServiceAnnotation(Class aClass)
    {
        return new WebServiceAnnotation();
    }
View Full Code Here

    public WebServiceAnnotation getWebServiceAnnotation(Class clazz)
    {
        WebService webService = (WebService) clazz.getAnnotation(WebService.class);
        if (webService != null)
        {
            WebServiceAnnotation annotation = new WebServiceAnnotation();
            annotation.setEndpointInterface(webService.endpointInterface());
            annotation.setName(webService.name());
            annotation.setServiceName(webService.serviceName());
            annotation.setTargetNamespace(webService.targetNamespace());
            annotation.setPortName(webService.portName());
            annotation.setWsdlLocation(webService.wsdlLocation());
           
            return annotation;
        }
        else
        {
View Full Code Here

    }

    public void testGetWebServiceAnnotation()
            throws Exception
    {
        WebServiceAnnotation webService = webAnnotations.getWebServiceAnnotation(echoServiceClass);
        assertNotNull(webService);
        assertEquals("EchoService", webService.getName());
        assertEquals("http://www.openuri.org/2004/04/HelloWorld", webService.getTargetNamespace());
    }
View Full Code Here

    }

    public void testGetNullWebServiceAnnotation()
            throws Exception
    {
        WebServiceAnnotation webService = webAnnotations.getWebServiceAnnotation(thisClass);
        assertNull(webService);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.annotations.WebServiceAnnotation

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.