Examples of FaultsServicePortType


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

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

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

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

     * Tests that throwing of SimpleFault
     */
    public void testFaultsService4(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            float total = proxy.getQuote("SMPL");
            fail( "Expected SimpleFault but no fault was thrown ");
        }catch(SimpleFault e){
            SimpleFault fault = (SimpleFault) e;

            int faultInfo = fault.getFaultInfo();
View Full Code Here

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

     * Disabled while I fix this test
     */
    public void testFaultsService5(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            float total = proxy.getQuote("LEGC");
            fail( "Expected InvalidTickerFault_Exception but no fault was thrown ");
        }catch(InvalidTickerFault_Exception e){
            InvalidTickerFault_Exception fault = (InvalidTickerFault_Exception) e;

            assertTrue(fault.getLegacyData1().equals("LEGC"));
View Full Code Here

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

     * Tests that throwing of BaseFault_Exception
     */
    public void testFaultsService6(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            float total = proxy.getQuote("BASE");
            fail( "Expected BaseFault_Exception but no fault was thrown ");
        }catch(BaseFault_Exception e){
            BaseFault_Exception fault = (BaseFault_Exception) e;

            BaseFault faultInfo = fault.getFaultInfo();
View Full Code Here

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

     * Tests that throwing of DerivedFault1_Exception
     */
    public void testFaultsService7(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            float total = proxy.getQuote("DF1");
            fail( "Expected DerivedFault1_Exception but no fault was thrown");
        }catch(DerivedFault1_Exception e){
            DerivedFault1_Exception fault = (DerivedFault1_Exception) e;

            DerivedFault1 faultInfo = fault.getFaultInfo();
View Full Code Here

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

     * Tests that throwing of DerivedFault1_Exception
     */
    public void testFaultsService8(){
        Exception exception = null;
        try{
            FaultsServicePortType proxy = getProxy();
           
            // the invoke will throw an exception, if the test is performed right
            float total = proxy.getQuote("DF2");
            fail( "Expected DerivedFault2_Exception but no fault was thrown ");
        }catch(DerivedFault2_Exception e){
            DerivedFault2_Exception fault = (DerivedFault2_Exception) e;

            DerivedFault2 faultInfo = fault.getFaultInfo();
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.