Hello Axis Users,
I am currently implementing a client for a Siebel CRM web service with
Axis 1.4. When there is no error everything is fine, but in case of an
error Siebel might return a HTTP 500 error code where the detailed reason
is in a HTTP Header. To react differently on the error reasons I would
like to read these headers. Here is a response that I get in one case:
HTTP/1.1 500 Internal Server Error
[...]
siebel-error-symbol-1: IDS_SWEPI_ERROR_EXTSERV_INIT
siebel-error-message-1: The service request could not be processed. Please
check that the user name and password are correct and [...]
cache-control: no-cache, must-revalidate
pragma: no-cache
content-type: text/html;charset=UTF-8
content-length: 415
<html><head><title>Message:</title></head>
<body><h1>Message:</h1>
<p>An error occurred while trying to process your request. [...] </p>
<p>Error(s):<ol><li>Username and/or password not specified for EAI
Request</ol></p>
</body></html>
I would like to access the HTTP header fields siebel-error-symbol-1 and
siebel-error-message-1. From some other posts I got the idea to register a
Handler that is subclassed from HTTPSender. Unfortunatly, the
ResponseMessage is null and now I am pretty lost where to look for those
fields. Here is the subclassed Handler:
public class HeaderAwareHTTPSender extends HTTPSender {
@Override
public void invoke(MessageContext msgC) throws AxisFault {
try {
super.invoke(msgC);
} catch (AxisFault ex) {
try {
String siebelErrorSymbol = (String)
msgC.getResponseMessage() //is null!
.getProperty(
"siebel-error-symbol-1");
System.err.println(siebelErrorSymbol);
} catch (SOAPException ex1) {
throw new AxisFault("SOAP Exception",
ex1);
}
}
}
}
Any suggestions how to read those header fields?
Mit freundlichen Grüßen / Best Regards
QuinScape GmbH
i.V. Christian Poecher
_________________________________________
QuinScape GmbH, Dortmund
http://www.quinscape.de
Geschäftsführer:
Thomas Biskup Sitz Dortmund
Dr. Norbert Jesse HRB 14740
Dr. Gero Presser Amtsgericht Dortmund
Vertragspartner der Bayer Business Services GmbH
Projekt Order Tracking Portal
Projekt Business Service Management por...@bhc
Im Auftrag der
Bayer Business Services GmbH
Gebäude 2975, Raum 02.B2.02
Schanzenstrasse 41
51063 Köln, Deutschland
Tel.: +49 214 30 30988
E-Mail: [email protected]
Web: http://www.BayerBBS.com
Geschäftsführung: Vorsitzender Daniel Hartert | Arbeitsdirektor
Norbert Fieseler
Vorsitzender des Aufsichtsrats: Klaus Kühn
Sitz der Gesellschaft: Leverkusen | Amtsgericht Köln, HRB 49895