Examples of WebServiceClient


Examples of code.satyagraha.gfm.support.api.WebServiceClient

        given(config.getApiUrl()).willReturn(apiUrl);

        WebProxyConfig webProxyConfig = mock(WebProxyConfig.class);
        SSLSocketFactory sslSocketFactory = mock(SSLSocketFactory.class);
        ClientConnectionManager connectionManager = new ClientConnManagerDefault(sslSocketFactory);
        WebServiceClient webServiceClient = new WebServiceClientDefault(config, webProxyConfig, connectionManager);

        Random random = new Random();

        // construct the tasks to run
        int threadCount = 50;
View Full Code Here

Examples of com.consol.citrus.ws.client.WebServiceClient

        Map<String, WebServiceClient> messageSenders = beanDefinitionContext.getBeansOfType(WebServiceClient.class);

        Assert.assertEquals(messageSenders.size(), 6);

        // 1st message sender
        WebServiceClient client = messageSenders.get("soapClient1");
        Assert.assertEquals(client.getEndpointConfiguration().getDefaultUri(), "http://localhost:8080/test");
        Assert.assertTrue(client.getEndpointConfiguration().getMessageFactory() instanceof SoapMessageFactory);
        Assert.assertEquals(client.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);
        Assert.assertNotNull(client.getEndpointConfiguration().getInterceptor());
        Assert.assertEquals(client.getEndpointConfiguration().getInterceptor().getClass(), LoggingClientInterceptor.class);
        Assert.assertTrue(client.getEndpointConfiguration().getMessageConverter() instanceof SoapMessageConverter);
        Assert.assertEquals(client.getEndpointConfiguration().getErrorHandlingStrategy(), ErrorHandlingStrategy.THROWS_EXCEPTION);
        Assert.assertEquals(client.getEndpointConfiguration().getTimeout(), 5000L);
        Assert.assertNotNull(client.getEndpointConfiguration().getWebServiceTemplate());

        // 2nd message sender
        client = messageSenders.get("soapClient2");
        Assert.assertEquals(client.getEndpointConfiguration().getDefaultUri(), "http://localhost:8080/test");
        Assert.assertEquals(client.getEndpointConfiguration().getMessageFactory(), beanDefinitionContext.getBean("soapMessageFactory"));
        Assert.assertEquals(client.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);
        Assert.assertEquals(client.getEndpointConfiguration().getEndpointResolver(), beanDefinitionContext.getBean("endpointResolver"));
        Assert.assertEquals(client.getEndpointConfiguration().getErrorHandlingStrategy(), ErrorHandlingStrategy.THROWS_EXCEPTION);
        Assert.assertEquals(client.getEndpointConfiguration().getTimeout(), 10000L);
        Assert.assertNotNull(client.getEndpointConfiguration().getWebServiceTemplate());
        Assert.assertEquals(client.getEndpointConfiguration().getWebServiceTemplate().getMessageFactory(), beanDefinitionContext.getBean("soapMessageFactory"));

        // 3rd message sender
        client = messageSenders.get("soapClient3");
        Assert.assertEquals(client.getEndpointConfiguration().getDefaultUri(), "http://localhost:8080/test");
        Assert.assertNotNull(client.getEndpointConfiguration().getCorrelator());
        Assert.assertEquals(client.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator"));
        Assert.assertEquals(client.getEndpointConfiguration().getErrorHandlingStrategy(), ErrorHandlingStrategy.THROWS_EXCEPTION);
        Assert.assertNotNull(client.getEndpointConfiguration().getWebServiceTemplate());
        Assert.assertEquals(client.getEndpointConfiguration().getWebServiceTemplate(), beanDefinitionContext.getBean("wsTemplate"));

        // 4th message sender
        client = messageSenders.get("soapClient4");
        Assert.assertEquals(client.getEndpointConfiguration().getDefaultUri(), "http://localhost:8080/test");
        Assert.assertTrue(client.getEndpointConfiguration().getMessageFactory() instanceof SoapMessageFactory);
        Assert.assertEquals(client.getEndpointConfiguration().getErrorHandlingStrategy(), ErrorHandlingStrategy.THROWS_EXCEPTION);
        Assert.assertNotNull(client.getEndpointConfiguration().getMessageSender());
        Assert.assertEquals(client.getEndpointConfiguration().getMessageSender(), beanDefinitionContext.getBean("wsMessageSender"));
        Assert.assertNotNull(client.getEndpointConfiguration().getInterceptor());
        Assert.assertEquals(client.getEndpointConfiguration().getInterceptor(), beanDefinitionContext.getBean("singleInterceptor"));
        Assert.assertNotNull(client.getEndpointConfiguration().getWebServiceTemplate());
        Assert.assertEquals(client.getEndpointConfiguration().getWebServiceTemplate().getInterceptors().length, 1L);
        Assert.assertTrue(client.getEndpointConfiguration().getMessageConverter() instanceof WsAddressingMessageConverter);

        // 5th message sender
        client = messageSenders.get("soapClient5");
        Assert.assertEquals(client.getEndpointConfiguration().getDefaultUri(), "http://localhost:8080/test");
        Assert.assertEquals(client.getEndpointConfiguration().getErrorHandlingStrategy(), ErrorHandlingStrategy.PROPAGATE);
        Assert.assertNotNull(client.getEndpointConfiguration().getInterceptors());
        Assert.assertEquals(client.getEndpointConfiguration().getInterceptors().size(), 2L);
        Assert.assertEquals(client.getEndpointConfiguration().getInterceptors().get(0), beanDefinitionContext.getBean("interceptor1"));
        Assert.assertEquals(client.getEndpointConfiguration().getInterceptors().get(1), beanDefinitionContext.getBean("interceptor2"));
        Assert.assertEquals(client.getEndpointConfiguration().getPollingInterval(), 250L);
        Assert.assertNotNull(client.getEndpointConfiguration().getWebServiceTemplate());
        Assert.assertEquals(client.getEndpointConfiguration().getWebServiceTemplate().getInterceptors().length, 2L);

        // 5th message sender
        client = messageSenders.get("soapClient6");
        Assert.assertNotNull(client.getActor());
        Assert.assertEquals(client.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
    }
View Full Code Here

Examples of com.google.greaze.webservice.client.WebServiceClient

   */
  private static final String SERVER_BASE_URL = "http://localhost:8888/greazeexampleservice";

  private final WebServiceClient wsClient;
  public ExampleClient() {
    wsClient = new WebServiceClient(new ServerConfig(SERVER_BASE_URL));
  }
View Full Code Here

Examples of javax.xml.ws.WebServiceClient

        processor.setContext(env);
        processor.execute();

        Class clz = classLoader
            .loadClass("org.apache.cxf.w2j.hello_world_soap_http.service.SOAPServiceTest1");
        WebServiceClient webServiceClient = AnnotationUtil
            .getPrivClassAnnotation(clz, WebServiceClient.class);
        assertEquals("http://cxf.apache.org/w2j/hello_world_soap_http/service",
                     webServiceClient.targetNamespace());
        File file = new File(output,
                             "org/apache/cxf/w2j/hello_world_soap_http/Greeter_SoapPortTest1_Client.java");
        FileInputStream fin = new FileInputStream(file);
        byte[] buffer = new byte[30000];
        int index = -1;
View Full Code Here

Examples of javax.xml.ws.WebServiceClient

                return;
            } else {
                // Generated Service class specified.
                // Get the wsdl and service qname from the WebServiceClient annotation
                // of the generated Service class
                WebServiceClient webServiceClient =
                    (WebServiceClient) this.serviceClass.getAnnotation(WebServiceClient.class);
                if (webServiceClient != null) {
                    this.wsdlURI = getWSDLLocation(webServiceClient);
                    this.serviceQName = getServiceQName(webServiceClient);
                }
View Full Code Here

Examples of javax.xml.ws.WebServiceClient

        // WSDL document location
        if (!serviceRef.isSetWsdlFile()) {
            String wsdlLocation = annotation.wsdlLocation();

            if (wsdlLocation == null || wsdlLocation.trim().length() == 0) {
                WebServiceClient wsClient = null;
                if (Object.class.equals(webServiceRefValue)) {
                    wsClient = (WebServiceClient) webServiceRefType.getAnnotation(WebServiceClient.class);
                } else {
                    wsClient = (WebServiceClient) webServiceRefValue.getAnnotation(WebServiceClient.class);
                }
                if (wsClient == null) {
                    wsdlLocation = null;
                } else {
                    wsdlLocation = wsClient.wsdlLocation();
                }
            }

            if (wsdlLocation != null && wsdlLocation.trim().length() > 0) {
                XsdAnyURIType wsdlFile = serviceRef.addNewWsdlFile();
View Full Code Here

Examples of javax.xml.ws.WebServiceClient

     * <code>DescriptionBuildercomposite</code>
     *
     * @param composite - <code>DescriptionBuilderComposite</code>
     */
    private void attachWebServiceClientAnnotation(DescriptionBuilderComposite composite) {
        WebServiceClient webServiceClient = (WebServiceClient)ConverterUtils.
                getAnnotation(WebServiceClient.class, serviceClass);
        if (webServiceClient != null) {

        }

View Full Code Here

Examples of javax.xml.ws.WebServiceClient

        processor.setContext(env);
        processor.execute();

        Class clz = classLoader
            .loadClass("org.apache.cxf.w2j.hello_world_soap_http.service.SOAPServiceTest1");
        WebServiceClient webServiceClient = AnnotationUtil
            .getPrivClassAnnotation(clz, WebServiceClient.class);
        assertEquals("http://cxf.apache.org/w2j/hello_world_soap_http/service",
                     webServiceClient.targetNamespace());
        File file = new File(output,
                             "org/apache/cxf/w2j/hello_world_soap_http/Greeter_SoapPortTest1_Client.java");
        FileInputStream fin = new FileInputStream(file);
        byte[] buffer = new byte[30000];
        int index = -1;
View Full Code Here

Examples of javax.xml.ws.WebServiceClient

                getLocation("/wsdl2java_wsdl/bug321/hello_world_different_ns_service.wsdl"));
        processor.setContext(env);
        processor.execute();

        Class clz = classLoader.loadClass("org.apache.hello_world_soap_http.service.SOAPServiceTest1");
        WebServiceClient webServiceClient = AnnotationUtil
            .getPrivClassAnnotation(clz, WebServiceClient.class);
        assertEquals("http://apache.org/hello_world_soap_http/service", webServiceClient.targetNamespace());
        File file = new File(output, "org/apache/hello_world_soap_http/Greeter_SoapPortTest1_Client.java");
        FileInputStream fin = new FileInputStream(file);
        byte[] buffer = new byte[30000];
        int index = -1;
        int size = fin.read(buffer);
View Full Code Here

Examples of javax.xml.ws.WebServiceClient

                getLocation("/wsdl2java_wsdl/bug321/hello_world_different_ns_service.wsdl"));
        processor.setContext(env);
        processor.execute();

        Class clz = classLoader.loadClass("org.apache.hello_world_soap_http.service.SOAPServiceTest1");
        WebServiceClient webServiceClient = AnnotationUtil
            .getPrivClassAnnotation(clz, WebServiceClient.class);
        assertEquals("http://apache.org/hello_world_soap_http/service", webServiceClient.targetNamespace());
        File file = new File(output, "org/apache/hello_world_soap_http/Greeter_SoapPortTest1_Client.java");
        FileInputStream fin = new FileInputStream(file);
        byte[] buffer = new byte[30000];
        int index = -1;
        int size = fin.read(buffer);
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.