Package org.apache.axis2.jaxws.sample.wrap.sei

Examples of org.apache.axis2.jaxws.sample.wrap.sei.DocLitWrap


        public void testJAXBCB_Server2(){
            TestLogger.logger.debug("------------------------------");
            TestLogger.logger.debug("Test  : " + getName());
            try{
                String reqString = "JAXBCustomBuilderServer2";
                DocLitWrap proxy = getProxy();
               
                // Start Monitoring
                proxy.twoWay("JAXBCustomBuilderMonitorStart");
               
                String response = proxy.twoWay(reqString);
                // The returned response will contain the number of JAXBCustomBuilders
                // usages.
                TestLogger.logger.debug("Response 1 =" + response);
                Integer r1 = Integer.parseInt(response);
                String response2 = proxy.twoWay(reqString);
                TestLogger.logger.debug("Response 2 =" + response2);
                // The returned response will contain the number of JAXBCustomBuilders
                // usages.  This should be greater than the first response
                Integer r2 = Integer.parseInt(response2);
                assertTrue(r2.intValue() > r1.intValue());
                TestLogger.logger.debug("------------------------------");
               

                // End Monitoring
                proxy.twoWay("JAXBCustomBuilderMonitorEnd");
            }catch(Exception e){
                e.printStackTrace();
                fail();
            }
        }
