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.

 View Only
Expand all | Collapse all

Posting an xml file to TN with content-type=application/octet-stream

  • 1.  Posting an xml file to TN with content-type=application/octet-stream

    Posted Thu February 02, 2006 07:26 PM

    I’m using a 3rd party control that captures data and puts in into an XML file with the content type=application/octet-stream. I’m unable to change the content type. When I post the file to TN:receive it does not register. I’m able to pass the file to a .NET Function and then submit it to wM but I want to remove the .NET Function. Any suggestions on how I can get wM TN or a service to receive the post? Below is the Header of the post that I can capture in .NET.

    POST /Default.aspx?TabId=618 HTTP/1.1
    Connection: Keep-Alive
    Content-Length: 2226
    Content-Type: multipart/form-data; boundary=d6892121cab84ffeae17444c232a19a5
    Expect: 100-continue
    Host: princtn-w3008

    –d6892121cab84ffeae17444c232a19a5
    Content-Disposition: form-data; name=“postedfile”; filename=“FormData.xml”
    Content-Type: application/octet-stream

    Thanks,

    Kevin


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Posting an xml file to TN with content-type=application/octet-stream

    Posted Thu February 02, 2006 07:55 PM

    Kevin,

    Alternative is post the xml string to a custom service and let it post to TN using routeXML or receive service.This way you will have a chance to send the required content type of TN.

    HTH,
    RMG


    #B2B-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Posting an xml file to TN with content-type=application/octet-stream

    Posted Thu February 02, 2006 08:15 PM

    RMG - When I attempt to post to a service I’m unable to capture the file. My first step is SaveToPipeline but it doesn’t pick up the attached file. Any suggestions on how to setup a service to receive an attached file with Content-Type: application/octet-stream?

    -Thanks Kevin


    #Integration-Server-and-ESB
    #webMethods
    #B2B-Integration


  • 4.  RE: Posting an xml file to TN with content-type=application/octet-stream

    Posted Thu February 02, 2006 10:24 PM

    Use getTransportInfo and savepipeline under it and check the pipeline.But you cant see the streams saving though atleast you will get some good info.

    Also your service input should be contentStream (object) and use streamToBytes and bytesToString(extract xml data) and route this to TN.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 5.  RE: Posting an xml file to TN with content-type=application/octet-stream

    Posted Fri February 03, 2006 03:50 AM

    Hi,

    Not sure whether I am making any sense, but can you try to post that to MIME services and getContentType and bodyPart of your message.

    Convert that message to an IDOC and post it to TN.

    Thanks,
    Srivats


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 6.  RE: Posting an xml file to TN with content-type=application/octet-stream

    Posted Wed February 08, 2006 09:42 AM

    Kevin,

    I think you need to register a content handler for Application/Octet-stream. There are samples in WmSamples. Whether you can submit directly to TN or going though a 3rd service, sorry, not too sure… Give it a try.


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 7.  RE: Posting an xml file to TN with content-type=application/octet-stream

    Posted Thu February 09, 2006 08:37 PM

    I was able to fix this by running sample.contentHandler:registerContentHandler service and using application/octet-stream as my input. The next time I posted the file to the service I was able to retreive it with contentSteam. The string contained the xml file that I needed. I had to remove some extra characters from it but I was able to get it to work.

    Thank-you everyone for all of your help,

    Kevin


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 8.  RE: Posting an xml file to TN with content-type=application/octet-stream

    Posted Thu February 09, 2006 08:43 PM

    Glad you resolved the problem by your self.

    yes input contentStream should do the trick…But IS4.6/6.x can handle stream inputs(contentStream objects) by default.

    HTH,
    RMG


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB