ns0 Prefix in XML output file
Dear Gurus,
I am working on a scenario where vendor master is triggered from SAP-XI--FTP.
when i am posting the vendor master on FTP.. i am getting
the xml output with prefix as below
<ns0:VENDORID>0000100000</ns0:VENDORID>at each element in vendor master xml file.
Instead of <VENDORID>0000100000</VENDORID>
could anyone tell how to fix this prefix at each level.
Does i need to add any module in file receiver adapter..or any patch i need to apply ..
we are on SP9 PI 7.0
Kind Regards,
Vijay
Hi,
I tryed as per blog earlier ..it is not working
i am using file receiver adapter...any other solution to fix this.
Regards,
Vijay
Similar Messages
-
How to calculate number of data records in a XML output file
Hi,
After generating a XML output file from Oracle Reports, I want to calculate number of records in the XML file. Is it possible? Specifically, I want to calculate number of records for a group variable ( organization_id, which I use for bursting).
Thanks for the help.Thanks BIPuser. It is useful for me.
I can use this xsl function within the template. However, I'm also looking to print this in the concurrent request log file. So, outside of rtf template, id there any PL/SQL based XML functions I can use to count the number of records.
Thanks. -
I like to generate an XML output file using the PLSQL. Can any one help with an example (using EMPand DEPT). I tried the forum but seems confusing to me...
This is URGENT so please rush!Please refer to the following post:
page 0 security: authorization scheme not applied to other pages -
Ns0 in all the element tag of the XML output file
Hi Gurus,
I'm performing a mapping in the Integration Builder. The target structure is based on an imported xsd file via External Definitions.
However, in the output file, I'm getting a ns0 prefix in all the name of the elements.
Below is an example of how the output file looks like.
<ns0:Document xmlns:ns0="urn:iso:std:iso:20022:tech:xsd:pain.001.001.02">
<ns0:pain.001.001.02>
<ns0:GrpHdr>
<ns0:MsgId>0000000000247040099700</ns0:MsgId>
<ns0:CreDtTm>29-07-2008 16 44 06</ns0:CreDtTm>
<ns0:Authstn />
<ns0:BtchBookg>M</ns0:BtchBookg>
<ns0:NbOfTxs>1</ns0:NbOfTxs>
<ns0:Grpg>GRPD</ns0:Grpg>
Is there any way to get rid of the ns0? Issit some namespace definition which i need to specify somewhere?
Thanks in advance.Hi,
It does not matter whether your namespace prefix is ns, ns0, xyz or whatever.
When your mapping doesn't work there must be another reason.
Just try and paste the payload from moni and test ur mapping.
The namespace prefic ns0 is only a placeholder for the namespace urn:iso:std:iso:20022:tech:xsd:pain.001.001.02. This namespace can also be represented by another prefix or even by the empty prefix.
However, it is not possible to model the target payload via a Message type in the Integration Repository.
Message types are simply not suitable to model a document as you have posted. However, there is simple help. Just download the schema for the Message type to your local file system. Add attribute elementFormDefault="qualified" to the root tag of that schema. Upload that schema as External Definition. This External Definition will have one External Message. Define your mapping using that schema.
Thanks
Swarup -
Hi Friends,
I am working in SAP Technical upgrade Project from 4.6C to SAP ECC 6.0. In 4.6c one Z program is there, the output of Z program is to generate output XML file in the application Server. We checked and downloaded that the output file is readable and the XML is valid.
When we run the same program in ECC 6.0. (after unicode check & changes done), the output xml file is generated and it is in unreadable form. (XML contains some machine characters). When we open the XML in Altova Spy, it shows the error XML is invalid. The erorr is 'character #x3F3C is grammatically unexpected'.
In 4.6c, they used the encoding <?xml version="1.0" encoding="ISO-8859-1" ?> . We changed the encoding to UTF-8 in ECC 6.0 since we are doing unicode conversion. (
<?xml version="1.0" encoding="UTF-8" ?> ). After this change also, the output file is not generated correctly. It is unreadable form. (Some Machine Characters).
Friends, What could be the problem ? . Can you help me to identify this problem.
Kind regards,
Jegathees P.I troubleshooted that, the reason is that conversion of X to C (Hexadecimal to C) in the ASSIGN statement is not working correctly in ECC 6.0. Then, we replaced the code with our custom Function Module to convert xstring to string. After this, we got the XML correctly, readable and well-formed XML.
-
How to Generate XML Output file
Hi,
I want to print sample output XML file.
I got this link 362496.1
An output file can be generated via the Preview functionality available under the XML Publisher Administrator responsibility. Navigation path :
1. Login to the application as SYSADMIN
2. Responsibility: XML Publisher Administrator
3. Function: Templates
4. Select a Template for which a Preview Data file has been uploaded in the past.
5. Click on the Preview icon
6. Save the PDF to the client PC
7. Determine the version either by the above instructions OR by provide the PDF file to Global Customer Support.But in #4 I can not populate any values to search, even if I put all %.
How can I get a valid search?
Thanks a lot,
Ms KHi;
AFAIK if you prepare template in XML publisher than you can take output as pdf, by the way you can take xml output too
Please check user guide:
http://www.oracle.com/technology/products/xml-publisher/docs/XMLP5.6.1UserGuide.pdf
Oracle XML Publisher and Oracle Reports
Oracle XML Publisher and Oracle Reports
Also Please check below thread:
XML output for pdf concurrent program
http://www.quovera.com/whitepapers/downloads/xml_oracle.pdf
Generate XML output using DBMS_XMLGEN.getxmltype and not from rdf
http://www.orafaq.com/forum/t/35204/2/
Hope it helps
Regard
Helios -
Hi experts,
I am currenty getting below output in my XML file and it is wrapped in message type MT_Test.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Test xmlns:ns0="http://test.com/xi/T1/Data">
<Tests>
<schemaLocation>http://tempuri.org/TestSchema.xsd F:/documentation/MID/Release-Test/TestSchema.xsd</schemaLocation>
<Test>
<HeaderID>This is a string 1</HeaderID>
</Test>
</Tests>
</ns0:MT_Test>
and I want to change it to the below format.
<?xml version="1.0" ?>
<Tests xmlns="http://tempuri.org/TestSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tempuri.org/TestSchema.xsd F:/documentation/TEMP/Release-Test/TestSchema.xsd">
<Test HeaderID="RES-996-25885-527">
</Test>
</Tests>
Request you to give your inputs on how I can achieve this?Hi ,
You need a java mapping to produce exactly the output you posted here.
I assume you r working with PI 7.1 here is the java mapping code.
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import com.sap.aii.mapping.api.AbstractTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import com.sap.aii.mapping.api.TransformationInput;
import com.sap.aii.mapping.api.TransformationOutput;
public class FormatXML extends AbstractTransformation{
public void execute(InputStream in, OutputStream out)
throws StreamTransformationException {
try{
// TODO Auto-generated method stub
DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
DocumentBuilder builderel=factory.newDocumentBuilder();
/*input document in form of XML*/
Document docIn=builderel.parse(in);
NodeList l=null;
String schemaLocation="";
l=docIn.getElementsByTagName("schemaLocation");
if(l!=null)
schemaLocation=l.item(0).getTextContent();
schemaLocation=schemaLocation.replaceFirst("/MID/", "/TEMP/");
String outPut="<?xml version=\"1.0\" ?><Tests xmlns=\"http://tempuri.org/TestSchema.xsd\" " +
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
"xsi:schemaLocation=\""+schemaLocation+"\">"
+"<Test HeaderID=\"RES-996-25885-527\">"
+"</Test></Tests>";
out.write(outPut.getBytes("UTF-8"));
catch(Exception e)
throw new StreamTransformationException(e.getCause().toString());
public void setParameter(Map arg0) {
// TODO Auto-generated method stub
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
FormatXML genFormat=new FormatXML();
FileInputStream in=new FileInputStream("C:\\Apps\\sdn\\format.xml");
FileOutputStream out=new FileOutputStream("C:\\Apps\\sdn\\format1.xml");
genFormat.execute(in,out);
catch(Exception e)
e.printStackTrace();
public void transform(TransformationInput arg0, TransformationOutput arg1)
throws StreamTransformationException {
this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
If you are new to java mapping pls follow this http://www.****************/Tutorials/XI/Mapping/Index.htm
You need to install eclipse and java 1.5.0 for PI 7.1. You also need proper library files for PI 7.1 which you need to download from PI server. Please follow this link http://wiki.sdn.sap.com/wiki/display/XI/WheretogetthelibrariesforXI+development
Regards
Anupam -
How to add prefixes to xml output?
Does anyone know a quick and easy way to add a namespace prefix to an xml document when you output it as a string?
i'm looking for somethinglike this.
<Order xmlns="http://www.something.com/name">
<item>sink</item>
<Order>
converted into
<dof:Order xmlns:dof="http://www.something.com/name">
<dof:item>sink</dof:item>
<dof:Order>
I have attempted to use the xmlText method on the XmlObject class passing in an XmlOptions object with setSaveSuggestedPrefixes() set to my hsahmap with the namespace and prefix, however nothing happens. Well, sometimes it works and other times it does not.
It seems that it works when i programatically build my xml using XmlObject methods, but it fails when i parse an existing xml string into the XmlObject using parse(String).
Any help would be appreciated. I can't find any detailed help anywhere.
Thanks
JeremyYou can achieve your requirement using XSLT maaping on XML. Read more about XSLT mapping. Also read more about WordML processing tool by Microsoft.
-
Add XML tag to the XML output File
Experts,
My Scenario is JDBC to File
For the resultant xml file i have to append a line <?Test Line?> after
<?xml version="1.0" encoding="UTF-8" ?> while passing it to legacy system ?
From SDN I found that a XSLT Mapping(as second mapping in the Interface mapping) will do the above requirement,
I got some XSLT Code from SDN to do this
1)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="/">
<!-- add processing instruction -->
<xsl:processing-instruction
name="POSTEN">SND="SE03220037090" SNDKVAL="1" REC="SE03220669500" MSGTYPE="ORDERS"</xsl:processing-instruction>
<!-- copy payload -->
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>
2)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="/">
<!-- add processing instruction -->
<xsl:processing-instruction
name="POSTEN">SND="SE03220037090" SNDKVAL="1" REC="SE03220669500" MSGTYPE="ORDERS"</xsl:processing-instruction>
<!-- copy payload -->
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>
But none of them worked for me, the additional tag does not appear on the o/p xml file
Any help would be appreciated
SrinivasHello Srinivas,
I had achieved the same using java mapping:
Suppose your XML structure is:
<?xml version="1.0" encoding="UTF-8" ?>
<Root Element>----
</Root Element>
you can use the following code:
import java.io.*;
import java.util.*;
import com.sap.aii.mapping.api.*;
public class AddCommentInXML implements StreamTransformation {
String record=null;
String comment=null;
public void execute(InputStream in, OutputStream out) {
try {
DataInputStream stdin = new DataInputStream(in);
int length = getLengthFromStream(stdin);
stdin.reset();
byte[] buffer = getBytesFromStream(stdin);
String str = new String(buffer);
record = "<Root Element>";
comment ="<!Test Line><Root Element>";
str = str.replaceAll(record,comment);
out.write(str.getBytes());
out.close();
} catch (IOException e) {
public int getLengthFromStream(InputStream is ) throws
IOException{
int i = 0;
int length = 0;
try{
while ((i = is.read())> 0){
length ++;
}catch (ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
return length;
public byte[] getBytesFromStream(InputStream is) throws
IOException {
// Create the byte array to hold the data
byte[] bytes = new byte[getLengthFromStream(is)];
is.reset();
// Read in the bytes
int offset = 0;
int tmp = 0;
while (offset < bytes.length
&& (is.read(bytes, offset, offset +
(tmp = is.available()))) > 0) {
offset += tmp;
// Ensure all the bytes have been read in
if (offset < bytes.length) {
throw new IOException("Could not completely read Inputstream");
// Close the input stream and return bytes
is.close();
return bytes;
public void setParameter(Map param) {
Hope this helps.
Regards,
Shweta -
XML output file with Control M Characters
Hi,
I am using JDOM API 1.0 on Solaris platform.
Using the XMLOuputter I write the XML data to a file. But the XML file contains Control-M characters at the end of each line..like
<User>^M
<Name>Satish</Name>^M
<id>12567</id>^M
</User>^M
File f = new File(path,Constants.USER_XML);
Document doc = getDocument();
XMLOutputter out = new XMLOutputter();
out.setFormat(Format.getPrettyFormat());
Format outFormat = out.getFormat();
outFormat.setLineSeparator(System.getProperty("line.separator"));
outFormat.setIndent(" ");
try{
FileWriter fw = new FileWriter(f);
out.output(doc,fw);
} catch(IOException iox) {}I am not writing the Control-M characters. Also I am using the default encoding which is UTF-8. So how to avoid the control characters. Thanks in advance.
Regards,
SatishThose are carriage-return (CR) characters. I don't know anything about the classes you are using but I would suggest you let the software decide what line endings it is going to use (the XML default is line-feed (LF) only) instead of telling it. Just a guess.
It's also possible that those CRs were in your input document and you are just copying them to the output document. XML parsers are supposed to normalize those characters to only LF but perhaps your parser isn't doing that. Just another guess. -
Page numbers from XML output file
Scenario:
We have a situation here where we would need to create an XML document and a pdf file produced by an Oracle 11i EBS report. The XML document will need to have the number of pages the report (in pdf) has produced.
For example, if I have two sales orders in the pdf report. And, the first order has three pages and the second order has five pages, we would need to create an the XML document with:
<order>1
<page>3</page>
</order>
<order>2
<page>5</page>
</order>
Question:
Is there a way for us somehow to capture the number of pages for the order (using my example) in the XML template? We want to capture it and use it to populate our XML document.
Thanks
Kamalakar.GHello,
If you know at which xml (data) branch you should break for each page, and your format template is setup to do so, you should be able to predetermine your page numbers using node counting.
I have used node counting only one or two times myself and (at the moment) can not even find the report(s) I used it with (sorry, just way, way too many reports around here... :-( )
Anyway, it is pretty straitforward and is documented at:
http://www.ibm.com/developerworks/library/x-tipnodst.html#1
A google search on XSL and node revealed many other sites with examples as well.
(ex. http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/XML/Q_21875961.html )
Good luck and if I ever find one of the reports I actually used it in...I will post my code.
Scott -
Format of weblogic.store.Admin "dump -deep" XML output file?
Does anyone know where I can find a detailed description of the format of the XML file created by using the "dump -deep" command within the Store Administration utility?
I ran into a problem with stuck messages in a SAF persistent store on WebLogic 10.3.2. After trying everything I could think of to get the messages moving, I resorted to recovering them from the persistent store file into XML files on the filesystem, purging them from the SAF, and then re-injecting them onto the appropriate topics. The message recovery was very straightworward with a simple utility to extract the XML for the messages from the file generated by the "dump" command in the weblogic.store.Admin Store Administration utility. (NOTE: You must use the "-deep" dump option to get the message XML.)
This process was hampered by the fact that the stuck messages were intended for more than one destination and I could not easily discern the intended destination for each. This information must be in the persistent store, but I do not know whether it is available in the "dump -deep" file.
Any insight into the dump file format would be appreciated. I could not find anything in the docs.
Thanks!
- HarryThere's no facility that I know of for interpreting the data in a store.Admin dump - which explains why there's no mention of such a thing in the docs. If you're using SAF agents, I think it may have been possible to boot the WL host server, and then use the WL JMS "message management" utilities to "export" the messages. If you still need help, I recommend opening a case with customer support - make sure to save the original backing store (.DAT files or tables with file stores).
Tom -
Generate xml output file from relational table
Hi All,
I'd like to generate an XML file from a relational table but would like to persist the XSD in Oracle does anyone have a working example?
Edited by: houchen on Jun 2, 2009 5:34 AMFrom the FAQ on the {forum:id=34} forum, {thread:id=416001}.
If you are wanting to register the schemas in Oracle, you will find info on that as well in the FAQ. -
XML output file in Excel 2007/2010 instead of Excel 97-2003
Dear All,
EBS: 12.1.3
Database: 11.1.0.7
OS: Oracle Linux 5.3
Concurrent request ouput is coming normally in excel and the output can only be saved in excel 97-2003
as Viewer option application/vnd.ms-excel is set for .xls.
Now we have requirement for output to be displayed in 2007 or 2010.
for 2007 or 2010 i have to set viewer option for .xlsx
Please suggest the solution.
Thanks is advance
Rgds,
AlibPlease also see old threads -- https://forums.oracle.com/forums/search.jspa?threadID=&q=xlsx&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
XML data output file in a directory needs to be published as a pdf report
Hi,
I have already got an XML output file in a directory.
I want to display it using RTF template using a concurrent program or some sort of java api in a pdf format to be able to print it.
How do I do it? Do I have to write another file output command to read the xml data line by line and output to BI publisher first?Hi,
Hmm, one way is to just utl_file read the file and fnd_file.put_line(fnd_file.output) then close the file. Setup conc prog, rtf template, data definition and you're done.
But the main thing is that you get the XML file to $APPLCSF/$APPLOUT/oXXXXX.out where XXXXX is the request id. You could just setup host concurrent program and copy the file there!
Regards,
Gareth
Blog: http://garethroberts.blogspot.com/
Message was edited by:
gareth.roberts
Message was edited by:
gareth.roberts
Maybe you are looking for
-
Hi, I need to create one query on the cube. User want some of the fields in the query which are present in diffrent source system , rest of the fields are present in the cube. These are master data fields ( 7 fields in total) from other source system
-
3.0.1 won't save 3 files as one
three pcm .wav files are dragged side-by-side onto track one in multi-track view. they range in size from 2gB to 1/2 gB. they display in edit view as a single wave form that is five and one half hours in length. when the entire waveform is selected,
-
Certain apps will not install on my iPod touch 1G due to software version
I bought an iPod Touch 1G off a friend recently. When I got it off him, it had several versions of Angry Birds which all functioned perfectly. Since having to erase all the data and the apps on the device in order to sync it to my computer, I don't s
-
I would like to set up several still Nikon cameras in three buildings to capture the construction of a rooftop sign. Each camera will be connected to a Mac with internet access. Each camera will be controlled by Nikon Camera Control Pro. I would like
-
Hiii, ich want to get a query result for a certain adress. I have used the search object "COBYADDRQuery". In the transaction GENIL_BOL_BROWSER I get results for this search object, when I type the city in the search object field "CITY1". But in my co