Hi,
I'm working on LDAP connector for ESB. I have declared some custom error
codes to represent errors happening inside the connector
Ex
Entry already exists : 500001
Entry does not exists : 500002
Authentication failure : 500003
At such situations I use following code sample to move to error sequence
messageContext.setProperty(SynapseConstants.ERROR_CODE, errorCode); //here
errorCode=500001
messageContext.setProperty(SynapseConstants.ERROR_MESSAGE,errorMessage);
messageContext.setProperty(SynapseConstants.ERROR_EXCEPTION,e);
messageContext.setFaultResponse(true);
handleException(errorMessage,e,messageContext);
In proxy configuration
<faultSequence>
<log level="full"/>
<makefault version="soap11">
<code expression="get-property('ERROR_CODE')"/>
<reason expression="get-property('ERROR_MESSAGE')"/>
<detail/>
</makefault>
<send/>
</faultSequence>
Then I tried sending a fault request to connector using SoapUI. As response
I got error message correctly but status code was always 500. How can I get
actual error code I have passed back to client? What is the standard way?
Thanks
Dimuthu
--
Dimuthu Upeksha
Engineering Intern
WSO2 inc.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev