[ http://issues.apache.org/jira/browse/AXISCPP-929?page=all ]
nadir amra resolved AXISCPP-929:
--------------------------------
Resolution: Fixed
The way this has been fixed is as follows:
When using the C-stub interfaces, errors that occur are reported to the client
application by calling an exception handler function. There are two locations
where Web Services Client for C++ will look for the exception handler: the stub
exception handler and then the generic exception handler.
When C stubs are generated, in addition to functions to get a stub and destroy
a stub, there is also a function to register a stub exception handler. For
example, if the WSDL file shown in the C++ exception handling section is used,
the prototype function for setting the stub exception handler would be:
extern void set_MathOps_ExceptionHandler(AXISCHANDLE pStub,
AXIS_EXCEPTION_HANDLER_FUNCT fp);
where AXIS_EXCEPTION_HANDLER_FUNCT is a typedef defined in Axis.h as:
typedef void (* AXIS_EXCEPTION_HANDLER_FUNCT)(int exceptionCode,
const char *exceptionString,
AXISCHANDLE pSoapFault,
void *faultDetail);
When the Web Services Client for C++ throws an exception, the C-stub interfaces
catch the exception and attempts to produce a SoapFault object and associated
fault detail. The C-stub interfaces then determines if there is a stub
exception handler and calls the function, passing it the generic exception code
and exception string associated with the exception, in addition to the
SoapFault object and fault detail (note that it is possible that there is no
SoapFault or fault detail, in which case a NULL pointer is passed). If there
is no stub exception handler, then the generic exception handler is invoked.
The generic exception handler by default will simply print out the exception
string to stderr. However, a client application can override the default
exception handler by invoking axiscAxisRegisterExceptionHandler().
In the future, if we so choose, there is the ability to extend this so that a
client application could register for specific SOAP faults.
> C interfaces should capture all C++ exceptions
> ----------------------------------------------
>
> Key: AXISCPP-929
> URL: http://issues.apache.org/jira/browse/AXISCPP-929
> Project: Axis-C++
> Type: Bug
> Components: Client - API
> Reporter: nadir amra
> Assignee: nadir amra
>
> The C interfaces should catch all C++ exceptions and provide a way to
> indicate whether operation was successful or not.
> This means that we may have to eliminate the dynamic generation of the C
> header files based on the C++ header files since the prototypes for the calls
> may not be exactly the same - i.e. return value may indicate success or
> failure and if the function returned some value, the value returned on a the
> C interface may become an argument that would need to be passed in.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]