Package org.reficio.ws.it.util

Examples of org.reficio.ws.it.util.ClientBuilder


    @Test
    public void testService1_httpProxy_defaultProxySetting() throws Exception {
        HttpProxyServer proxyServer = initProxy();
        try {
            verifyServiceBehavior(1, new ClientBuilder() {
                @Override
                public SoapClient buildClient(String endpointUrl) {
                    return SoapClient.builder().endpointUri("http://" + endpointUrl)
                            .build();
                }
View Full Code Here


    @Test
    public void testService1_httpProxy_directProxy() throws Exception {
        HttpProxyServer proxyServer = initProxy();
        try {
            verifyServiceBehavior(1, new ClientBuilder() {
                @Override
                public SoapClient buildClient(String endpointUrl) {
                    return SoapClient.builder().endpointUri("http://" + endpointUrl)
                            .build();
                }
View Full Code Here

    @Test
    public void testService1_httpProxy_noAuthentication() throws Exception {
        HttpProxyServer proxyServer = initProxy();
        try {
            verifyServiceBehavior(1, new ClientBuilder() {
                @Override
                public SoapClient buildClient(String endpointUrl) {
                    return SoapClient.builder().endpointUri("http://" + endpointUrl)
                            .proxyUri("http://127.0.0.1:" + PROXY_PORT)
                            .build();
View Full Code Here

            final Security security = Security.builder()
                    .authBasic("tom", "007")
                    .build();

            verifyServiceBehavior(1, new ClientBuilder() {
                @Override
                public SoapClient buildClient(String endpointUrl) {
                    return SoapClient.builder()
                            .endpointUri("http://" + endpointUrl)
                            .proxyUri("http://127.0.0.1:" + PROXY_PORT)
View Full Code Here

        final Security props = Security.builder()
                .authBasic("james", "003")
                .build();

        try {
            verifyServiceBehavior(1, new ClientBuilder() {
                @Override
                public SoapClient buildClient(String endpointUrl) {
                    return SoapClient.builder().endpointUri("http://" + endpointUrl)
                            .proxyUri("http://127.0.0.1:" + PROXY_PORT)
                            .proxySecurity(props)
View Full Code Here

    public void testService2_wrongKeyStore_failure() throws Exception {

        exception.expect(SoapClientException.class);
        exception.expectMessage("not authenticated");

        verifyServiceBehavior(2, new ClientBuilder() {
            @Override
            public SoapClient buildClient(String endpointUrl) {
                Security securityContext = Security.builder()
                        .trustStoreUrl(getKeyStoreUrlTwo())
                        .trustStorePassword(getKeyStorePassword())
View Full Code Here

//        });
//    }

    @Test
    public void testService1_httpProxy_noAuthentication() throws Exception {
        verifyServiceBehavior(1, new ClientBuilder() {
            @Override
            public SoapClient buildClient(String endpointUrl) {
                return SoapClient.builder().endpointUri("https://" + endpointUrl)
                        .endpointSecurity(endpointSecurity())
                        .proxyUri("https://127.0.0.1:" + PROXY_SSL_PORT)
View Full Code Here

                .trustStoreUrl(getKeyStoreUrlTwo())
                .trustStorePassword(getKeyStorePassword())
                .authBasic("tom", "007")
                .build();

        verifyServiceBehavior(1, new ClientBuilder() {
            @Override
            public SoapClient buildClient(String endpointUrl) {
                return SoapClient.builder().endpointUri("https://" + endpointUrl)
                        .endpointSecurity(endpointSecurity())
                        .proxyUri("https://127.0.0.1:" + PROXY_SSL_PORT)
View Full Code Here

                .trustStoreUrl(getKeyStoreUrlTwo())
                .trustStorePassword(getKeyStorePassword())
                .authBasic("james", "003")
                .build();

        verifyServiceBehavior(1, new ClientBuilder() {
            @Override
            public SoapClient buildClient(String endpointUrl) {
                return SoapClient.builder().endpointUri("https://" + endpointUrl)
                        .endpointSecurity(endpointSecurity())
                        .proxyUri("https://127.0.0.1:" + PROXY_SSL_PORT)
View Full Code Here

            final Security securityContext = Security.builder()
                    .trustStoreUrl(getKeyStoreUrlOne())
                    .trustStorePassword(getKeyStorePassword())
                    .build();

            verifyServiceBehavior(1, new ClientBuilder() {
                @Override
                public SoapClient buildClient(String endpointUrl) {
                    return SoapClient.builder().endpointUri("https://" + endpointUrl)
                            .endpointSecurity(securityContext)
                            .build();
View Full Code Here

TOP

Related Classes of org.reficio.ws.it.util.ClientBuilder

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.