HTTP BC is pretty much designed to handle XML payloads, so even if you
can manage to convert the XML response from DB to JSON, you would most
likely hit another road block when HTTP BC tries to process the payload
(in JSON format) from DB, depending on the payload type definition.
So as Andi said, your best choice is to use REST BC to handle REST style
payloads. That is exactly what REST BC is set out to do...
Regards
--Sherry
Andreas Egloff wrote:
> The REST BC (scheduled for production release in GlassFish ESB v2.2)
> has some built-in JSON conversion conventions. If a custom (or other)
> mapping XML <-> JSON is desired one can call the conversion from a
> service engine such as POJO SE.
>
> The HTTP BC is JAX-WS based, and requires separate conversion to/from
> formats other than XML. So the approach is similar to the custom
> mapping approach described above, in that one would write an
> intermediate service that converts XML <-> JSON. This can be Java code
> calling existing JSON libraries, or one could also conceive a custom
> encoder for this purpose.
>
> Andi
>
> hrishi09 wrote:
>> Hi All,
>> I have a usecase here,
>> I m using GlassfishESB 2.1.
>> I want to use HTTP BC and database BC.
>> HTTP BC will expose a GET service which can be invoked from a web app.
>> A BPEL will host these HTTP and Database services.
>> Database BC will fetch some records from db and return to HTTP
>> service as
>> reply.
>> It is working fine with xml response.
>> Can it be configured to return json object as response to HTTP service.
>> Thanks,
>> Hrishi
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
[hidden email]
> For additional commands, e-mail:
[hidden email]
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]