on 07-12-2007 3:10 PM
HI,
is it possible to write the output to file without the xml header:
<?xml version="1.0" encoding="UTF-8"?><ns ....>
or an flatfile ?
Henrique,
the file arrived at the ftp but with <xml... header again.
Any ideas ?
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure you use .xsl mapping as the <b>last</b> mapping program in your mappings list, in the Interface Mapping.
Also, test the mapping in interface mapping test tab.
Execute the mapping and go to XML Source view of the target message.
Is it removed there?
- If yes, then probably the header is added in a later point, maybe in receiver adapter (could occurr with soap adapters, for example). Try a test scenario with a file receiver adapter.
- If not, try to revise the xsl mapping.
The key is the <i>omit-xml-declaration="yes"</i> attribute in the <xsl:output> tag.
You could alternatively, try to use <i>method="text"</i>, also in the <xsl:output> tag (if you go for text output, then you don't need to set the <i>omit-xml-declaration</i> attribute).
Regards,
Henrique.
Hey,
If you are using <b>File Content Conversion</b> then you can generate a file with out xml header.
You can used the following parameters.
<b>File.addHeaderLine</b> = 4
<b>File.headerLine</b>= "Header Line You Want"
Hope it answers a bit.
Cheers,
<b>*RAJ*
*REWARD POINTS IF FOUND USEFULL*</b>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Prateek and Amit,
it doens't have anything to do with namespaces AND it doesn't need necessarily to be in the output for it to be recognized as a valid xml file!!!
Pff...
Gordon,
try this xslt mapping:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:copy-of select="." disable-output-escaping="yes"/>
</xsl:template>
</xsl:stylesheet>
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gordon,
In the message Type tab in the IR just remove the XML namespace text below he Data type and then it will not come in yr message .
Also serach the forum with namespace ur prob will be resolved I got the same prob and was resolved like this
REgards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
>>In the message Type tab in the IR just remove the XML namespace text below he Data type and then it will not come in yr message .
This will make sure that the namespace tag <ns01:MT_.......> does not show up,it wont solve the problem,XSLT mapping is the way to solve it as suggested by Henrique.
Thanx
Ahmad
First, to load the xslt mapping in IR, you have to put it into a .zip file and upload it into a Imported Archive entry.
Also, do you already have a mapping in your integration?
If yeah, just add this xslt mapping in the mapping tree of your interface mapping (you can have several mapping programs in the same Interface Mapping). Just enter in edit mode in the interface mapping and add a new entry in the mapping programs list (table in the bottom-center of the interface mapping screen). Select type XSL and in the value, select the .xslt file you have just uploaded into Imported Archives.
If you don't have a mapping, you'll have to create a interface mapping for that (input and output message types would be the same). After that, add the interface mapping to the interface determination in ID.
Regards,
Henrique.
Go for file content conversion and u can write a plain text file.
For XML files, those tags are necessary
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.