Options

Retrieving content using url in navision

rozemarozema Member Posts: 15
Hello,

I need to import data (jpg) in Navision.
This is not a problem but.....
..... I have to get the data using a url. (The data is stored on a public site, I only have the availability of the url).

I assume I have to use Automation controls / perhaps XML. Tried a lot, but I cannot make it work.

Anyone?

Comments

  • Options
    jhoekjhoek Member Posts: 216
    Did you try with the IXMLHTTPRequest interface in MSXML?
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • Options
    rozemarozema Member Posts: 15
    Jan,

    Could you perhaps be a little more specific? I tried the MS XMLHTTP40 Aut. Control. - could not make it work. But then again - I do not use this on a daily basis.....

    Do you have an example perhaps?

    Thanks, Peter
  • Options
    jhoekjhoek Member Posts: 216
    I'm afraid I don't have an example, but nor can I think of a reason why it wouldn't work. Did you receive an error message? Did the request not return any data, or in a form that was not useful to you?
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • Options
    rvduurenrvduuren Member Posts: 92
    Hello,

    I'm not sure if you mean something like this, it works for me..
    -------------------------------------------------------------
    mxh - Automation - 'Microsoft XML, v4.0'.XMLHTTP40
    Url - Text - 1000
    is - InStream
    os - OutStream
    var - Variant	
    ci - Record - Company Information	
    mbt - BigText
    -------------------------------------------------------------
    CREATE(mxh);
    
    mxh.open('GET','http://internet.ls-la.net/pictures/images/Computer/Microsoft-XP-sucks.jpg',FALSE);
    Mxh.send(var);
    var := Mxh.responseStream;
    CLEAR(mxh);
    
    is := var;
    mbt.READ(is);
    
    ci.Picture.CREATEOUTSTREAM(os);
    mbt.WRITE(os);
    ci.Picture.EXPORT('c:\picture.jpeg',FALSE);
    

    Let me know if this is what you mean..
    Met vriendelijke groet, best regards,

    Rvduuren
  • Options
    rozemarozema Member Posts: 15
    =D> =D> =D> FB!!!!! =D> =D> =D>

    Thanks.
  • Options
    JohnieGJohnieG Member Posts: 56
    Hi to all,
    I am having almost the same problem. I want to download a XML file from a specified URL and save it to HDD. Is there an easiest alternative solution or I have to follow a scenario like this one?

    Thank you in advance...
    Always Look On The Bright Side Of Life...
Sign In or Register to comment.