Skip to Content

File content conversion using SOAP adapter

Hi,

I'm using a receiver SOAP adapter in my IDOC to file scenario and need to do file content conversion in the receiver side.

Are any standard modules available for file content conversion in the SOAP adapter or do I need to write custom EJB modules for this.

Please note that I have to use a SOAP adapter, can't use any other adapter.

Thanks in advance

Shiladitya

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 09:26 AM

    Hi,

    XML Document Conversion Type

    ● Enter recordTypes as the parameter name.

    Under Parameter Value, enter the complete, comma-separated list of all names of recordset types that occur in the document to be converted.

    If you decide to use this method, you can define a different conversion type for each recordset type that occurs in the XML document.

    For example, you could name the recordset types as follows: RecordType1,RecordType2,RecordType3.

    ● Enter singleRecordType as the parameter name.

    Under Parameter Value, enter the name of a recordset type that is to be used to convert all elements that occur in the XML document.

    If you decide to use this method, define the same conversion type for each recordset type that occurs in the XML document.

    You must enter exactly one parameter only. Whichever parameter you choose, you automatically exclude the second parameter.

    You define further parameters for each recordset type.

    In the remainder of this documentation the parameters are specified by the prefix <RecordType>. In your configuration, replace this name with the name of the recordset type.

    Conversion Type List with Separators

    &#9679; <RecordType>.fieldSeparator

    Enter the field separator that is written between the individual fields of a record.

    This specification is mandatory.

    Conversion Type List with Fixed Field Length

    &#9679; <RecordType>.fieldLengths

    Specify a character string that contains a list of fixed field lengths that are separated by commas and which determines the number and the length of fields generated in the text file.

    For example, you want to write a recordset with three elements that have field widths of five, ten, and fifteen characters. Enter:

    <RecordType>.fieldLengths = 5,10,15

    This specification is mandatory.

    &#9679; <RecordType>.fieldLengthExceeded

    Specify how you want to handle fields that exceed the configured field length. Permitted values for the parameter value are:

    &#9675; error (default)

    Interrupts processing of message with error

    &#9675; cut

    Cuts off superfluous characters

    &#9675; ignore

    Ignores the field length restriction

    Further Entries

    &#9679; <RecordType>.beginSeparator

    Enter a string. The string is placed in front of the first field of a recordset.

    &#9679; <RecordType>.endSeparator

    Enter a string. The string is appended to the last field of a recordset as a concluding character. The default is \r\n.

    &#9679; contentType

    Enter the MIME type of the converted payload. The default value is text/plain.

    &#9679; addHeaderLine

    Only define this parameter if you have already defined singleRecordType.

    Define whether a header line is to be added to the result of the conversion.

    &#9675; none (default)

    Does not insert a header line

    &#9675; fromXML

    The header line is generated from the element name of the first recordset of the XML document

    &#9675; fromConfiguration

    The header line is determined by the configuration parameter headerLine.

    &#9679; headerLine

    Only define this parameter if you have already set addHeaderLine=fromConfiguration.

    The value that you define is placed in front of the result of the conversion as a header line.

    &#9679; fixedLineWidth

    Enter the maximum line length n (in characters) that can be written to the resulting document. The separator specified by lineSeparator is inserted in the resulting document every n characters.

    &#9679; lineSeparator

    Only define this parameter if you have already defined fixedLineWidth.

    Specify the string that is written to the resulting document at the end of each line that is written with fixedLineWidth. The default is \r\n.

    Use of Special Characters

    You can use special characters in the following parameters: <RecordType>.fieldSeparator, <RecordType>.beginSeparator, <RecordType>.endSeparator, headerLine, and lineSeparator.

    &#9679; Tabulator: \t

    &#9679; Carriage Return (CR): \r

    &#9679; Line Feed (LF): \n

    &#9679; Arbitrary character: \x<code>

    <code>indicates the hexadecimal character code of the character to be displayed.

    Regards,

    Phani

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 09:19 AM

    Hi,

    You can use standard Message Transfrom Bean of Adapter FrameWork to perform Content Conversion on the fly in any J2EE based Adapter (Communication Channel)

    Regards,

    Sudharshan N A.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 09:20 AM

    You can use the MessageTransformBean or the StrictXml2PlainBean

    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/748d595dab6fb5e10000000a155369/frameset.htm

    Regards

    Stefan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 09:25 AM

    Hi,

    yes there is an adapter module available to do this with SOAP adapter

    localejbs/AF_Modules/MessageTransformBean>Local Enterprise Bean-

    -


    >XML2Plain

    Here you have to use below parameters for Module configuration

    Transform.Class = com.sap.aii.messaging.adapter.Conversion

    Transform.ContentType = Application/x-www-form-urlencoded

    xml.<StructureName>.fieldSeparator

    xml.<StructureName>.endSeparator

    xml.addHeaderLine = 0(No) or 1(yes)

    xml.conversionType = StructXML2Plain

    xml.recordsetStructure = <Structure Name1,name2,..>

    let me know if you need anymore help on this.

    I have successfully implied it in one of the scenario.

    Thanks

    Swarup

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.