# FileName in Content Disposition Header of AS2

**URL:** <https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [October 20, 2008, 8:48am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721 "2008-10-20T08:48:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramesh\_kuruba1](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@ramesh\_kuruba1](https://techcommunity.softwareag.com/u/ramesh_kuruba1)\
**Post date:** [October 20, 2008, 8:48am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/1 "2008-10-20T08:48:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![uchava.14139](https://avatars.discourse-cdn.com/v4/letter/u/e36b37/32.png) [@uchava.14139](https://techcommunity.softwareag.com/u/uchava.14139)\
**Post date:** [March 3, 2009, 11:30pm UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/2 "2009-03-03T23:30:05Z")

</div>

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

Thank you.  
uc

---

<div class="post-metadata">

**Author:** ![tibbu](https://avatars.discourse-cdn.com/v4/letter/t/e495f1/32.png) [@tibbu](https://techcommunity.softwareag.com/u/tibbu)\
**Post date:** [March 11, 2009, 4:26am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/3 "2009-03-11T04:26:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![suresh\_palanisamy](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@suresh\_palanisamy](https://techcommunity.softwareag.com/u/suresh_palanisamy)\
**Post date:** [April 9, 2009, 3:21pm UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/4 "2009-04-09T15:21:52Z")

</div>

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](https://techcommunity.softwareag.com/uploads/short-url/r7GYeS6qo0CDFnB2ysz1ha3PsaP.doc) (49 KB)

---

<div class="post-metadata">

**Author:** ![ndeye1](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@ndeye1](https://techcommunity.softwareag.com/u/ndeye1)\
**Post date:** [April 9, 2009, 6:41pm UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/5 "2009-04-09T18:41:42Z")

</div>

> [@tibbu.blue;65018](#):
>
> 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?

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](https://techcommunity.softwareag.com/uploads/short-url/7FWop4KKjdXf99cfQpyOS7HMdE8.zip) (37.2 KB)

---

<div class="post-metadata">

**Author:** ![cguzman](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@cguzman](https://techcommunity.softwareag.com/u/cguzman)\
**Post date:** [February 24, 2010, 11:20pm UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/6 "2010-02-24T23:20:56Z")

</div>

> [@ucbabu;64912](#):
>
> Did you find out about this? We are having the same requirement.
> 
> Thank you.  
> uc

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!

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [February 24, 2010, 11:30pm UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/7 "2010-02-24T23:30:21Z")

</div>

> [@cguzman;71237](#):
>
> 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!

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

---

<div class="post-metadata">

**Author:** ![cguzman](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@cguzman](https://techcommunity.softwareag.com/u/cguzman)\
**Post date:** [February 25, 2010, 1:09am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/8 "2010-02-25T01:09:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [February 25, 2010, 1:38am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/9 "2010-02-25T01:38:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [January 10, 2012, 12:45am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/10 "2012-01-10T00:45:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [January 10, 2012, 12:50am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/11 "2012-01-10T00:50:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [January 10, 2012, 12:56am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/12 "2012-01-10T00:56:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [January 10, 2012, 1:01am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/13 "2012-01-10T01:01:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [January 10, 2012, 5:03am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/14 "2012-01-10T05:03:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [January 10, 2012, 9:12am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/15 "2012-01-10T09:12:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [January 10, 2012, 8:18pm UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/16 "2012-01-10T20:18:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [January 11, 2012, 1:43am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/17 "2012-01-11T01:43:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [January 11, 2012, 3:49am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/18 "2012-01-11T03:49:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [January 11, 2012, 3:53am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/19 "2012-01-11T03:53:11Z")

</div>

> [@david123;82337](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![Abhishek\_Singh3](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@Abhishek\_Singh3](https://techcommunity.softwareag.com/u/Abhishek_Singh3)\
**Post date:** [October 27, 2014, 11:44am UTC](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721/20 "2014-10-27T11:44:50Z")

</div>

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

[Next page](https://techcommunity.softwareag.com/t/filename-in-content-disposition-header-of-as2/109721.md?page=2)
