Options

Different Between 2009 and 2013 XML Port

yukonyukon Member Posts: 361
edited 2014-08-10 in NAV Three Tier
Hi Team,

What is a different between 2009 R2 XML Port and 2013 XML Port? Because of 2009 xml port result is different with 2013 result when i used same xml port. But 2009 R2 result is correct. So i want to know difference between 2009 and 2013. Is it any documentation? :?: :?:

Best Regards,
Yukon
Make Simple & Easy

Comments

  • Options
    ara3nara3n Member Posts: 9,255
    Can you be more specific what difference you are seeing?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    yukonyukon Member Posts: 361
    edited 2012-10-31
    Hi ara3n,

    Thanks for your reply. What i saw it
    1. Node Name is changed when we use "Source Type" is table.
    2. Attribute property "Occurrence" is not working.

    CU
    OBJECT Codeunit 50000 CU50000
    {
      OBJECT-PROPERTIES
      {
        Date=30/10/12;
        Time=11:07:30 AM;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
        OnRun=VAR
                myInstream@1000000002 : OutStream;
                mySetupFile@1000000001 : File;
                XMLPORT@1000000000 : XMLport 50001;
              BEGIN
                mySetupFile.CREATE('c:\t1.xml');
                mySetupFile.CREATEOUTSTREAM(myInstream);
                XMLPORT.SETDESTINATION(myInstream);
                XMLPORT.EXPORT;
                mySetupFile.CLOSE;
              END;
    
      }
      CODE
      {
    
        BEGIN
        END.
      }
    }
    

    XML Port
    OBJECT XMLport 50001 XML50001
    {
      OBJECT-PROPERTIES
      {
        Date=30/10/12;
        Time=11:08:27 AM;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
        Encoding=UTF-8;
      }
      ELEMENTS
      {
        { [{8EB4668E-3934-4638-B8EE-48452510B7DF}];  ;rsm:Invoice         ;Element ;Table   ;
                                                      SourceTable=Table36;
                                                      SourceTableView=SORTING(Field1,Field3)
                                                                      WHERE(Field1=CONST(1),
                                                                            Field3=CONST(6004)) }
    
        { [{9CF2365C-55DB-4D7D-B0AE-3B3595E82566}];1 ;xmlns:xsd           ;Attribute;Text   ;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xmlns:xsd" := 'http://www.w3.org/2001/XMLSchema';
                                                                                   END;
                                                                                    }
    
        { [{710082F3-2B2D-4A00-81E2-11D8B634D793}];1 ;xmlns:rsm           ;Attribute;Text   ;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xmlns:rsm" := 'http://www.iata.org/';
                                                                                   END;
                                                                                    }
    
        { [{5404A995-193C-4144-BC25-57E1FB6E5BF8}];1 ;xmlns:ccts          ;Attribute;Text   ;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xmlns:ccts" := 'urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2';
                                                                                   END;
                                                                                    }
    
        { [{C78299BD-10BC-4164-BBA5-8B5D4FDEB325}];1 ;xmlns:udt           ;Attribute;Text   ;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xmlns:udt" := 'urn:un:unece:uncefact:data:standard:UnqualifiedDataType:2';
                                                                                   END;
                                                                                    }
    
        { [{63CA93E8-879A-4172-84A1-4A0645BA47B3}];1 ;xmlns:qdt           ;Attribute;Text   ;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xmlns:qdt" := 'urn:un:unece:uncefact:data:standard:QualifiedDataType:2';
                                                                                   END;
                                                                                    }
    
        { [{2B97C479-7AFC-4CB2-95FD-4BB55EF18D03}];1 ;xmlns:ram           ;Attribute;Text   ;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xmlns:ram" := 'urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:2';
                                                                                   END;
                                                                                    }
    
        { [{45E333DC-4666-49D3-BF7D-54E2798F5581}];1 ;xmlns:xsi           ;Attribute;Text   ;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xmlns:xsi" := 'http://www.w3.org/2001/XMLSchema-instance';
                                                                                   END;
                                                                                    }
    
        { [{EBE2323F-6DF3-4A2E-A09A-F9795D6FC1E4}];1 ;xsi:schemaLocation  ;Attribute;Text   ;
                                                      DataType=Code;
                                                      Export::OnBeforePassVariable=BEGIN
                                                                                     "xsi:schemaLocation" := 'http://www.iata.org/ Invoice_2p0.xsd';
                                                                                   END;
                                                                                    }
    
        { [{9905E50D-BA57-4062-9A2D-BD28C4C733C3}];1 ;rsm:HeaderExchangedDocument;Element;Text }
    
        { [{FA617DF5-DF08-48C9-B3EE-2D652C3F8858}];2 ;ram:ID              ;Element ;Text     }
    
        { [{D32DDBD0-0717-4646-9A86-EA235764C863}];3 ;TypeCode            ;Attribute;Text   ;
                                                      VariableName=<ram:TypeCode>;
                                                      Occurrence=Optional }
    
        { [{482C598E-3076-4176-8701-E9F307D8D69E}];2 ;ram:IssueDateTime   ;Element ;Text     }
    
        { [{4FFAC1AA-F6EB-4FF5-B674-039A2AD2CF01}];2 ;ram:CopyIndicator   ;Element ;Text     }
    
        { [{36048F79-2F29-4CE2-8589-51B1D21469A6}];2 ;ram:CustomsID       ;Element ;Text     }
    
        { [{7FE432DE-E5C5-4E11-B458-32D8CAA3110A}];2 ;ram:HeaderInformation;Element;Text     }
    
        { [{6949D237-E6FC-414D-9E05-0D085C64A1A2}];2 ;ram:SummaryInformation;Element;Text    }
    
      }
      EVENTS
      {
      }
      REQUESTPAGE
      {
        PROPERTIES
        {
        }
        CONTROLS
        {
        }
      }
      CODE
      {
    
        BEGIN
        END.
      }
    }
    
    2013 XML Result

    2009 XML Result


    That's why i want to know different between 2009 and 2013.

    Last Edit : 31/10/2012 - Upload Image!

    Regards,
    Yukon
    Make Simple & Easy
  • Options
    kinekine Member Posts: 12,562
    I cannot read the images... they are too small.. or it is just my problem?...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    yukonyukon Member Posts: 361
    Hi All,

    Sorry for my image size! I upload again.


    regards,
    Yukon
    Make Simple & Easy
  • Options
    ara3nara3n Member Posts: 9,255
    Have you tried to run it on RTC in 2009?

    There is difference between RTC and classic client. Make sure it runs on RTC in 2009 first.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    yukonyukon Member Posts: 361
    Hi ara3n
    ara3n wrote:
    Have you tried to run it on RTC in 2009?
    There is difference between RTC and classic client. Make sure it runs on RTC in 2009 first.

    Yeah! I run from 2009 Classic. It's work fine. When i run on 2009 RTC totally don't have result. Because of
    node name is "rsm:xxx". If i removed "rsm:" it work again. Now i :? ready. How may i get 2009 xml port result (export from Classic) on 2013. :?: :?: :?:

    Best Regards,
    Yukon
    Make Simple & Easy
  • Options
    yukonyukon Member Posts: 361
    Hi Team,
    yukon wrote:
    Yeah! I run from 2009 Classic. It's work fine. When i run on 2009 RTC totally don't have result. Because of node name is "rsm:xxx". If i removed "rsm:" it work again. Now i :? ready. How may i get 2009 xml port result (export from Classic) on 2013.

    Above error i solved it. I changed "UseDefaultNamespace" to "Yes". But defaultNamespace is shown if i use different prefix in another node. How may i remove it? :?: :?:

    Sample XML Format


    NAV XML Format


    NAV XML Port


    Regards,
    Yukon
    Make Simple & Easy
  • Options
    ScottJonesScottJones Member Posts: 44
    Hi,

    I am having same issue trying to remove default prefix.

    I managed to create a SOAP packet using XMLPort in NAV2009 to call Navsion Web Services running on NAV2013R2

    I now need to upgrade this XMLport to work with NAV2013R2

    This is a sample packet I captured that I need to build using XMLPort in NAV2013R2
    <?xml version="1.0"?>
    -<Soap:Envelope xmlns:Soap="http://schemas.xmlsoap.org/soap/envelope/">
    <Soap:Body>
    <ReadMultiple xmlns="urn:microsoft-dynamics-schemas/page/svccustomer">
    <filter><Field>Country_Region_Code</Field><Criteria>GB</Criteria></filter><filter><Field>Location_Code</Field><Criteria>RED|BLUE</Criteria></filter>
    </ReadMultiple>
    </Soap:Body>
    </Soap:Envelope>
    

    The prefix 'Soap:' is not required for the ReadMultiple verb section. How do I remove the prefix 'Soap:' I can change it to something different like XYZ: but how do I make it use a blank prefix??

    Any help with XMLPorts in NAV2013R2 would be appreciated!
  • Options
    ara3nara3n Member Posts: 9,255
    You need to remove the namespaces before processing them in NAV. There is example function if you search for it on mibuso on how to remove namespaces before processing xml file with xmlport.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    ScottJonesScottJones Member Posts: 44
    Hi Rashed,

    I'm not trying to import, i'm trying to export an XML document that looks exactly like the above sample soap packet.

    With prefix's of Soap: at start of packet and the <ReadMultiple> section no prefix's. I don't seem to be able to find a way to clear the prefix Soap: once it has been set as a default see below
    <?xml version="1.0" encoding="UTF-8"?>
    -<Soap:Envelop xmlns:Soap="http://schemas.xmlsoap.org/soap/envelope/">
      <Soap:Body>
        <Soap:FncSubmitItems xmlns="urn:microsoft-dynamics-schemas/codeunit/svcST3IntegrationWebService">
          <Soap:pXML_Request>
            <Soap:Items xmlns="urn:microsoft-dynamics-nav/xmlports/x70006"><Soap:Item><Soap:Code>1000</Soap:Code><Soap:Description>Bicycle with a very long description
                  </Soap:Description><Soap:UnitPrice>4,000.00</Soap:UnitPrice><Soap:UnitListPrice>0.00</Soap:UnitListPrice><Soap:Blocked>No</Soap:Blocked></Soap:Item>
                 <Soap:Item><Soap:Code>1001</Soap:Code><Soap:Description>Touring Bicycle</Soap:Description><Soap:UnitPrice>4,000.00</Soap:UnitPrice>
    

    Cheers

    Scott
  • Options
    Prajeesh_NairPrajeesh_Nair Member Posts: 70
    Hi yukon,

    I have the same issue.

    I changed "UseDefaultNamespace" to "Yes". But defaultNamespace is shown if i use different prefix in another node. How may i remove it? :?: :?:

    It inserts the default name space, which i don't need. if UseDefaultNamespace is set to no, then the soapenv is missing from "soapenv:Envelope"

    Please help me. Any one
Sign In or Register to comment.