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

FileName in Content Disposition Header of AS2

  • 1.  FileName in Content Disposition Header of AS2

    Posted Mon October 20, 2008 04:48 AM

    How can I change the filename in Content-Disposition and Content-Type parameters of AS2 header?

    One of our partners need filename to be sent like this. I am using Payload Content Type to send the filename through “name” attribute.

    Any Thoughts??

    RK


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: FileName in Content Disposition Header of AS2

    Posted Tue March 03, 2009 06:30 PM

    Did you find out about this? We are having the same requirement.

    Thank you.
    uc


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 3.  RE: FileName in Content Disposition Header of AS2

    Posted Wed March 11, 2009 12:26 AM

    Are you trying to replace the auto generated Message-ID in the AS2 header, with the filename, which you construct from certain values in payload?


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 4.  RE: FileName in Content Disposition Header of AS2

    Posted Thu April 09, 2009 11:22 AM

    Try these

    1. Copy EDIINT.send service and rename it
    2. Expand the service and add a Map step as shown in the Attachment

    Regards,
    Suresh Palanisamy
    customise_EDIINTMessageID.doc (49 KB)


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: FileName in Content Disposition Header of AS2

    Posted Thu April 09, 2009 02:42 PM

    I have a problem ,I am using a service named :Receive_test which send a doc in TN and after i am using a other service named “ExtractOrder” which write file in local disk ,in the service “ExtractOrder” i use
    SavepipelineFile
    Restorepipelinefromfile
    getContentPart
    and in getContentart i use a right Input ,when I run the service I have a following error:

    see:attachement

    com.wm.app.b2b.server.ServiceException: [ISC.0049.9005] Input validation for service ‘TN:ExtractOrder’ failed: '/bizDoc/InternalID VV-005 [ISC.0082.9034] Field is absent, field must exist
    ndeye_2_1.zip (37.2 KB)


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 6.  RE: FileName in Content Disposition Header of AS2

    Posted Wed February 24, 2010 06:21 PM

    hello, did the solution proposed below worked for the requirement you had? I need set the filename in payload too. Please let me know if you found a solution.

    Thanks!


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 7.  RE: FileName in Content Disposition Header of AS2

    Posted Wed February 24, 2010 06:30 PM

    You mean inside the payload content (somewhere before actual data begins) ? what is the Content-type you are trying to send edi-x12 or XML??

    HTH,
    RMG


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 8.  RE: FileName in Content Disposition Header of AS2

    Posted Wed February 24, 2010 08:09 PM

    hi, it’s XML. What I actually need is to set the filename, I saw a case where it’s done in the payload Content-Disposition and Content-Type.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 9.  RE: FileName in Content Disposition Header of AS2

    Posted Wed February 24, 2010 08:38 PM

    No i don’t think its a good idea to use those standard routing fields for this purpose.

    Why don’t you create/embed a tag inside the XML structure itself assuming its a custom XML and not a eStandards based (CIDX,PIP,cXML…)?

    HTH,
    RMG


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 10.  RE: FileName in Content Disposition Header of AS2

    Posted Mon January 09, 2012 07:45 PM

    Hi Rmg,

    I have a similar requirement where I need to send an XML with a filename. The TP wants to see the XML placed with that filename Not filename inside the xml content.

    Can this be done in Content-disposition?

    Thanks,
    David.


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 11.  RE: FileName in Content Disposition Header of AS2

    Posted Mon January 09, 2012 07:50 PM

    No.

    But I heard using with IS/EDI 8.2.x version there is an easy way to send filename in the AS2 setting in the Content-type param:

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 12.  RE: FileName in Content Disposition Header of AS2

    Posted Mon January 09, 2012 07:57 PM

    Content-disposition is the right spot to specify a filename. Figuring out how to set it I suppose is the tricky part.


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 13.  RE: FileName in Content Disposition Header of AS2

    Posted Mon January 09, 2012 08:02 PM

    Bottom line there is no easy way in the disposition and yes tricky part as the EDI module default uses it internally putting mime :confused:


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 14.  RE: FileName in Content Disposition Header of AS2

    Posted Tue January 10, 2012 12:03 AM

    Setting of filename in content-disposition did not work in my case. The TP do not see the file land in their location with that filename.

    How can we achieve sending a filename and storing it with that name on TP side.


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 15.  RE: FileName in Content Disposition Header of AS2

    Posted Tue January 10, 2012 04:13 AM

    You won’t be able to specify a complete pathname. Only a filename. The TP will need to have logic on their side to use the filename in the content-disposition and then write to whereever they want it written.


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 16.  RE: FileName in Content Disposition Header of AS2

    Posted Tue January 10, 2012 03:18 PM

    David, Are you able to success atleast just filename in the disposition as Rob mentioned above? To me it sounds no luck:


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 17.  RE: FileName in Content Disposition Header of AS2

    Posted Tue January 10, 2012 08:43 PM

    Hi Reamon,

    Finally, It got working. I made the content-type = application/XML; name=filename.xml
    and content-disposition= attachment; filename=filename.xml. I do not know what exactly made it appear on their side.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 18.  RE: FileName in Content Disposition Header of AS2

    Posted Tue January 10, 2012 10:50 PM

    I’m not sure “name” is standard attribute of content-type, but filename is definitely a defined attribute for content-disposition. If you want to know for sure which made it work, try with just one and then just the other.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 19.  RE: FileName in Content Disposition Header of AS2

    Posted Tue January 10, 2012 10:53 PM

    Great:

    What version of IS/EDI Module are you using?

    I know they added this setting/feature starting IS 8.x can be embed in the Content-Type section which I have mentioned earlier in comments:

    But wondering how the TP will extract that part from disposition?

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 20.  RE: FileName in Content Disposition Header of AS2

    Posted Mon October 27, 2014 07:45 AM

    Dear RMG,

    I am using IS 8.2 version and want to pass Folder directory in file name by usind EDIINT/send service .I tried by passing below values:-

    content-type = application/XML; name=filename.xml
    and content-disposition= attachment; filename=a/b/c.xml

    But its not able to create mine data for that because not able to parse /.

    In our client requirement ‘a’ will be main folder and ‘b’ is sub folder and c is the actual xml file.

    Need your help to resolve that issue.

    Regards
    Abhishek


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 21.  RE: FileName in Content Disposition Header of AS2

    Posted Mon October 27, 2014 10:54 AM

    In the EDIINT:send service are you sure you are passing the attachments section?

    HTH,
    RMG


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 22.  RE: FileName in Content Disposition Header of AS2

    Posted Tue October 28, 2014 07:42 AM

    Dear RMG,

    I am passing data as stream.And its working fine when i am setting

    Content-Type: application/XML; name=filename
    Content-Disposition: attachment;filename=c.xml

    But In our client requirement ‘a’ will be main folder and ‘b’ is sub folder and c is the actual xml file.

    when i am settting content-type = application/XML; name=filename.xml
    and content-disposition= attachment; filename=a/b/c.xml

    we got below error:-

    Unable to construct mime message javax.mail.internet.ParseException Expected ';', got "/" javax.mail.internet.ParseException: Expected ';', got "/" at javax.mail.internet.ParameterList.(ParameterList.java:280) at javax.mail.internet.ContentDisposition.(ContentDisposition.java:96) at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1340)

    we are using wM8.2 version

    Please refer attach screen shot for EDIINT send inputs


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 23.  RE: FileName in Content Disposition Header of AS2

    Posted Tue October 28, 2014 12:36 PM

    What EDIINT module version are you on with 8.0.1 or 8.2.1?

    Are you seeing attachments IDATA object like you see data object in the EDIINT:send service?

    HTH,
    RMG
    EDIINT_send_821.docx (27.2 KB)


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 24.  RE: FileName in Content Disposition Header of AS2

    Posted Wed October 29, 2014 06:50 AM

    EDIINT module version :8.0.1

    Their is no attachments IDATA object .I can see data IDATA object in input of EDIINT:send service


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 25.  RE: FileName in Content Disposition Header of AS2

    Posted Wed October 29, 2014 10:59 AM

    I think possibly you may need to update your EDIINT module to 8.2 SP1 or open a SAG ticket to check on the other options.

    HTH,
    RMG


    #webMethods
    #edi
    #Integration-Server-and-ESB


  • 26.  RE: FileName in Content Disposition Header of AS2

    Posted Wed November 05, 2014 08:23 AM

    Thanks for reply.we can not update EDIINT module to 8.2 SP1 .

    I copied EDIINT send service in new flow service and added addmine header after creating mine data and now ediint data coming as below .

    Disposition-notification-to: 213123121
    AS2-From: 213123121
    AS2-To: AS2_Test_21212
    AS2-Version: 1.1
    Message-ID: <2056614164.414.546>
    Content-Type: application/xml;
    Content-Disposition: attachment;filename=c/a/b.zip

    Is that approach correct ?


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 27.  RE: FileName in Content Disposition Header of AS2

    Posted Wed November 05, 2014 12:29 PM

    Yes as long it works end to end but customization at all your agreement.

    HTH,
    RMG


    #webMethods
    #Integration-Server-and-ESB
    #edi