axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hawkins <>
Subject Fw: Re:failure notice
Date Fri, 01 Oct 2004 12:41:50 GMT

>From Fred preston ->

Hi Adrian.
      I've started looking at the fault object model and it is in a bit of
a mess.  Currently, faults come back as exceptions from the stub as a
<ServiceName>_AxisClientException.  The actual exception is wrapped inside
the exception object.  You then have to unwrap the exception to find what
the real exception was. i.e.

catch( ServiceName_AxisClientException e)
  ISoapFault * pFault = (ISoapFault *) e.getFault(); // NB: You will
probably need
                                                     // to download latest
axis code
                                                     // to get this method.
  string       faultDetail = pFault->getSimpleFaultDetail();
  string       faultClassName = "<none>";
  int          iExceptionCode = e.getExceptionCode();
  string       sExceptionString = e.getMessage( iExceptionCode);

  if( faultDetail.length() == 0)
    if( !pFault->getCmplxFaultObjectName().compare( "ExceptionName"))
      faultClassName = pFault->getCmplxFaultObjectName();

      ExceptionNameType* pENT = (ExceptionNameType*)

      if( pENT)
        faultDetail = pENT->....;
        faultDetail = "Unknown type:" + faultClassName;

What I'm proposing is that we have the following model

               | AxisClientException |
                  |               |
+-----------------------+   +----------------+
| ServiceName_Exception |   | FaultException |
+-----------------------+   +----------------+

Where you can catch either a Fault or Service exception directly or catch
the generic AxisClientException and then unwrap.  This removes the need for
catching the generic exception (and then unwrapping) if you know what
faults to expect.  A fault exception is identical to the fault reply in the
WSDL and a ServiceName_Exeception is only ever used for a system fault (for
example, if there is a connection problem).    An example of a fault
exception is shown below:-

If you have the following WSDL...

Service            Binding           Port Type       Message       Name

myTestServ ------> myTestBind        myTestPT
                     mTest             mTest
                     i: -------------> i: ---------> myTestIn      mIn
                     o: -------------> o: ---------> myTestOut     mOut
                     f: -------------> f: ---------> myTestFault   mFault
{Info xsd:string, Code xsd:int}

Then the client will be coded as follows:-

  myTestServ * myService = new myTestServ( "someUri");

  string text = "Hello";

  int iRetValue = myService->mTest( text);

  cout << text << " has " << iRetValue << " e's" << endl;
catch( myTestFaultType f)
  cout << "Error info " << f.Info << endl;
  cout << "Error code " << f.Code << endl;

Thus the client now catches the exception type as described in the WSDL.

If the client application uses more than one service or method within a
service then the calls may have to be separated by individual try catch
blocks (depending on the uniqueness of the expected exceptions) to ensure
that the code knows where or when an exception occurred.

Does anyone have any comments on this proposed update?


Fred Preston.

             30/09/2004 13:48          <>

             Please respond to                                     Subject
              "Apache AXIS C           RE: failure notice
                User List"

Better SOAP:Fault handling - i.e. be able to access the fields within the
SOAP:Fault from a client.

-----Original Message-----
From: John Hawkins []
Sent: 30 September 2004 13:34
Subject: Re: failure notice

Hi Folks,

Big note coming up !

I would like to propose some features that we should put into 1.4. I would
like to know what everyone is thinking is useful to have in the 1.4 release
and this small list should act as a starter.

C support -
      firstly define feasibility of making a 100% C++ engine and design,
then (if feasible) implement.
      We will temporarily remove C support in 1.4 to be replaced in 1.5
with new wrapper.

Apache Builds -
      This item is all about getting a daily build. We must also create all
the relevant web pages so it's usable.
      We will build the client first then the server.

Refactor WSDL2WS -
      As it says ! This is a pretty much open-ended item so we do as much
as we can. Remember - at this point we have no C support so anything we can
do here to make that easier to reimplement C in 1.5 is good !

Test documentation -
      document the handler mechanism and other test related stuff we have.

AND - A Quick overview of 1.5 work
C support -
      put back into WSDL2 WS C wrappers for the new 100% C++ engine

Purify and fix -
      As it says - run Rational purify and tackle issues that come out of

Improve HTTP Support.
      Fix outstanding issues with HTTP support in the new transport layer.
There is a lot we can do here and we haven't really defined what it highest

      User documentation and CVS based documentation. including sample can
be improved

With the resource that we have here - we can contain all the above 1.4
items within a 24th November Time-schedule. I would like to propose that we
try to maintain this shorter time-line for releases. That way we keep new
function to a minimum and therefore maintain stability within builds.

I would also like to propose that we move away from our current waterfall
model of code then test. When we have daily builds we can see immediately
what has broken and this will help us tremedously. The more we automate our
testing the better. The one issue with this is that the daily builds will
only cover certain compilation options (as discussed in previous mails).
The test-cycle now appears to consist of running the same tests on
different configurations - is this true? In which case I would ask that
someone find the time to automate those configurations and run them daily
as well?

Please can you feedback your thoughts and ideas on what we should put into
1.4 and what you would like to see in 1.4 We can then make a judgement as
to what the final goal is to be.

many thanks,

View raw message