Hi Dinuthu, Are you referring to the http status code? It should be 500 in this case.
Your custom error code will only be available in the response. Best Regards, Malaka On Wed, May 14, 2014 at 6:54 PM, Dimuthu Upeksha <[email protected]> wrote: > 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. > -- Best Regards, Malaka Silva Senior Tech Lead M: +94 777 219 791 Tel : 94 11 214 5345 Fax :94 11 2145300 Skype : malaka.sampath.silva LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 Blog : http://mrmalakasilva.blogspot.com/ WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/ http://www.wso2.com/about/team/malaka-silva/<http://wso2.com/about/team/malaka-silva/> Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
