How to modify Source XML Structure as it is getting Fail in message Mapping

From Client , I am Gettin Such XML Structure in XML File ...But it is getting failed in Message Mapping ,.,,
<?xml version="1.0"?>
<invoice>
   <Header>
      <DOCID>0001</DOCID>
      <DOCNO>0001</DOCNO>
      <INVAMT>1000</INVAMT>
   </Header>
</invoice>
I tried to find out few things ...
On test of mesage mapping
<?xml version="1.0" encoding="UTF-8"?>
<ns0:invoice xmlns:ns0="urn:sample.com:file:file">
   <Header>
      <DOCID>0001</DOCID>
      <DOCNO>0001</DOCNO>
      <INVAMT>1000</INVAMT>
   </Header>
</ns0:invoice>
This mapping is getting successful.
So Problem I found Is difference in Sender File Structure from autogenrated Source Structure in Test tab :  
</invoice>
and
<ns0:invoice xmlns:ns0="urn:sample.com.com:Invoice:DB">
Please Suggest : What to do ?
How to add this ns0: before INVOICE and :ns0="urn:sample.com.com:Invoice:DB" after INVOICE in Source Structure.
I am using PI 7.0
regards
Prabhat

Hi Prabhat,
the easiest way is to make the field XML Namespace of the source Message Type blank.
Regards,
Udo

