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.  Specifying file in POST command

    Posted 04/03/09 04:58 PM

    I am using pub.client.http to POST a file to a partner’s website. Their page is set up to accept POSTed files when the request resembles:

    [FONT=Courier][SIZE=2]2009-04-03 15:01:16 SOMEINFORMATION ip.add.r.ess
    POST /path/file.txt - 446…

    When I use the post service, it generates the request like:

    2009-04-03 15:01:16 SOMEINFORMATION ip.add.r.ess
    POST /path - 446…

    when I give the url as [url]http://site.com/[/url][B]path[/b]
    or as

    2009-04-03 15:01:16 SOMEINFORMATION ip.add.r.ess
    POST / - 446…

    when I just give it http://site.com

    My question–what parameter do I need to feed to the pub.client.http service to get it to populate the filename after the POST / ?

    Thanks!
    [/size][/font]


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Specifying file in POST command

    Posted 04/03/09 05:56 PM

    Try setting your method to put instead of post, include the filename in the URL, loadAs bytes, map your file content into data/bytes. that usually works for me. stream works as well.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Specifying file in POST command

    Posted 04/03/09 07:24 PM

    Thanks griffima. That is how we have done it in the past as well. The problem with this one is that I actually do not have a “file” that I am sending, but rather I am building a string in wM which then I want to Post/Put (don’t care which) to the site. Since it’s not yet a file, it doesn’t have a name to send with it.


    #webMethods
    #webmethods-Protocol-and-Transport
    #Integration-Server-and-ESB


  • 4.  RE: Specifying file in POST command

    Posted 04/03/09 07:36 PM

    The put method I was describing is not actually sending a real file right, just content being passed by the IS, happens to be bytes in this case but its not a real file until written out on the other end. The put tells it to treat the URL as a file name as you know. More efficient that post for uploading files assuming the web server you are putting to supports it.

    Not sure I understand that comment. Why don’t you have a name to pass via the URL? If it is a variable you are creating on the fly you still would just append it to the end of your URL.


    #webmethods-Protocol-and-Transport
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Specifying file in POST command

    Posted 04/03/09 09:19 PM

    I actually didn’t realize the filename needed to be part of the url when doing a put instead of a post. Thank you for your help!


    #Integration-Server-and-ESB
    #webmethods-Protocol-and-Transport
    #webMethods