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

Similar Messages

  • Two methods with same name but different return type?

    Can I have two methods with same name but different return type in Java? I used to do this in C++ (method overloading or function overloading)
    Here is my code:
    import java.io.*;
    public class Test{
    public static void main(String ar[]){
    try{          
    //I give an invalid file name to throw IO error.
    File file = new File("c:/invalid file name becasue of spaces");
    FileWriter writer = new FileWriter(file ,true);
    writer.write("Test");
    writer.close();     
    } catch (IOException IOe){
         System.out.println("Failure");
    //call first method - displays stack trace on screen
         showerr(NPe);
    //call second method - returns stack trace as string
            String msg = showerr(NPe);
            System.out.println(msg);
    } // end of main
    public static void showerr(Exception e){
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         e.printStackTrace(pw);
         try{
         pw.close();
         sw.close();
         catch (IOException IOe){
         IOe.printStackTrace();     
         String stackTrace = sw.toString();
         System.out.println("Null Ptr\n" +  stackTrace );
    }//end of first showerr
    public static String showerr(Exception e){
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
         e.printStackTrace(pw);
         try{
         pw.close();
         sw.close();
         catch (IOException IOe){
         IOe.printStackTrace();     
         return sw.toString();
    }//end of second showerr
    } // end of class
    [\code]

    Overloading is when you have multiple methods that have the same name and the same return type but take different parameters. See example
    public class Overloader {
         public String buildError(Exception e){
              java.util.Date now = new java.util.Date() ;
              java.text.DateFormat format = java.text.DateFormat.getInstance() ;
              StringBuffer buffer = new StringBuffer() ;
              buffer.append(format.format(now))
                   .append( " : " )
                   .append( e.getClass().getName() )
                   .append( " : " )
                   .append( e.getMessage() ) ;
              return buffer.toString() ;
         public String buildError(String msg){
              java.util.Date now = new java.util.Date() ;
              java.text.DateFormat format = java.text.DateFormat.getInstance() ;
              StringBuffer buffer = new StringBuffer() ;
              buffer.append(format.format(now))
                   .append( " : " )
                   .append( msg ) ;
              return buffer.toString() ;
         public String buildErrors(int errCount){
              java.util.Date now = new java.util.Date() ;
              java.text.DateFormat format = java.text.DateFormat.getInstance() ;
              StringBuffer buffer = new StringBuffer() ;
              buffer.append(format.format(now))
                   .append( " : " )
                   .append( "There have been " )
                   .append( errCount )
                   .append( " errors encountered.")  ;
              return buffer.toString() ;
    }Make sense ???
    Regards,

  • Unable to monitor two databases with same name on two different hosts

    I have got two databases with same name on two different hosts. I added one database to the list of monitored databases. Now If I try to add the other one , I get the message that the database is already being managed.
    Can't we monitor two databases with same name on two different hosts?

    you can... while saving the target,give a different name.. for eg target-2

  • How to separate two contact with same name

    Hi, anyone knows how to separate two contacts with same name in Contacts?  Actually they are two persons from two gmail contacts with same name but different contact numbers, different emails....etc, but Contacts assume they are same person and merge them as one!

    FG,
    In Lion, you have the File > Duplicate option. You will then have two copies of your document open, and the one on top will have the temporary filename "OriginalFileName copy", and your next responsibility is to File > Save (or Command-S) and rename the duplicate. At this point, you edit the copy's name, to perhaps ...copy 1, or whatever you wish. The document you had open when you initiated the File > Duplicate will still be there on your screen, waiting for you to Close it or continue editing.
    Jerry

  • How to create two employees with same name as supplier record?

    Dear all,
    We need to create a supplier record for an employee so that we can issue invoice for pretty cash payment. If there are 2 employees with same name, how can we create supplier records for these 2 employees? The system does not allow duplicate supplier name.
    Please advise.
    Regards,
    HY

    Hello,
    In R12 it is possible to create 2 employee with same name but different employee number.
    And also possible to create these 2 employees as suppliers in Payables.
    HTH,
    Vik

  • Bootdisk two images with same name n time

    hello,
    I have copied new image on 6509 , s2t54-adventerprisek9-mz.SPA.151-1.SY1.bin but when i do show bootdisk: it shows 2 images with same name .
    6509#show bootdisk:
    -#- --length-- -----date/time------ path
    1     33554432 Apr 19 2013 03:22:44 +00:00 sea_console.dat
    2     99168744 Apr 19 2013 03:28:42 +00:00 s2t54-adventerprisek9-mz.SPA.151-1.SY.bin
    3            0 Apr 19 2013 15:44:26 +00:00 call-home
    4         7209 Jun 11 2013 15:02:10 +00:00 startup-config.converted_vs-20130611-150121
    5         7126 Jun 11 2013 15:37:38 +00:00 startup-config.converted_vs-20130611-153738
    6     33554432 Apr 19 2013 03:46:50 +00:00 sea_log.dat
    7     28856320 Apr 19 2013 04:04:56 +00:00 c6500-fpd-pkg.151-1.SY.pkg
    8     99763688 Nov 19 2013 10:22:30 +00:00 s2t54-adventerprisek9-mz.SPA.151-1.SY1.bin
    9     99763688 Nov 19 2013 10:22:30 +00:00 s2t54-adventerprisek9-mz.SPA.151-1.SY1.bin
    729382912 bytes available (295174144 bytes used)

    Its kind of cosmetic issue. Verify the same using the command dir bootdisk:
    Thanks & Regards,
    Karthick Murugan
    CCIE#39285

  • Can two iPhones with same name sync with iTunes?

    I've just got a new iPhone 4 and immediately synced it with iTunes, transferring all the data from my old 3Gs including the phone name. This means that I now have two iPhones with the same name(3Gs and 4). What are my chances of keeping my 3Gs as a back-up phone that's still able to sync with my iPhone account or will I have to change to phone's name and install apps from scratch? I'd really appreciate any advice from the experts on this.

    You need to rename one of them. I would suggest that you backup and sync each device after the renaming.

  • Two albums with same name combined into one

    I have two greatest hits albums by different artists. Both albums are called 'greatest hits'. In iTunes on my Mac they appear as two different albums. I've just synched my music from my Mac to my iPhone (iOS8 I think). The albums have been merged into one greatest hits album (artists X songs have been added to artists Y a. How do I stop this?
    On my Mac I've renamed one album 'hits' and then resynched. There are now two albums: Hits by artist Y and Greatest Hits by artist Y (with no album artwork and the songs are actually by artist X).
    Thanks for any helps

    iTunes identifies an album by its name. If there is more than one album with the same name then iTunes will see it as one album. As you have found you have to give them different names.

  • One Artists, Two Albums With Same Name Displaying Together

    I have my itunes setup to show artists in grid view. When I double click on a particular artist and look at the albums, I see two separate albums grouped into one. This artist has two albums named the same; one from 1980 and one from 2003. They are distinctly different albums with the same name. The only way I can separate them is to tack on [2003] to the album title of the newer one. Is there a way to have them with just the name but separated?

    iTunes identifies an album by its name. If there is more than one album with the same name then iTunes will see it as one album. As you have found you have to give them different names.

  • SCCM 2012 -two machines with same name

    Hi,
    In SCCM 2012, when I do a search for a computer, the results bring up two machines with the same name and mac address.
    Why is the machines in SCCM 2012 twice?
    How do I resolve it?
    Thanks,
    hm087ster

    You should have one machine mark as obsolete.
    A record that is marked obsolete typically was superseded by a newer record for the same client. The newer record becomes the client's
    current record, and the older record becomes obsolete.
    https://technet.microsoft.com/en-us/library/bb633138.aspx
    Benoit Lecours | Blog: System Center Dudes

  • Two Albums with Same Name

    What is the best way to differentiate between two albums that have the same name? When I sort my Library by Album, the songs from albums with the same name are mixed together. I tried setting a "Grouping" but that doesn't seem to help.

    although not a perfect solution, you could use the disk number field. Highlight your album, right-click, choose "Get Info". Put each album as a different disk number and you'll be sorted.
    Normally this is for double albums where you'd have "1 of 2" and "2 of 2". However you can put in much larger numbers. I've been to 21, but I'd assume it goes much higher.

  • Two methods with same name?

    hello,
    When a class has two or more methods with the same name but each method
    accepts unique parameters ..... what is this called? Overloading?
    Thanks,
    jd
    public class Test{
         public Test(){
              String bubby = sayHI("Jason");
              System.out.println(bubby);
         public String sayHI(){
              return "hi";
         public String sayHI(String name){
              return "hi " + name;
         public static void main(String[] args){
              getPrefs gp = new getPrefs();

    is this also called overloading when your doing it with the constructor?Yes, unequivocally.
    8.4.7 Overloading
    If two methods of a class (whether both declared in the same class, or both inherited by a class, or one declared and one inherited) have the same name but different signatures, then the method name is said to be overloaded. This fact causes no difficulty and never of itself results in a compile-time error. There is no required relationship between the return types or between the throws clauses of two methods with the same name but different signatures.
    8.8.6 Constructor Overloading
    Overloading of constructors is identical in behavior to overloading of methods. The overloading is resolved at compile time by each class instance creation expression (�15.9).
    QED, &#167;

  • Two computers with same name

    I have a desktop and a laptop with the same name. When I want to synchronize my treo I can not figure out which is which. Is there a way to change the name of a computer?

    Inside System Preferences click Sharing. At the top of the Sharing window is Computer Name. Click Edit and type the new computer name.
    PowerBook G4   Mac OS X (10.4.8)   MacBook Pro

  • Two Instances With Same Name

    Hi Everyone,
    Today i was posed with a new question/issue. We have a development and production environment with two different names currently. My supervisor will like me to recreate development with the same instance name as production. Is this possible and feasible to do? We are moving our system from develpment to production, and we use web services to direct our application to the database, and he would like the same instance name used in both web services. We will be running both systems together for a while, until the kinks are worked out.
    Any help will be appreciated.

    zephyr223 wrote:
    thanks again SB. I understand what you are doing in your example. Say for example, i would keep my current setup as it for now.
    one sid = dev
    another sid = test and dev is the sid in the connection string. Can i keep the instance name of test but in the tnsnames file, can i have the service_name = dev. Is that possible????Absolutely. See this:
    FOOBAR =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ORCL)In the above, the application would issue a connect to FOOBAR,
    which is resolved by the TNS layer as a request to (SERVICE_NAME=ORCL),
    which will be handled by a listener using (PORT=1521)
    on (HOST=myhost).
    FOOBAR is not and never has been the name of the database or instance. The confusion comes because by convention we would have used the same value in SERVICE_NAME and the name of the entry:
    ORCL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ORCL)This aliasing of the connect string make it possible to do a couple of things, depending on your needs. The first, which is what it appears you need, is to have different clients use the same alias (so the client doesn't have to know) for different instances. So a client needing the production database would have a tnsnames entry like:
    MYDB =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = PRODDB)and a client needing the test database would have
    MYDB =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = TESTDB)both clients would issue a connect to MYDB, and the tnsnames entry controls what database that resolves to.
    But I'd take it one step further with the application code. I'd NEVER hard-code that tns-alias name anyway. For the very reason you've run into. It's too much work to change it if need be. Run-time values like that should be in some sort of start-up configuration file, much like oracle's own init.ora file. Even when I was writing COBOL programs on IBM mainframes, I had a fundamental rule that no run-time values would be hard-coded. They were all put into a simple text parameter file.
    Ok, all that said, here's the other thing the nature of the tnsnames.ora file lets you do:
    BILL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = PRODDB)
    CAROL =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = PRODDB)
    TED =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = PRODDB)
    ALICE =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = PRODDB)With the above, connection requests to BILL, CAROL, TED, or ALICE all resovle to the same database. Off-hand I can't think of how this might be useful, except perhaps to give separate aliases for either DEDICATED or SHARED connections:
    FUBAR_DED =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = PRODDB)
    FUBAR_SHARED =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = SHARED)
          (SERVICE_NAME = PRODDB)Hope this clarifies your understanding of how tnsnames resolution works.
    Edited by: EdStevens on Dec 12, 2009 9:07 AM

  • Ipod sort by album - two albums with same name

    Is this a bug? When I am browsing my music via "Albums" on my iPod, any duplicate album titles are shown as one album. For example, "Let it Be" by the Beatles appears, but not "Let it Be" by the Replacements. When I click into it, all the songs from both albums are there, but they are staggered. How can I make these appear as two separate albums in this view?

    I find that the whole sorting capabilities of iTunes and ergo iPod are sorely lacking...
    You'll also find that you can have the SAME album listed twice if your id3 tags have one or more spaces after the album name, but there's no indication that there are superfluous spaces until you go into the errant file and see what the title actually is...
    ie: Let It Be
    Let It Be <space><space><space><space><space> [I'm not sure why these occur, but they do...]
    Here's what I'd like to see:
    Tracks listed by Artist; Year; Album; Disc #; Song #, no matter which column you pick...
    What I mean by that is if I click on Artist, I'd like to see the albums in order of release and songs in order of appearance on CD. If there's more than one CD in a set, they should appear in numerical order...
    Further to this, if I click on Year, the artists should appear alphabetically, the Disc # and Song # appear numerically
    For the life of me I can't figure out why this is so hard for software developers to understand...
    ok, I'm done...
    Dave

Maybe you are looking for