Object responseObj =
get(HTTPServerInputStreamContext.HTTP_RESPONSE);
OutputStream responseStream = null;
if (responseObj instanceof HttpResponse) {
// non-decoupled response
HttpResponse response = (HttpResponse)responseObj;
Integer i = (Integer)context.get(HTTP_RESPONSE_CODE);
if (i != null) {
if (i.intValue() == 500) {
response.setStatus(i.intValue(), "Fault Occurred");
} else {
response.setStatus(i.intValue());
}
} else {
response.setStatus(200);
}
copyHeaders(context, response);
responseStream = response.getOutputStream();
if (isOneWay()) {
response.commit();
}
} else if (responseObj instanceof EndpointReferenceType) {
// decoupled response
EndpointReferenceType decoupledResponseEndpoint =
(EndpointReferenceType)responseObj;