Dynamics NAV XMLport Generator v1.3

2»

Comments

  • Benno67Benno67 Posts: 39Member
    Hi there,
    I should have found the generator before!, it will save indeed time-consuming debugging.

    Question : I did try it onto this webservice: http://www.florecom.nl/LinkClick.aspx?f ... uage=nl-NL or more specific the XSD : http://schemas.florecom.org/xml/data/dr ... es_0p5.xsd
    The tool is able to read the xsd, and understand the definitions in it, but when I try to generate the “imagerequest” root element, it looks like the generator is still processing all the elements in the XSD (that looks like very huge), and it crashes.
    I contacted Florecom and they suggested to “flatten” the WSDL with VS 2011 tools.
    My idea would be : The generator should be able to isolate the requested root element? No need to do it by hand?
    Any sugestions?

    Benno
  • AdministratorAdministrator Posts: 2,391Member, Moderator, Administrator
    Dynamics NAV XMLport Generator v1.3
    Automatically create a XMLport from a XML schema.

    Simply load the schema, give an object number, select the root node, and click "Generate". Finished! The rest is small business.

    Features:
    - Automatic object generation
    - Works with complex schemas
    - Load included schemas
    - Root node selection

    V1.3.0.2:
    - Fixed a crash with long node names
    - Fixed an exception in the schema parser
    - Fixed "Unable to cast object" error

    http://www.mibuso.com/dlinfo.asp?FileID=910

    Discuss this download here.
  • SilverXSilverX Posts: 123Member
    Hi Benno,

    I have successfully tested with the new version. Please give it a try.

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • David_SingletonDavid_Singleton Posts: 5,453Member
    Great tool, it sames a ton of work.

    I also had some issues with complex Schemas in the earlier version, where it missed some elements. Its great to see you updating this.

    :thumbsup:
    David Singleton
  • Benno67Benno67 Posts: 39Member
    Hi Carsten,
    Good job on version 1.3. I had some problems with recursive definitions in a provider xsd, but with the new version they are solved :D .
    Thanks
    Benno
  • SilverXSilverX Posts: 123Member
    Thx. Good to hear that your problems are gone (for now) :) Please let me know if you find any other issues.

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • David_SingletonDavid_Singleton Posts: 5,453Member
    Benno67 wrote:
    Hi Carsten,
    Good job on version 1.3. I had some problems with recursive definitions in a provider xsd, but with the new version they are solved :D .
    Thanks
    Benno


    I think this was the same problem I had. I ended out just manually fixing those elements. But great to know for next time that it can handle this.

    Great work.
    David Singleton
  • Alex_ChowAlex_Chow Posts: 5,063Member
    When I select the Schema, the Root Element does not come up with anything?

    When I click Generate, it give me the error:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
       at NavXmlPortGen.MainForm.generateBt_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    ----------------------------------------
    NavXmlPortGen
        Assembly Version: 1.3.0.2
        Win32 Version: 1.3.0.2
        CodeBase: file:///C:/temp/XMLportgenerator/NavXmlPortGen.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.5458 (Win7SP1GDR.050727-5400)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    
  • SilverXSilverX Posts: 123Member
    Alex,

    Please send the Schema by email for Review (about Box).

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • Alex_ChowAlex_Chow Posts: 5,063Member
    SilverX wrote:
    Alex,

    Please send the Schema by email for Review (about Box).

    Cheers
    Carsten


    Sent! Thanks for looking into this.
  • Miklos_HollenderMiklos_Hollender Posts: 1,512Member
    This is a godsend whenever you have to work with an EDIFACT-to-XML interface i.e. typical EDI providers. The D96A schemas used by the big retailers are HUGE and this tool handles them flawlessly. Great job!
  • SilverXSilverX Posts: 123Member
    Hi Miklos,

    thx for this great feedback. Do You attend Directions in September? Maybe we can meet :)

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • Miklos_HollenderMiklos_Hollender Posts: 1,512Member
    No, I am working at the end user side so no budget for that. Where is Directions this year anyway?
  • SilverXSilverX Posts: 123Member
    Where is Directions this year anyway?
    In Vienna :)

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • NokioNokio Posts: 52Member
    Hi,
    in Dynamics AX there is an native XML EDI Interface to import Orders.
    I could generate a report with the XSD Schema.

    When I try to import the created XMLport I get the error message ("Invalid Tag Name") which interrupts the import.

    Do you have an idea?

    Regards
    Nokio



    I found the problem, there were some French Label Captions..
  • CarloMCarloM Posts: 5Member
    Hello,

    I tried your generator for the first time today.
    The XML port generated is not correct.
    I received following XSD file from our partner. I can not generate it from an existing XML.

    Problem is solved now. I selected the wrong root element.
    CMY
  • urpokurpok Posts: 21Member
    I have successfully used this tool earlier, but now i jumped into a definition file that refuses to compile.
    I get message "The node or attribute name 'SubRowRequestOfQuotetionIdentifierUrlText' is invalid for a XMLport (length)"

    xsd can be downloaded from :
    http://www.fkl.fi/verkkolasku/yrityksen ... nvoice.xsd

    Is there something I can do for this, or do I have to create a parser of my own?

    regards, urpok
    "There is no spoon."
    --Matrix

    https://dynamicsuser.net/nav/b/urpo
  • SilverXSilverX Posts: 123Member
    Hi urpok,

    in the config file, there are 2 Settings regarding variable length and node Name length.
    <add key="MaxVariableNameLength" value="30"/>
    	<add key="MaxNodeNameLength" value="40"/>
    
    The Settings represent the maximum length of the node names and variables. With Version 2009 (R2), the limit is 30 afaik but has raised to 80 for Dynamics NAV 2013. It seems that you can use larger names, but the internal check only respects 30 chars.

    If you are a lucky guy and use Dynamics NAV 2013, you can raise the both values in config to 80 and it will work. If you use 2009 R2, you can also raise the numbers, but may have to change them afterwards when importing. It could be, that the node names are simply to long for Dynamics NAV XMLports.

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • urpokurpok Posts: 21Member
    Modifying the config file removed the error message, import to NAV 2013 worked nicely, and even compile went thru.

    Next I have to test if it REALLY works :)

    Thank you very many, SilverX !!!
    "There is no spoon."
    --Matrix

    https://dynamicsuser.net/nav/b/urpo
  • DolshaDolsha Posts: 41Member
    @SilverX Hello.
    When i try import XMLport in Dev Environment i'll have error: "Invalid tag name."
    Then "The import stopped at line 492."
    492 line have only: " }" - close of CODE.
    Can u help me?
  • SilverXSilverX Posts: 123Member
    Hey @Dolsha

    Please send me your XSD and the generated XMLport as PM. I'll have a look.

    Cheers
    Carsten
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • DolshaDolsha Posts: 41Member
    @SilverX don't know how i can PM on mibsuo O_o

    P.S. that link for my .rar archive with xmlport and xsd: https://yadi.sk/d/RXRPOyJh3KMH4v
  • SilverXSilverX Posts: 123Member
    Wow, I have never ever seen XML files with cyrillic node names. I assume this is the issue as the Generator creates an UTF-8 object which cannot be imported into NAV.
    I don't have a proper Codepage configured. Can you please try to convert the resulting text file to your OEM Codepage and try re-Import? I have no additional idea except to use Codepage 850 tags :)
    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
  • DolshaDolsha Posts: 41Member
    How i can convert UTF-8 to OEM 866?
  • DolshaDolsha Posts: 41Member
    I'll use this command in powershell:
    Get-Content -Encoding utf8 'C:\Temp\50013_2.txt' | Out-File -Encoding oem 'C:\Temp\50013_oem.txt'
    

    Successful import object in my NAV, ty
  • John_ReinholdJohn_Reinhold Posts: 14Member
    Hi Carsten!

    I'm trying to use your amazing tool to create a XMLport based on several xsd-files. All files are located on my local drive. The main file is located in \schema and the additional files are located in \common. It can now import all the files, but when I hit Generate it just runs and runs. Right now it has been running for more than 30 minutes. Looks like it never completes.

    The files are from the official repository for OIOUBL-schemas: http://rep.oio.dk/ubl/xml/schemas/2.0/ and I'm trying to create XMLport for UBL-OrderResponse-2.0.xsd.

    Is there any way for me to spot why it doesn't complete?

    Otherwise - thanks a bunch for all your effort!

    /John
    Regards,
    John Reinhold
  • SilverXSilverX Posts: 123Member
    Hi John,

    I've spend some time adding status information (level, number of processed nodes, node name) to my internal version. Also added processed nodes to the output area.

    However, I was not able to process the schema, while the internally generated output after 10 minutes seemed to not have any loops in there.

    After that I decided to do the same with the BizTalk Visual Studio addin, importing the schema files and generating an instance (xml) from the xsd.

    After a while (around 8 minutes), I had a look at the generated xml file and it already was 2.5 GB in size. My assumption is, the schema is far to complex, thousands of nested nodes.

    I would suggest to try an easier solution (external, .NET XmlDocument, ...). I promise, even if the generator finishes at some point, probably after hours, you will not be able to edit the xmlPort in NAV.

    BizTalk xml instance is 3.8 GB meanwhile. Canceled the generation.
    Sorry, I would like to have helped you better here, but no chance...

    Cheers
    Carsten


    ==> How To Ask Questions The Smart Way
    This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
2»
Sign In or Register to comment.