/* * Copyright 2003-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * @author Damitha Kumarage (damitha@opensource.lk, damitha@jkcsworld.com) * */ This sample is intended as a test case for testing exception handling This sample uses the MathOps service as the target service. To run the sample cd $AXISCPP_HOME/tests/client/ ./exceptiontest div You need to pass an integer for the last paramter indicating the test you need to run. Following is the list of tests you may run. test1: ./exceptiontest localhost 80 div 10 5 1 Message returned Exception : AxisSoapException:Soap action is empty test2: ./exceptiontest localhost 80 div 10 5 2 Message returned Exception : AxisWsddException:Requested service not found test3: ./exceptiontest localhost 80 div 10 5 3 Message returned The corresponding http fail message should be returned to the user. test4: ./exceptiontest localhost 80 div 10 5 4 Message returned Exception : AxisTransportException:Unexpected string received. Most probably server returned an empty stream There are some other tests you may run by changing the url test1 ./exceptiontest localhost div 10 5 0 Message returned Exception : AxisTransportException:Cannot open a channel to the remote end, shutting down the channel test2 ./exceptiontest 80 div 10 5 0 Message returned Exception : AxisTransportException:Cannot open a channel to the remote end, shutting down the channel test3 You may runt the test by removing the target service library $AXIS_HOME/webservices/libmathops.so and restarting apache Message returned Exception : AxisEngineException:Library loading failed test4 You may run the test by shutting down apache Message returned Exception : AxisTransportException:Cannot open a channel to the remote end, shutting down the channel test5 To run the application correctly you should have libaxis_xmlparser.so(parser library) in $AXIS_HOME/libs folder with the exact name given. You can run the test with the name changed. Message returned Exception : DLOPEN FAILED in loading parser library test6 To run the application correctly you should have libaxis_transport.so(transport library) in $AXIS_HOME/libs folder with the exact name given. You can run the test with the name changed. Message returned Exception : DLOPEN FAILED in loading transport library