Similar Messages

  • How to create an xml structure in webdynpro for java using NWDS?

    Hi Experts,
    I need to call an webservice by passing an xml structure to the webservice.I have the input values loaded on the context,which are basically tied to an Form UI element.Is there anyway in webdynpro to build an xml structure. ,
    or do i need to use any open source like JAAS or DOM parser in the webdynpro project.?
    Thanks
    Aravind

    hi,
    I was working on exporting table data from wd to Excel sheet. There, i had to create an XML representaion of the context.
    Please refer to link, and go through page, 10 and 11 and see id you find anything useful.
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20archive/exporting%20context%20data%20into%20excel%20using%20the%20web%20dynpro%20binary%20cache.pdf]

  • How to modify a xml file?

    I use JAXP 1.1 to read a xml file as a DOM tree. I can make change to the DOM tree in the memory, such as add an element or change the node value, but how can I apply these changes to the source xml file, i.e., write the changes back to the disk?

    you can write an xml file using DOMWriter.
    copy and compile this class
    and then use it:
    PrintWriter printWriter = //create a printWriter form your xml file
    DOMWriter writer = new DOMWriter(printWriter);
    writer.print(myXml.toString());
    package Zeus.core.XML;
    import java.io.*;
    import org.w3c.dom.*;
    * @author Rodrigo Gonzalez Asensio
    * @email [email protected]
    public class DOMWriter {
       protected PrintWriter out;
       protected boolean canonical;
       protected String encoding;
    public DOMWriter(OutputStreamWriter out) throws UnsupportedEncodingException {
         this(out, false);
    public DOMWriter(OutputStreamWriter out, boolean canonical)
         throws UnsupportedEncodingException {
         encoding = out.getEncoding();
         if (encoding == null) {
              throw new UnsupportedEncodingException(out.getEncoding());
         this.out = new PrintWriter(out);
         this.canonical = canonical;
    /** Normalizes the given string. */
    protected String normalize(String s) {
         StringBuffer str = new StringBuffer();
         int len = (s != null) ? s.length() : 0;
         for (int i = 0; i < len; i++) {
              char ch = s.charAt(i);
              switch (ch) {
                   case '<' :
                             str.append("<");
                             break;
                   case '>' :
                             str.append(">");
                             break;
                   case '&' :
                             str.append("&");
                             break;
                   case '"' :
                             str.append(""");
                             break;
                   case '\r' :
                   case '\n' :
                             if (canonical) {
                                  str.append("&#");
                                  str.append(Integer.toString(ch));
                                  str.append(';');
                                  break;
                             // else, default append char
                   default :
                             str.append(ch);
         return (str.toString());
    public void print(Node node) {
         // is there anything to do?
         if (node == null) {
              return;
         int type = node.getNodeType();
         switch (type) {
              // print document
              case Node.DOCUMENT_NODE :
                        if (!canonical) {
                             out.println("<?xml version=\"1.0\" encoding=\"" + encoding + "\"?>");
                        print(((Document) node).getDocumentElement());
                        out.flush();
                        break;
                   // print element with attributes
              case Node.ELEMENT_NODE :
                        out.print('<');
                        out.print(node.getNodeName());
                        Attr attrs[] = sortAttributes(node.getAttributes());
                        for (int i = 0; i < attrs.length; i++) {
                             Attr attr = attrs;
                             out.print(' ');
                             out.print(attr.getNodeName());
                             out.print("=\"");
                             out.print(normalize(attr.getNodeValue()));
                             out.print('"');
                        out.print('>');
                        NodeList children = node.getChildNodes();
                        if (children != null) {
                             int len = children.getLength();
                             for (int i = 0; i < len; i++) {
                                  print(children.item(i));
                        break;
                   // handle entity reference nodes
              case Node.ENTITY_REFERENCE_NODE :
                        if (canonical) {
                             NodeList children = node.getChildNodes();
                             if (children != null) {
                                  int len = children.getLength();
                                  for (int i = 0; i < len; i++) {
                                       print(children.item(i));
                        } else {
                             out.print('&');
                             out.print(node.getNodeName());
                             out.print(';');
                        break;
                   // print cdata sections
              case Node.CDATA_SECTION_NODE :
                        if (canonical) {
                             out.print(normalize(node.getNodeValue()));
                        } else {
                             out.print("<![CDATA[");
                             out.print(node.getNodeValue());
                             out.print("]]>");
                        break;
                   // print text
              case Node.TEXT_NODE :
                        out.print(normalize(node.getNodeValue()));
                        break;
                   // print processing instruction
              case Node.PROCESSING_INSTRUCTION_NODE :
                        out.print("<?");
                        out.print(node.getNodeName());
                        String data = node.getNodeValue();
                        if (data != null && data.length() > 0) {
                             out.print(' ');
                             out.print(data);
                        out.print("?>");
                        break;
         if (type == Node.ELEMENT_NODE) {
              out.print("</");
              out.print(node.getNodeName());
              out.print('>');
         out.print("\n");
         out.flush();
    } // print(Node)
    * Returns a sorted list of attributes
    protected Attr[] sortAttributes(NamedNodeMap attrs) {
         int len = (attrs != null) ? attrs.getLength() : 0;
         Attr array[] = new Attr[len];
         for (int i = 0; i < len; i++) {
              array[i] = (Attr) attrs.item(i);
         for (int i = 0; i < len - 1; i++) {
              String name = array[i].getNodeName();
              int index = i;
              for (int j = i + 1; j < len; j++) {
                   String curName = array[j].getNodeName();
                   if (curName.compareTo(name) < 0) {
                        name = curName;
                        index = j;
              if (index != i) {
                   Attr temp = array[i];
                   array[i] = array[index];
                   array[index] = temp;
         return (array);
    regards.

  • How to modify source code on website

    I would like to view and modify source code for my website on the iphone. I have an app that allows me to FTP the files to my server. But, I don't know how to view code in Safari and be able to modify it. Can you tell me how to do that?
    Thanks!

    See also:
    *Firefox > (Web) Developer > Page Source
    *Tools > Web Developer > Page Source (Ctrl+U)
    *right-click on a web page and select View Page Source in the context menu

  • Source XML Structure-Two Nodes with same names

    Hi All,
    I have a strange situation. I am doing a Webservice to RFC scenario. The Third party vendor provided me with the Source XML fro me to create the datatype.
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope version="01.00">
           <Sender>
                 <Id></Id>
                 <Credential></Credential>
           </Sender>
           <Recipient>
                 <Id></Id>
           </Recipient>
           <TransactInfo transactType="data">
                 <TransactId></TransactId>
                 <TimeStamp></TimeStamp>
           </TransactInfo>
           <Packet>
                 <PacketInfo packetType="data">
                        <PacketId>1</PacketId>
                        <Action></Action>
                        <Manifest></Manifest>
                 </PacketInfo>
                 <Payload><![CDATA[<?xml version="1.0"?>
    <DATA_1>
           <FIELD1></FIELD1>
           <FIELD2></FIELD2>
           <FIELD3></FIELD3>
           <FIELD4></FIELD4>
           <FIELD5></FIELD5>
    </DATA_1>]]></Payload>
           </Packet>
           <Packet>
                 <PacketInfo packetType="data">
                        <PacketId>2</PacketId>
                        <Action></Action>
                        <Manifest></Manifest>
                 </PacketInfo>
                 <Payload><![CDATA[<DATA_2 language="en">
         <FIELD1></FIELD1>
            <FIELD2></FIELD2>
            <FIELD3></FIELD3>
            <FIELD4></FIELD4>
            <FIELD5></FIELD5>
    </DATA_2>]]></Payload>
           </Packet>
    </Envelope>
    As We see Above, There are 2 Nodes named "Packet" at the Same level.
    So When I try to create my datatype in XI based on this XML, XI wont allow to create 2 nodes with same names at the same level.
    We asked the vendor to change the name of the second Packet to Packet_1, they told they cant change it.
    Is there a way in XI to handle this issue??. ie to create 2 nodes with the same name at the same level??
    Thanks,
    Harsh

    Hi,
    Thats's funy, web service is exposed by PI... but it's the thirdparty (client of our web service server) who imposes their choice for structure !! Inversed world.
    Either in Data Type, you define the "Packet" node with an occurence 0..N (or at least 0..2). That will allow you to have the 2 desired nodes by your third-party !
    Or... as your third-party does not want to chance something in their side, that means they probably already have such a web service and so a WSDL file or an XSD of this structure... So ask to them to provide you this WSDL, and you, you will use it as an External Def.
    regards.
    mickael

  • How to modify the xml file

    Hi
    i am able to parse and modify the xml using DOM parser
    after ever modification I am using the below code to write in the file
    org.apache.xml.serialize.OutputFormat format = new org.apache.xml.serialize.OutputFormat(doc);
              format.setIndenting(true);
              org.apache.xml.serialize.XMLSerializer output = new org.apache.xml.serialize.XMLSerializer(new FileOutputStream(xmlFile), format);
              output.serialize(doc);
    using the above code I am overwriting the entire xmlFile
    is there an function that change only the required node the xml that change should me reflected in to the xml file
    thanks in advance

    YoungWinston wrote:
    chi8088 wrote:
    is there an function that change only the required node the xml that change should me reflected in to the xml fileI'm pretty sure there is, but I'm afraid I'm not a DOM expert.No, there is not. An XML file is really at its heart just a text file, and just like you can't simply write a change in the middle of a text file* but rather have to re-write out the entire contents, the same is true for an XML file.
    * unless you use a RandomAccessFile, and know the exact position to seek, and the change doesn't cause the rest of the contents to shift, such as by adding more content or removing some. All of which are very restrictive conditions.

  • How do I install Adobe Premiere Elements when I get this error message...?

    I have bought the DVD bundle of Adobe Premiere Elements and Photoshop. They both come on a single DVD. When I attemp to install Premiere I get the error message... "This installation package is not supported by this processor type. Contact your product vendor".
    My laptop is an Acer Aspire 5536, AMD Athlon, 64 x 2 dual-core, 2.1 GHz. I bought it in 2009 and it runs with Vista.
    Is my laptop too old or not powerfull enough? Or is there a problem with Vista? Please help.

    johnfallan61982
    Your problem with the Premiere Elements 11 download blows the following question away, but I will ask it anyway.
    If you purchased the bundled Photoshop Elements 10 Premiere Elements 10, how many discs did you receive. It should have been five. And, with Windows Vista 32 bit and Premiere Elements 10 in the equation, you should have been using the disc labelled 1 of 5. Was all of that the case?
    What service pack do you have for your Windows Vista 32 bit? And, do you know if your laptop's processor has SSE2 support?
    ATR

  • How can I update my itunes when I keep getting an error message saying the network path is not available

    I am trying to update my itunes  to 11.0.1, I can download it but when I install I keep getting an error message that states:    the feature you are trying to use is on a network resource that is unavailable. Click ok to try again or enter an altenate path to a folder containing the installation packagr itunes64.msi* in the box below.  use source: C:\Users\owner\AppData\Local\Apple\Apple Software Update\    
    Nothing helps? what do I need to do?

    The servers are getting slammed by millions of people wanting to upgrade..   just give it some time, and soon enough you'll have your upgrade.

  • How to Modify Server.xml and web.xml inTomcat

    Hii
    i am very new to tomcat..and using servlets..so plx tell me hw i can modify the server.xml and web.xml....
    if my installables are in c:\program files\apache group\tomcat4.1
    ok...i have my servlets file in c:\program files\apache group\tomcat4.1\webapps\ap1\WEB-INF\classes..so plz advice me on modifying the server.xml and web.xml....also tell me how and what we do in mapping
    Plz tell me soon...
    thanking u in advance.
    rahul
    Take care.:)

    for web.xml you need something like this, i took this from the web.xml under the examples directory in tomcat:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>
    servletToJsp
    </servlet-name>
    <servlet-class>
    servletToJsp
    </servlet-class>
    </servlet>
    <servlet>
    <servlet-name>
    CompressionFilterTestServlet
    </servlet-name>
    <servlet-class>
    compressionFilters.CompressionFilterTestServlet
    </servlet-class>
    </servlet>
    </web-app>
    basically you need to map the servlet with a class, for servlet-name call it whatever you like, you'll be using this name in the url to access you servlet, for the class give it the name of the class, java complied class, that's it.
    server.xml is used to configure tomcat.

  • How to modify an XML values using XSLT and Java

    Hi Friends,
    I wish to modify a simple xml to another xml using XSLT, please let me know what are the things i need to know to convert the XML to another XML.
    If somebody can give a sample code, it will be great...
    I wish to do the following sample conversion of XML
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <ROOT>
    <NAME>TEST1</NAME>
    </ROOT>so that the results look like below....
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <ROOT>
    <NAME>TEST2</NAME>
    </ROOT>Notice TEST1 is replaced with TEST2 in the 2nd XML, I wish to get that result...please help.
    Thanks and Regards,
    JG

    Thanks for your nice reply... do you have a sample code...

  • How to modify web.xml init parameters?

    Hi all!
    I need to modify my application's init parameters on the fly.
    I think that if i can get those parameter through FacesContext, then i should can set them too.
    Anybody knows if it is possible ou how to do it?
    Thanks,
    Cezar

    Hi all!
    I need to modify my application's init parameters on the fly.
    I think that if i can get those parameter through FacesContext, then i should can set them too.
    Anybody knows if it is possible ou how to do it?
    Thanks,
    Cezar

  • How to modify Source system in DS

    Folks,
    I have a Data Source with old Source System for one of my InfoObject. I need to load the new master Data for this InfoObject. But I am unable to change the Old source system to new source system as the Pencil is diabled?
    Do I need to reinstall the InfoObject from BI content and do this from scratch..??
    Any Help please..
    Thank You!

    You cannot change source system directly this way.
    Depending on what is your situation there are 2 workarounds:
    Case 1: you want to keep mapping of your existing source system and also want to load from the new system. Follow these steps:
    1. Right Click on InfoSource and selectassign data source
    2. Select the new source system (press F4 for options)
    3. Select the datasource
    4. Next in the transfer rules screen do the mapping and activate.
    Case 2: You don't want to load from the new system without making any change to the transfer rules (and update rules if any). Follow these steps:
    1. In SM59 change your old system RFC connection to point to the new system.
    2. Then right click the source system and perform a check/restore. This will update partner profiles for the new system.
    3. Replicate the datasource and activate the transfer rules.
    4. Request your BASIS team to run program for BDLS that changes the system pointer.
    You dont have to reinstall anything from business content in any case

  • How to modify build.xml ant to invoke a static init method when building?

    Hello,
    I´d like to make it as such that when I select to build and clean project in netbeans it calls a specific static init method in one of the project classes (which actually generates the database file). //for that purpose that code is only needed there. Is it possible?

    hi.. please help me with this problem...
    i need to execute tomcat server using my ant build file... but how can i do that if the tomcat server is located in other PC... i tried the exec task, but it seems to be not enough... the server doesn't run on the other pc but my it seems fine on my console.
    by the way, here's my code...
    <target name="run_tomcat">
    <exec dir="${src.dir}" executable="cmd">
    <arg line="/c startup.bat" />
    </exec>
    <echo message="tomcat successfully running!!!"/>
    </target>
    my src.dir has value in the properties file which contains the mapped directory. please tell me.. is it really possible to run a program in other PC using my build file in my PC...
    please....please....please....please.... heeeelllpppp!!!!
    tnx a lot!!!!

  • Just downloaded Numbers spreadsheet... I entered a simple "if" statement...If(c2=0,9,7) just to see how it works.... But I get an error message "Argument 1 of if expects a Boolean but found "c2=0....This if statement works fine in Excel

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

    Just downloaded the Apple Numbers spreadsheet app... I entered this simple 'if' statement to see how it works.... "if(c2=0,9,7)...
    I got an error message.. "Argument 1 of if statement expects a Boolean but found "c2=0".
    This if statement works fine in Excel.....What am I doing wrong ????

  • How come every time I close the app, I get this error message: Adobe QT32 Server CC 2014.2 has stopped working

    I have the error message box saved as a PDF, but can't post it here.  Anyways, if anyone has any idea how to stop this from happening, I would greatly appreciate.  [email protected]
    Thank you!

    I'm having the same problem on Windows 8.1 with the latest version of PP CC. I seem to only have this problem since the last update, although I don't necessarily edit every day. The problem mostly occurs when I close a project and exit PP, but I have had it a couple of times while the program is open.
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: Adobe QT32 Server.exe
      Application Version: 8.2.0.65
      Application Timestamp: 5486d9b1
      Fault Module Name: QuickTime.qts_unloaded
      Fault Module Version: 7.76.80.95
      Fault Module Timestamp: 542dbdf4
      Exception Code: c0000005
      Exception Offset: 0005ccf9
      OS Version: 6.3.9600.2.0.0.256.48
      Locale ID: 1033
      Additional Information 1: 5861
      Additional Information 2: 5861822e1919d7c014bbb064c64908b2
      Additional Information 3: a10f
      Additional Information 4: a10ff7d2bb2516fdc753f9c34fc3b069

Maybe you are looking for

  • Problem with flash pro 8

    I HAVE A macromedia flash 8 pro, and i have only  ActionScript 2 and  ActionScript 1 but no  ActionScript 3, and i need to  ActionScript 3 to project what to do

  • Transport documents - Many items in FI documents

    Hi experts: We are implementing transport management module but we have many items in FI documents. Then, we modify table TTYPV with the following entry: MKPF      BSEG          PAOBJNR Then, the FI line item deletes the paobjnr but we can't get to r

  • Total records in IT0000 company code wise - SE16N

    Hello All, I need to check the total number of records in IT0000 for employees belonging to a particular company codes or personnel area. But there shouldn't be any duplicate entry for a personnel number in the total records. In SE16N I am able to ge

  • On websites like Flickr the pages are not now forming like they should, I am just getting lists.

    Something has changed the way Firfox is working, on Flickr I get lists instead of the usual images, and on hot mail I cannot delete emails. (I click on delete and nothing happens) I have recently removed some files and cookies.

  • Old. Version on airport utility with Lion

    New Lion upgrade had airport utility 5.5.1 New time capsule required 5.5.3 It was not possible to run update Had to remove and download to get it going À bug?