AS2 to File Scenario - File Name management

Dear all : I have a scenario, where a flatfile (txt) file is sent by an AS2 adapter, and is received by a file adapter. In this scenario we do not want to use a static file name, but instead we want to make it dynamic. The scenarios are explained below.
Scenario 1
We need to have the same file name, which is sent by the Sender, in the receiver also. Which means that, if the AS2 adapter sends the file <abcdefg.txt>, then while receiving, we need the same file name. How is it possible ? Pls note that we are not using message mapping here, as we do not bother about the content of the file.
Scenario 2
We need to get an offset of the filename which is coming in, as the receiver file name. For eg : if the file which is sent is <abcdefgh.txt>, then i need filename +4(3), which is <def.txt>, as the file name in the receiver.
Some considerations
1. There is no message mapping in our scenario.
2. The file coming in can contain anything without any format, so it is not possible to read the content and arrive at a decision
Many thanks & Regards
Bobby Bal

Hi Oscar,
You can achieve this by using Adapter specific Message Attributes.
In the Sender and Receiver File adapter go to Advance tab and under Adapter-Specific Message Attributes Tick the option of
1) Set Adapter-Specific Message Attributes
2) File Name
And in Receiver Channel for File Name Scheme, enter *
And If you want a part of a Source File name as your target file name. you can do it in UDF in Message mapping.
If you are not using Message mapping, you can run scripts to do this.
Regards
Aravind