View Full Code Here


        public void testJAXBCB_Client(){
            TestLogger.logger.debug("------------------------------");
            TestLogger.logger.debug("Test  : " + getName());
            try{
                String reqString = "JAXBCustomBuilderClient";
                DocLitWrap proxy = getProxy();
               
                // Start Monitoring
                JAXBCustomBuilderMonitor.setMonitoring(true);
                JAXBCustomBuilderMonitor.clear();
               
                // Invoke the web services
                proxy.twoWay(reqString);
               
                // The second invoke should trigger the fast
                // unmarshalling of the response
                proxy.twoWay(reqString);
               
               
                // The returned response unmarshalling should try
                // the JAXBCustomBuilder
                int totalBuilders = JAXBCustomBuilderMonitor.getTotalBuilders();
View Full Code Here

            TestLogger.logger.debug("------------------------------");
            TestLogger.logger.debug("Test  : " + getName());
            try{
                String reqNormalString = "JAXBCustomBuilderClient";
                String reqFaultString = "JAXBCustomBuilderFault";
                DocLitWrap proxy = getProxy();
               
                // Start Monitoring
                JAXBCustomBuilderMonitor.setMonitoring(true);
                JAXBCustomBuilderMonitor.clear();
               
                try {
                    // Invoke the web services
                    proxy.twoWay(reqNormalString);
                   
                    // This second invoke will cause
                    // an exception to be thrown.
                    proxy.twoWay(reqFaultString);
                   
                    // An exception was expected
                    assertTrue(false);
                } catch (WebServiceException wse) {
                    // An exception is expected
View Full Code Here

    public void testFaultyWebService_badEndpoint_oneWay() {
        String host = "this.is.a.bad.endpoint.terrible.in.fact";
        String badEndpoint = "http://" + host;
       
        DocLitWrapService service = new DocLitWrapService();
        DocLitWrap proxy = service.getDocLitWrapPort();
        BindingProvider p = (BindingProvider)proxy;
        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,badEndpoint);
       
      

        WebServiceException exception = null;

        TestLogger.logger.debug("------------------------------");
        TestLogger.logger.debug("Test : " + getName());
        try{
            exception = null;
          
            proxy.oneWayVoid();

        }catch(WebServiceException e) {
            exception = e;
        }catch(Exception e) {
            fail("This testcase should only produce a WebServiceException.  We got: " + e.toString());
        }

        TestLogger.logger.debug("----------------------------------");

        assertNotNull(exception);
        assertTrue(exception.getCause() instanceof UnknownHostException);
        assertTrue(exception.getCause().getMessage().indexOf(host)!=-1);
       
        // Repeat to verify behavior
        try{
            exception = null;
          
            proxy.oneWayVoid();

        }catch(WebServiceException e) {
            exception = e;
        }catch(Exception e) {
            fail("This testcase should only produce a WebServiceException.  We got: " + e.toString());
View Full Code Here

            TestLogger.logger.debug("------------------------------");
            TestLogger.logger.debug("Test  : " + getName());
            try{
                String reqNormalString = "JAXBCustomBuilderClient";
                String reqFaultString = "JAXBCustomBuilderFault";
                DocLitWrap proxy = getProxy();
               
                // Start Monitoring
                JAXBCustomBuilderMonitor.setMonitoring(true);
                JAXBCustomBuilderMonitor.clear();
               
                try {
                    // Invoke the web services
                    proxy.twoWay(reqNormalString);
                   
                    // This second invoke will cause
                    // an exception to be thrown.
                    proxy.twoWay(reqFaultString);
                   
                    // An exception was expected
                    assertTrue(false);
                } catch (WebServiceException wse) {
                    // An exception is expected
View Full Code Here

         * Get theDocLitWrap Prxoy
         * @return DocLitWrapProxy
         */
        private DocLitWrap getProxy() {
            DocLitWrapService service = new DocLitWrapService();
            DocLitWrap proxy = service.getDocLitWrapPort();
            BindingProvider p = (BindingProvider) proxy;
            p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, axisEndpoint);
            return proxy;
        }
View Full Code Here

        public void testTwoWaySync(){
            TestLogger.logger.debug("------------------------------");
            TestLogger.logger.debug("Test : " + getName());
            try{
                String reqString = "Test twoWay Sync";
                DocLitWrap proxy = getProxy();

                String response = proxy.twoWay(reqString);
                TestLogger.logger.debug("Sync Response =" + response);
                TestLogger.logger.debug("------------------------------");
            }catch(Exception e){
                e.printStackTrace();
                fail();
View Full Code Here

            TestLogger.logger.debug("------------------------------");
            TestLogger.logger.debug("Test : " + getName());
            try{

                DocLitWrapService service = new DocLitWrapService();
                DocLitWrap proxy = getProxy();
                proxy.oneWayVoid();
               
                // Repeat to ensure correct behavior
                proxy.oneWayVoid();

                TestLogger.logger.debug("------------------------------");
            }catch(Exception e){
                e.printStackTrace();
                fail();
View Full Code Here

            try{
                String holderString = new String("Test twoWay Sync");
                Integer holderInteger = new Integer(0);
                Holder<String> strHolder = new Holder<String>(holderString);
                Holder<Integer> intHolder = new Holder<Integer>(holderInteger);
                DocLitWrap proxy = getProxy();
                proxy.twoWayHolder(strHolder, intHolder);
                TestLogger.logger.debug("Holder Response String =" + strHolder.value);;
                TestLogger.logger.debug("Holder Response Integer =" + intHolder.value);
               
                // Repeat to ensure correct behavior
                proxy.twoWayHolder(strHolder, intHolder);
                TestLogger.logger.debug("Holder Response String =" + strHolder.value);;
                TestLogger.logger.debug("Holder Response Integer =" + intHolder.value);
                TestLogger.logger.debug("------------------------------");
            }catch(Exception e){
                e.printStackTrace();
View Full Code Here

                HeaderPart0 hp0= new HeaderPart0();
                hp0.setHeaderType("Client setup Header Type for HeaderPart0");
                HeaderPart1 hp1 = new HeaderPart1();
                hp1.setHeaderType("Client setup Header Type for HeaderPart0");
                Holder<HeaderPart0> holder = new Holder<HeaderPart0>(hp0);
                DocLitWrap proxy = getProxy();
                HeaderResponse hr = proxy.header(header, holder, hp1);
                hp0=holder.value;
                TestLogger.logger.debug("Holder Response String =" + hp0.getHeaderType());
                TestLogger.logger.debug("Header Response Long =" + hr.getOut());
               
                // Repeat to ensure correct behavior
                hr = proxy.header(header, holder, hp1);
                hp0=holder.value;
                TestLogger.logger.debug("Holder Response String =" + hp0.getHeaderType());
                TestLogger.logger.debug("Header Response Long =" + hr.getOut());
                TestLogger.logger.debug("------------------------------");
            }catch(Exception e){
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.sample.wrap.sei.DocLitWrap

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.