Examples of FaultsServicePortType


Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that SOAPFaultException is thrown
     */
    public void testFaultsService9a(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "SOAPFaultException", 2)// "SOAPFaultException" will cause service to throw SOAPFaultException
           
        }catch(SOAPFaultException e){
            // Okay
            exception = e;
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that SOAPFaultException is thrown
     */
    public void testFaultsService9b(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "SOAPFaultException2", 2)// "SOAPFaultException" will cause service to throw SOAPFaultException
           
        }catch(SOAPFaultException e){
            // Okay
            exception = e;
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that SOAPFaultException (NPE) is thrown
     */
    public void testFaultsService10(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "NPE", 2)// "NPE" will cause service to throw NPE System Exception
           
        }catch(SOAPFaultException e){
            // Okay
            exception = e;
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that SOAPFaultException (NPE) is thrown
     */
    public void testFaultsService10a(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "NPE2", 2)// "NPE" will cause service to throw NPE System Exception
           
        }catch(SOAPFaultException e){
            // Okay
            exception = e;
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that SOAPFaultException (for WebServiceException) is thrown
     */
    public void testFaultsService11(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "WSE", 2)// "WSE" will cause service to throw WebServiceException System Exception
           
        }catch(SOAPFaultException e){
            // Okay...on the client a SOAPFaultException should be thrown
            exception = e;
        } catch (Exception e) {
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

   
    /**
     * Tests Resource injection
     */
    public void testResourceInjection() throws Exception {
        FaultsServicePortType proxy = getProxy();
       
        float total = proxy.getQuote("INJECTION");
       
        // If resource injection occurred properly, then the a value of 1234567 is expected
        assertTrue("Resource Injection Failed", total == 1234567);
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Utility method to get the proxy
     * @return proxy
     */
    private FaultsServicePortType getProxy() {
        FaultsService service = new FaultsService();
        FaultsServicePortType proxy = service.getFaultsPort();
        BindingProvider p = (BindingProvider)proxy;
        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
        return proxy;
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that BaseFault is thrown
     */
    public void testFaultsService0() {
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "BaseFault", 2);
           
        }catch(BaseFault_Exception e){
            exception = e;
        } catch (ComplexFault_Exception e) {
            fail("Should not get ComplexFault_Exception in this testcase");
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that BaseFault (DerivedFault1) is thrown
     */
    public void testFaultsService1() {
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "DerivedFault1", 2);
           
        }catch(BaseFault_Exception e){
            exception = e;
        } catch (ComplexFault_Exception e) {
            fail("Should not get ComplexFault_Exception in this testcase");
View Full Code Here

Examples of org.apache.axis2.jaxws.sample.faultsservice.FaultsServicePortType

     * Tests that that BaseFault (DerivedFault1) is thrown
     */
    public void testFaultsService2() {
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
            // the invoke will throw an exception, if the test is performed right
            int total = proxy.throwFault(2, "DerivedFault2", 2);
           
        }catch(BaseFault_Exception e){
            exception = e;
        } catch (ComplexFault_Exception e) {
            fail("Should not get ComplexFault_Exception in this testcase");
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.