cancel
Showing results for 
Search instead for 
Did you mean: 

StrictXml2PlainBean

Former Member
0 Kudos

HI,

can any body help me how to add this bean in my configuration

thanks and regards

sandeep

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi all,

while configuring this bean it is asking about the recordset

can anybody brief me about what is record set

thanks and regards

sandeep

Former Member
0 Kudos

Hi Sandeep !

Recordset is the node in your xml message that has the unbounded occurance specified and has inside all the repeating fields...

for example:

<myRecordset>

<name/>

<surname/>

<address/>

<myRecordset/>

in this case, "myRecordset" node has to be declared with occurance 0/1..unbounded to allow the file to have more than one record (record = a group of fields, such as name, surname, etc.).

Regards,

Matias

Former Member
0 Kudos

Hi Sandeep !

Check this blog (it uses mainly PayloadZipBean but also StrictXml2PlainBean)

/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework

also...

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

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/50061bd9-e56e-2910-3495-c5faa652...

Regards,

Matias

ps: please award points if helpful

Former Member
0 Kudos

hi

many thanks for the reply i have one more querry in it can you please tell me about what to given for the parametre name and parametre value while configuring and can you please on what parametre he is talking about while configuring

thanks andregards

sandeep

Former Member
0 Kudos

Hi !

Imagine that you hace only one recordset defined,

<myRecordset>

<name/>

<surname/>

<address/>

<myRecordset/>

You should put values like this (always don't use double quotes):

Parameter name: "myRecordset.fieldLengths"

Parameter value: "a,b,c"

where a,b and c are the field lengths you want to assign to the fields name, surname and address once they are converted from XML formato to plain text. You should assign some values and test, they should be the maximum length you are expecting to receive in order to avoid truncation.

Parameter name: "recordTypes"

Parameter value:" "myRecordset"

Parameter name:"myRecordset.fieldSeparator"

Parameter value: ","

to specifiy the field separator to be used in destination file.

Check this link for additional parameters

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

Regards,

Matias.

Edited by: Matias Denker on Jan 28, 2008 3:51 PM

Former Member
0 Kudos

Hi Sandeep !

Have you tried this?

Regards,

Matias

ps: please award points if helpful.

Former Member
0 Kudos

Hi matias denker

I am having an issue on idoc to file scenario

the sender idoc structure is ADRMAS(addressmasterdata )

But the mapping is done to generate payload when there is only customer master data in the sender side and when there is no customer master data in sender side a valid empty payload with just a header field is getting generated thus empty files are being created in the reciever side .can we stop creating empty files in the reciever side by using this StrictXml2PlainBean.

thanks and regards

sandeep

Former Member
0 Kudos

Hi Sandeep !

Check this:

/people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module

Regards,

Matias.

Former Member
0 Kudos

hi,

Is there any way to stop generating empty pay load

but i think the threads that you have sent will handle the things only after empty pay load getting generated But i want to stop empty payload getting generated is the below can help please can you give ur coments over this

thanks

sandeep

Q: How does the File Adapter handle empty files and messages with a zero-sized payload?

A: Up to and including XI 3.0 SP18 / PI 7.0 SP9 empty files in the sender adapter will not trigger the creation of a message. If an empty message is sent to a receiver channel, no output file will be created.

Starting with XI 3.0 SP19 / PI 7.0 SP10 the channel's behavior can be configured in Integration Builder.

Q: I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory? Example of such a payload generated from mapping is as follows: <?xml version="1.0" encoding="UTF-8"?> <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>

A: If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done: - Either modify your mapping so that empty message payload without a root element is generated. This could be done only by creating a Java mapping and implement the logic to convert from root element to an empty text. This can not be done using Message Mapping tool. - or, use a module based approach, e.g., using the StrictXml2PlainBean, where such a valid XML payload is converted to an empty payload before the file receiver channel is invoked.

Former Member
0 Kudos

hi Matias

can this be done please coment on this

I found a note related to this (note 821267 Question NO 31). Please go through it and let me know your suggestion

Q: I configure the receiver channel with File content conversion mode and I set the 'Empty Message Handling' option to ignore. Input payload to the receiver channel is generated out of mapping and it does not have any record sets. However, this payload has a root element. Why does file receiver create empty output file with zero byte size in the target directory? Example of such a payload generated from mapping is as follows: <?xml version="1.0" encoding="UTF-8"?> <ns1:test xmlns:ns1="http://abcd.com/ab"></ns1:test>

A: If the message payload is empty (i.e., zero bytes in size), then File adapter's empty message handling feature does NOT write files into the target directory. On the other hand, if the payload is a valid XML document (as shown in example) that is generated from mapping with just a root element in it, the File Adapter does not treat it as an empty message and accordingly it writes to the target directory. To achieve your objective of not writing files (that have just a single root element) into the target directory, following could be done: - Either modify your mapping so that empty message payload without a root element is generated. This could be done only by creating a Java mapping and implement the logic to convert from root element to an empty text. This can not be done using Message Mapping tool. - or, use a module based approach, e.g., using the StrictXml2PlainBean, where such a valid XML payload is converted to an empty payload before the file receiver channel is invoked.

Former Member
0 Kudos

HI Matias

why i am asking this is i have used variable substitution to substiture the field 'date' (dd/MM/yyyy/hh/mm/ss) in the file name so when empty payload (a valid xml ) the communication channel is failing by showing the following error

File processing failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during

variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload

: date

As of now the business is not getting effected as the business scenarion needs only customer master data at the reciever side But when ever there is no custmer master data in the sourse side the communication channel is failing ( so it is an internal issue and is there any way which could solve the both (ie the business must not get effected and as well the communication channel must not fail)

any coments on this will be higly apreciated

thanks and regards

sandeep

Former Member
0 Kudos

Hi !

I suggest to avoid using variable sustitution and instead use Dynamic Configuration to change or create the destination filename using the graphical mapping UDF.

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

This way, the comm channel should not fail.

Regards,

Matias

ps: please award points if helpful.