If you're using the GWWS, the documentation at http://download-llnw.oracle.com/docs/cd/E15261_01/salt/docs11gr1/prog/tuxprog.html#wp1038376
describes an "Outbound SOAP Fault Errbuf Definition" in Table 4-3. When a TPFAIL occurs, the detail field will be fo the form "tpurcode = %ld, Application error message: %s". (The "Application error message: %s" is included only if the application returns data.)
If you're using SCA, the documentation at http://download-llnw.oracle.com/docs/cd/E15261_01/salt/docs11gr1/prog/sca.html#wp1107570
contains a "Handling TPFAIL Data" section which describes an abe.getData() method to get data returned by the application. There is a similar method "const long getTpurcode() const;" which can be called to get the tpurcode value. getTpurcode() is included in <tuxsca.h> although it is not mentioned in the SCA Programming Guide.