XML HTTP POST Data Send Issue

XypherXypher Member Posts: 297
So here's my issue,

I am wanting to place 1024+ data into an automation acting as a variable, much like XMLDom.load(blahStream); XMLHTTP.Send(XMLDom). But the XML data I want to send has multiple Root nodes.

So my question is, "How might I go about placing two XML documents in a single 'packet' so I can use XMLHTTP/WinHTTP(whatever).Send(My 1024+ Multi-XML Data); ?"

[Oh and connecting HTTPS is a requirement, so I would like to not stray far from XMLHttp or WinHTTP Automations.]

Answers

  • ara3nara3n Member Posts: 9,256
    XML by definition cannot have multiple roots. I suggest to create a valid XML file.

    Plus xmldom.load won't load an xml file with multiple roots.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • XypherXypher Member Posts: 297
    Yes I absolutely understand this.

    The issue I am experiencing is loading data from two sources, whether it is XML or not, and sending it as one.

    The webservice that I am posting to requires 2 XML documents in a single packet. So I need to find a way to transfer data from two files, load it into some kind of external variable, due to the 1024 communication buffer, and send it.

    In other words, I would like to send fragments (of 1024 bytes) of data to an external variable to be used as a whole in sending to an automation.
  • kinekine Member Posts: 12,562
    For me it seems like you need to open "Stream" and write the two files into this one stream... But this is just the "logic", how to do it in your specific case I do not know...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Is this for UPS?

    UPS requires a XML file with 2 root's.

    We have solved it but sell it as a commercial product. Please contact me for more information.
  • XypherXypher Member Posts: 297
    Is this for UPS?

    UPS requires a XML file with 2 root's.

    We have solved it but sell it as a commercial product. Please contact me for more information.


    Yes it is for UPS. As far as I can tell the company I work for wouldn't want to spend any money on something like this.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    That is to bad because the time you spend is money too.
  • XypherXypher Member Posts: 297
    That is to bad because the time you spend is money too.

    This is true, but we're not in a huge huge rush. We are still using UPS Worldship and would "like" to convert to something that works more for us.

    So I'm just gonna write up some easy VB6 dll that will act as a middle man.
  • LibertyMountainLibertyMountain Member Posts: 94
    Xypher, did you ever solve this? I am countering the EXACT same issue.
Sign In or Register to comment.