Publishing a picture to a WebService

attardcattardc Member Posts: 97
edited 2012-09-04 in NAV Three Tier
Can anyone help me publish an item picture to a website via NAV Webservices?

I've had a look at this post - http://blogs.msdn.com/b/freddyk/archive ... vices.aspx however I cannot figure out how to create the COM code re base64

Is there any other way / any further help please?

Thanks!!

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    In the VSDemo.zip he supplies, a Base64 COM component is included: http://www.freddy.dk/VSDemo.zip
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DuikmeesterDuikmeester Member Posts: 308
    I use below code to download a file thru web-services without custom external COM objects or whatever:
    Document = 'Microsoft XML, v6.0'.DOMDocument60
    Element = 'Microsoft XML, v6.0'.IXMLDOMNode
    Stream = 'Microsoft ActiveX Data Objects 6.0 Library'.Stream
    Base64 = BigText
    FilePath = Text1024
    
    Download(FilePath : Text[1024];VAR Base64 : BigText)
    CREATE(Document);
    Element := Document.createElement('base64');
    Element.dataType := 'bin.base64';
    
    CREATE(Stream);
    Stream.Type := 1;
    Stream.Open;
    Stream.LoadFromFile(FilePath);
    Element.nodeTypedValue := Stream.Read;
    Stream.Close;
    Base64.ADDTEXT(Element.text);
    

    It could be reversed by writing the contents of the BigText into the Stream and use Stream.SaveToFile.
  • mdPartnerNLmdPartnerNL Member Posts: 802
    I use below code to download a file thru web-services without custom external COM objects or whatever:
    With what kind of server did you communicate, have a link? Is this some kind of standard to download binairy files?
Sign In or Register to comment.