Similar Messages

  • File to AS2 File Name?

    Hi Guys,
    I have File -> AS2 scenario. I want to have the file name on the AS2 receiver same as sender File adapter.
    1. I have checked the ASMA on the sender side with the File name option checked
    2. I have checked the dynamic attributes in the AS2 receiver with the file name option checked.  I have also checked the     option Fail the message if ASMA is missing.
    Currently I dont have any IR objects so i can't do a UDF.  The message is failing with the below error
    Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Mandatory attribute dtAS2FileName is not present in XI message., Mandatory attribute dtAS2FileName is not present in XI message
    How can i get the same file name from the file sender to the AS2 receiver? any help or suggestions would be appreciated
    Thanks,
    Srini

    Hi Hari,
    You need to use the attribute mapper module to map the sender file name.
    1. set the ASMA in the sender channel
    2. check dynamic attributes in the receiver AS2 adapter and check the file name
    3. use Attribute Mapper in the module tab
    4.  Map the received file name to the dtAS2 file name is the configuration
    Please let me know if anything is not clear so that i can explain you more briefly.
    Thanks,
    Srini

  • B2B 11g - Managing File name from a JMS queue.

    Hi,
    I have configured a Listening Channel to use Generic File 1.0 (to poll a file from local dir) and send it to a Trading Partner. In B2B User Guide it has been said to have the file name as %TO_PARTY%_%DOCTYPE_NAME%_%DOCTYPE_REVISION%_%MESSAGE_ID%_TIMESTAMP.txt. Extension can be anything (txt, dat, etc).
    It is necessary to have this format? What if I want to send a file with name say ABC.txt*.
    How will I manage this file name pattern if I have to read the file content from a JMS queue (and then send the file to the Trading Partner).
    Thanks,
    Sanjay
    Edited by: Sanjay Bharatiya on 24-Nov-2010 12:07 PM

    Hi Anuj,
    I set up AS2 in my local environment and tested it. I do not get the desired name of the file. The wire message seems to be ok. Following is the Tranport Header present in the wire message from the sender B2B server:
    Message-ID=<ID:<172014.1291742389684.0>@kg_certificate> Content-Transfer-Encoding=binary MIME-version=1.0 From=kg_certificate Disposition-Notification-To=[email protected] AS2-To=exel_certificate User-Agent=AS2 Server Date=Tue, 07 Dec 2010 17:19:50 GMT AS2-Version=1.1 AS2-From=kg_certificate Content-Disposition=attachment; filename=J7Q9A7.txt Content-Type=*application/octet-stream*
    Following is the Transport Header present in the wire message from the receiver B2B server:
    AS2-To=exel_certificate TE=trailers, deflate, gzip, compress Date=Tue, 07 Dec 2010 17:19:50 GMT AS2-Version=1.1 Accept-Encoding=gzip, x-gzip, compress, x-compress AS2-From=kg_certificate Content-Transfer-Encoding=binary Disposition-Notification-To=[email protected] Message-ID=<ID:<172014.1291742389684.0>@kg_certificate> Content-type=application/octet-stream MSG_RECEIVED_TIME=Tue Dec 07 12:20:39 EST 2010 ECID-Context=1.0000In1qASoEoI05nzp2iZ1Cxam9001KGU;kXCmv0 MIME-version=1.0 User-Agent=AS2 Server Oracle HTTPClient Version 10h Content-Disposition=attachment; filename=J7Q9A7.txt Content-Length=211 Host=10.32.200.207:8001 Connection=Keep-Alive, TE From=kg_certificate
    Things look good here but when the file is written to a directory the file name is of the form <sendername>_<doctypename>_<docrevision>_<msgtype>_*****.dat. I do not get the desired file name (J7Q9A7.txt). What am I missing?
    Thanks,
    Sanjay
    Edited by: Sanjay Bharatiya on 7-Dec-2010 11:59 AM

  • Dynamic Receiver file name in AS2 adapter

    Hi Experts,
    How to get dynamic receiver file name in AS2 adapter. We need receiver file name same as of sender file name.
    We tried selecting dynamic attributes file name but we are getting followin error in CC.
    Message processing failed. Cause: javax.resource.ResourceException: Fatal exception: com.seeburger.xi.connector.queue.TaskBuildException: Mandatory attribute dtAS2FileName is not present in XI message., Mandatory attribute dtAS2FileName is not present in XI message.
    Thanks,
    Hari

    hi hari,
    You can't do it manually. As both adapter are in different context.
    You can go with UDF to slove ur problem.
    Just extract the input file name using Dynamic configuration
    Store that in some variable.
    Use same name in the dynamic file name in AS2 receiver. Below code might be useful.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://seeburger.com/xi/common/dtAS2FileName", "DYNFILENAME");
    conf.put(key,strfilename);
    Thanks
    Jai
    Edited by: Jaideep Baid on Apr 9, 2010 9:16 AM

  • Custom File name for AS2 FA

    Hi Gurus,
    We have a specific requirement, wherein we are expected to be able to pass a unique file name to all the FA, sent over AS2.
    The FAs currently are being handled in B2B.
    I also understand that this can be done from the middleware layer ( How to setup filename in AS2 protocol ).
    Is it also possible that the same can be done from the B2B itself, probably by using a Callout, so we are able to send it directly from B2B? Please advise.
    Thanks in anticipation of a quick response.
    Regards,
    Sambhav.

    Hi Sambhav,
    It will be easier and performance oriented if you do it at middleware. It's my personal opinion that callouts should be used as a last option.
    Regards,
    Anuj

  • To retain the same file name in target(File) that coming from source system(AS2).

    Hi All,
    I have a requirement to send the two file from the third party system(GXS) to SAP ECC via SAP PI(version - 7.4). We are using AS2 adapter at the sender side to pick the file and using File Adapter to place the file in ECC.
    Its a pass through scenarion(No ESR part is used).
    Requirement:
    We are going to get 2 files ->Example:  one from Axis and another one from ICICI -> each bank file will have a file name ->
    We have to post the file at the target system with the same name as source file name, the source file name could come dynamically(with diff time stamp).
    Please let me know, Is it possible to achieve the above requirement(we have to retain the file name in target that coming from source system) with Sender AS2 adapter, If yes then please suggest the best approach.
    Regards,
    Pradeep Bawlia

    Hi Guys,
    The above requirement is solved now.
    Solution - I used java mapping for extracting the same source file name and assignning the same to the target system.
    Code:
    public class ExtractFileName_ASMA extends AbstractTransformation{
    public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException  
    DynamicConfiguration conf=in.getDynamicConfiguration();
    DynamicConfigurationKey key_AS2FileNmae = DynamicConfigurationKey.create("http://sap.com/xi/XI/AS2/AS2", "AS2Filename");
    DynamicConfigurationKey key_FileNmae = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File", "FileName");
    String As2FileName=conf.get(key_AS2FileNmae);
    conf.put(key_FileNmae, As2FileName);
    try{
    byte b[]=new byte[in.getInputPayload().getInputStream().available()];
    in.getInputPayload().getInputStream().read(b);
    out.getOutputPayload().getOutputStream().write(b);
    catch(Exception e)
    2. Another solution we can use the graphical mapping and need to use the dynamic config UDF at mapping level to acheive this requirement but here is one drawback - we need to do content conversion is this case.
    In case of Java mapping, no need to play with source file.
    WITHOUT USING ESR, WE CAN NOT ACHEIVE THIS REQUIREMENT.
    Regards,
    Pradeep Bawlia

  • File name to be read in mapping - File to SOAP Scenario

    Hi all,
    its a  file to soap scenario. i need to send the file name also to target system. how can i get the file name in the mapping? is there a way to read the header information in mapping?
    Regards,
    Rashmi

    You need to check for Adapeter specific Message Attributes of your File adapter.Then write user defined function to set Dynamic_configuration. So that you can get the file name in the header(u can chk this in SXMB_MONI after implementing the UDF, it will create one section for dynamic_configuration.)
    Manisha

  • Dynamic File name in IR bypass scenario

    Hi All,
    i have a scenario , where i am bypassing my IR part.
    i need to transfer image files from one location to another.
    Now i need to create the Directory as current date and Filename with what i have in sender file name.
    Any clue guyz?

    Hi Sam,
    As for the file name, you can make use of the Adapter Specific Message Attributes available in the Advanced tab of the sender and receiver communication channels to pass through the name of the source file and assign the same name to the target file.
    In the source communication channel, please check the following check boxes:
    1. Set Adapter Specific Message Attributes
    2. File Name
    In the receiver communication channel, please check:
    1. Set Adapter Specific Message Attributes
    2. Fail if Adapter Specific Message Attributes missing
    3. File Name
    This will enable you to pass throught the file name without the need to create any IR objects.
    Regards,
    Jyotika.
    Edited by: Jyotika Manghani on Dec 10, 2010 7:18 AM

  • How to show document title instead of file name in Document Manager

    In WebCenter Portal 11g PS5, there is the Document Manager task flow:
    http://docs.oracle.com/cd/E23943_01/webcenter.1111/e10149/content_doctf.htm#BABGAICC
    it displays a list of a Folder and its contents, much alike the output of the COLLECTION_DISPLAY service in the Content Server.
    I was wondering if there is a way (customization) to display the dDocTitle of content items (or particular content items) instead of the file name.
    While displaying the filename makes sense in a lot of cases we have a lot of Contributor Data Files that are saved as dDocName.xml which doesn't make much sense to the user viewing the folder they are stored in.

    This is now possible using a customization and additional command-line properties, see the following Support note:
    Support for Presenting Additional Content Metadata in Document Explorer View Task Flow [ID 1480966.1]

  • AS2 File name preseve - can we force the file name to be in Content-Type

    Ref: http://www.b2bgurus.com/2007/11/as2-file-name-preserve-feature.html
    Our TP wants file name to be part of Content-Type of MIME rather than Content-Disposition. is this possible in Oracle B2B?
    Thanks,
    Kalyan

    Hi Ramesh,
    Older applications still use "name" parameter of content-type to identify and further process the document
    I think B2B should provide a way to include "name" parameter as part of content-type for backward compatibility
    Expected by our TP
    Content-Type: application/pdf; name="example.pdf"
    Content-Transfer-Encoding: base64
    few links to throw some more light on the topic
    http://osdir.com/ml/ietf.rfc822/1996-03/msg00000.html
    http://pear.php.net/bugs/bug.php?id=4057
    h3. expert from wiki
    The original MIME specifications only provided a means to associate filenames with application/octet-stream parts. This was done through the use of a name= parameter on the content-type. The theory here was that filenames were mostly used for type information and therefore did not need to be present in most cases. It was a mistake. The specification of content-disposition attempted to provide a more general means of providing file name information by defining a filename parameter as part of the content-disposition field

  • When downloading files by internet download manager sometimes shows the file name of downloaded video as videoplayback instead of the original file name

    when downloading video files by the ( internet download manager) most of times the file name downloaded as ( video playback ) instead of actuly name of the files
    please let me know how to solve such problems?

    can you please also contact IDM support about it?
    * http://www.internetdownloadmanager.com/register/new_faq/main.cgi

  • RFC TO HTTP receiver scenario.Adding file name to HTTP receiver

    Hi All,
    Scenario is ZBAPI  ->XI-> HTTP conncetivity to EXternal Partners .
    ZBAPI sends the Partner data informtaion to XI .  I need to create a Partnerdata xml in XI and pass it to HTTP Connectivity (Certificates ) to External Partners
    Connectivity is working but I need to add the time stamp to the Partner data xml in the HTTP Receiver .
    I dont get the time stamp in ZBAPI
    I checked many blogs to create UDF of getfilename, dynamic configuration , but here there is no FTP sender channel .
    Can someone help me in giving ideas as hope to assign the time stamp in runtime to HTTPS Receiver Channel .
    Thank you ,
    Best Regards,
    Vara

    Hi Vara,
    In your question you actually mentioned three different communication methods (HTTP, HTTPS and FTP), but only one of them can really work with files and it is the FTP adapter. Moreover, what you need is the Receiver FTP Communication Channel, not the Sender one (as you need to deliver your message to an external system, not to collect it from there). What you need to do is find your Receiver Communication Channel, go to Advanced tab and mark "Use Adapter-Specific Message Attributes", as well as the File Name (that appears once you mark the first one). Then, in your message mapping, you just put the current timestamp to the respective dynamic configuration parameter. Find an example of how to make the whole change [here|http://www.****************/Tips/XI/ASMA/Index.htm].
    However, if I misunderstood you and you need to use the current timestamp in the message body instead of the file name, it will be even simpler. In this case, just go to your Message Mapping and in the target field, put the "currentDate" function from the "Date" group, then double click on it, click the "extended view" button and put your expected date and time format.
    Hope this helps,
    Grzegorz

  • Missing file name while receiving AS2 MDN acknowledgement

    We are using BizTalk 2010.
    We send one AS2 package to our TP and our TP send us back 4 Acknowledgement files.
    Most of the acknowledgement files that we receive from the TP contains the ReceivedFileName property which contains the file name, except for the 1st acknowledgement or the MDN, which doesnt contain the file name.
    Our TP has informed us that they do send us the MDN with a file name.
    In our BizTalk 2010 system :
    - We have a One-way receive port, which monitors all the content received from TP.
    - We have defined a CustomPipeline for all inbound AS2 packages (AS2Receive pipeline). In this custom pipeline, in the Execute method, I had looked at all the properties from the base message context. I was not able to find ReceivedFileName, PreservedFileName,
    AS2PayloadContentType properties. I also looked at the InBoundHttpHeaders and couldnt find the file name in there. 
    I heard that BizTalk 2010 has fixed this issue. Where can I find what was fixed? I had looked at the following links, but it didnt help: 
    http://geekswithblogs.net/VishnuTiwariBlog/archive/2010/10/14/as2-integration-between-seeburger-bis-6.0-and-biztalk-server-2009.aspx
    http://www.postseek.com/meta/60dd56c855adc621edd20d64f0b106d5
    Is there any other place, I could look for the file name?
    And what could be reason that, the system is able to retain the file name for all the other acknowledgement, but for Ack1/MDN?
    Or is there a way to look at the raw content with the header send by my TP? (tried using Fiddler / Wireshark)
    Or is there a way to prove, that I indeed not receive any file name?
    Thanks for your help.
    Thanks and Regards, Vikram

    Hi VNSuvarna,
    >>I heard that BizTalk 2010 has fixed this issue. Where can I find what was fixed?
    Here are a series of cumulative update package 6 for BizTalk Server 2010, please check which is available for you. Check out https://support.microsoft.com/en-us/kb/2855367?wa=wsignin1.0 for further information.
    >> Or is there a way to look at the raw content with the header send by my TP? (tried using Fiddler / Wireshark)
    You can also use Fiddler, it captures HTTP(S) traffic and logs it for the user to review.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Version/Referenced File name changes and managing reference files.

    I had an issue with wrong version names for reasons of my own DAM workflow. I changed the name in the metadata portion of Aperture and changed the name in the drive the has the referenced files for the versions (and there are no duplicated versions, etc). When I go to manage the referenced files, I get the old version names popping up in the manage reference files window/dialog. the names I want show up elsewhere in Aperture and on the reference external drive, but not in the manage reference files dialog. Is there a way to ensure that all of Aperture knows my new version names and new referenced file names?

    Oh, and I did restart the application, but not the machine.

  • Preserve the file name when sending a file thru AS2

    Hi Ramesh,
    i encounter this requirement that my Customer want us to send a custom document to them with a specific filename thru AS2.
    for example:-ORG1234DES20070423.xml where the 1234 and 20070423 is dynamic value and i get it from the content of the document.
    they are using Cyclone
    can this be done and how ?
    thanks
    Kin Wah

    Hello,
    Right now we do not have a feature as part of AS2 Plugin where in we can preserve the file name. Please raise an SR, depending on the justification we can give this as a feature.
    Rgds,Ramesh

Maybe you are looking for