webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  REST XML-JSON Mediation

    Posted Tue June 10, 2014 06:11 PM

    We have native restful services that accept and generate only JSON content. We need to bridge these services for an XML only consumer. Currently we have configured the virtual rest service in the following way:

    1. In the Request Processing step of the Virtual REST Service, we have two flow services -
      o one to set the BUILDER_TYPE to application/json (to be able to parse the JSON response received from the native service),
      o and the other to set the MESSAGE_TYPE to application/json (to be able to serialize the request to JSON before sending it to the native service).

    2. In the Response Processing step of the Virtual REST Service, we have one flow service to set the MESSAGE_TYPE to application/xml (to be able to build the XML response to send to the consumer).

    With this configuration, we are getting a successful HTTP 200 status, however the response obtained is empty.
    When we remove the response processing step from the VS and redeploy, we are able to see the JSON response being sent by mediator , so that means the request conversion from XML to JSON is happening correctly, and the mediator is able to send the JSON request to the native service and obtain a JSON response from it. This same JSON response is then being fwded by mediator to the client. However, when we add the response processing service (as mentioned above), that response is somehow being transformed to an empty string with Content-Length 0.


    #API-Management
    #webMethods-X-Broker-Mediator-Forum
    #webMethods


  • 2.  RE: REST XML-JSON Mediation

    Posted Wed June 15, 2016 04:11 PM

    im able to deploy my virtual rest servie to mediator.

    what is the endpoint for calling rest service already deploy to mediator?
    i tried “http://host:port/ws/virtual_rest_name” and “http://host:port/rest/virtual_rest_name”. But failed!

    Can not find the answer also in documentation.

    thanks


    #API-Management
    #webMethods
    #webMethods-X-Broker-Mediator-Forum


  • 3.  RE: REST XML-JSON Mediation

    Posted Thu June 16, 2016 04:05 AM

    Hello Janardhan,

    You have to provide the resource name as well to the input uri

    For example: http://<is_host>:/ws/service_name/resource_name


    #webMethods-X-Broker-Mediator-Forum
    #webMethods
    #API-Management


  • 4.  RE: REST XML-JSON Mediation

    Posted Wed August 10, 2016 11:53 AM

    Hi Janardan Kelkar,

    We are facing the issue. If you find any resolution, can you please post the details

    Thanks & Regards,
    Jeevan


    #API-Management
    #webMethods-X-Broker-Mediator-Forum
    #webMethods