on 05-09-2019 10:14 AM
Hi all,
We have a synchronous scenario Proxy > Rest. How can you handle the http status code and put it for example in Dynamic Configuration?
Thanks
Sorry Rajesh, but no ones achieve exactly what we want to do exactly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Xavier,
You can also perform a REST API Lookup with parameterized mapping(businessComponent,commChannel) to retrieve the server side(REST) payload.
String output ="";
AbstractTrace trace = container.getTrace();
try
{
String reqXml = inputData;
trace.addWarning(reqXml);
Channel channel = LookupService.getChannel(businessComponent,commChannel); SystemAccessor accessor = null; accessor = LookupService.getSystemAccessor(channel); InputStream inputStream = new ByteArrayInputStream(reqXml.getBytes());
Payload payload = LookupService.getXmlPayload(inputStream);
Payload SOAPOutPayload = null; SOAPOutPayload = accessor.call(payload);
InputStream inp = SOAPOutPayload.getContent();
String inputStreamString = new Scanner(inp, "UTF-8").useDelimiter("\\A").next(); trace.addWarning(inputStreamString);
output =inputStreamString;
}
catch(Exception e)
{
trace.addWarning("Exception Occured"+ e.toString());
throw new RuntimeException( e.toString());
}
return output;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can capture HTTP status code via custom error handling from 7.4 SP12 check this blog
Thanks,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.