How to define the HTTP Response content with the HttpGateway in JBoss SOA-P 5?

Solution Unverified - Updated -

Issue

There is a synchronous HttpGateway action. When trying to control the html returned it is not obvious how to do this. Looking at the documentation it appears it can be done:

    HttpResponse responseInfo = new HttpResponse(HttpServletResponse.SC_OK);

    responseInfo.setContentType("text/xml");
    // Set other response info ...

    // Set the HttpResponse instance on the ESB response Message instance
    responseInfo.setResponse(responseMessage);

But when the HttpResponse class is examined, it is not seen how to set the html.

Environment

  • JBoss Enterprise SOA Platform (SOA-P) 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.