IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Sending http response as zip stream

    Posted 12/22/06 09:54 PM

    Hi I have a situation where i have to return the response for a http request
    in the form of zip stream. Can someone provide me a direction on how to
    return the zip stream back and also what/how to set the content-type.
    The built in service doesn’t seem to help.
    Your help is really appreciated

    Thanks,
    Mallik.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Sending http response as zip stream

    Posted 12/30/06 01:13 AM

    It seems most of the guys have taken days off for holidays.
    Happy New year guys.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Sending http response as zip stream

    Posted 01/02/07 05:08 PM

    I used the following code (obtained from wmusers) recently to embed my binary data in the HTTP response.

    IDataCursor idc = pipeline.getCursor();
    byte bytes = (byte )IDataUtil.get(idc, “bytes”);
    String encoding = IDataUtil.getString(idc, “encoding”);
    String contentType = IDataUtil.getString(idc, “contentType”);
    String handle = IDataUtil.getString(idc, “handle”);
    idc.destroy();

    com.wm.net.HttpHeader httpheader = Service.getHttpResponseHeader();

    if(httpheader != null) {
    if(contentType!=null && !contentType.equals(“”))
    httpheader.addField(“content-type”, contentType);
    if(encoding!=null && !encoding.equals(“”))
    httpheader.addField(“encoding”,encoding);
    if(handle != null && !handle.equals(“”))
    httpheader.addField(“content-disposition”,
    “inline;filename= "” + handle + “"”);
    }

    Service.setResponse(bytes);


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: Sending http response as zip stream

    Posted 02/06/07 07:38 PM

    Michael,
    Sorry for the late response.
    I have been on a long vacation to India
    Once again thanks for the response.
    I will try this one and will let you know how it works.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services