Integration Broker REST OnErrorContentType property
Hello,
I try to create a REST webservice with Peopletools 8.55 by implementing RequestHandler class (PS_PT:Integration:IRequestHandler).
Right now the code generates an error with a "throw create Exception" but even if I set Error Message as text/xml, the result stays in text/plain :
The Peoplecode :
method OnError
/+ &pRequestMsg as Message +/
/+ Returns String +/
/+ Extends/implements PS_PT:Integration:IRequestHandler.OnError +/
Local Exception &exception = &pRequestMsg.IBException;
Local XmlDoc &xmlout = CreateXmlDoc("<?xml version='1.0'?><RESULT/>");
Local XmlNode &tempnode = &xmlout.DocumentElement.AddElement("ERROR_DESCR").AddText(&exception.DefaultText);
&pRequestMsg.SetXmlDoc(&xmlout);
Return &xmlout.GenXmlString();
end-method;
Result error message:
HTTP/1.1 409 Conflict
Date: Wed, 31 May 2017 12:35:17 GMT