Options

SOAP with SSL

gunavsgunavs Member Posts: 32
A webservice i need to access with navision needs certificate authentication and navision also needs to accept the certificate sent by the webservice.Is there a way navision can send and accept a certificate? I saw that WinHttp has a setclientcertificate but when i use that the webservice returns a 'A certificate is required to complete client authentication' error.

Comments

  • Options
    bobyboby Member Posts: 78
    Hello,
    I've the same problem..
    Did you find a solution??

    Thanx
  • Options
    ta5ta5 Member Posts: 1,164
    Hi
    I guess you want to consume a 3rd party webservice, don't you? We did this several times, also on ssl. As far as I rembember we just had to accept the certificate on the machine from where the webservices were consumed, and once it worked with internet explorer it worked also with navision. In another case all the clients (inhouse) did use a proxy service and only the proxy service connected to the real werbservice.
    Hope this helps.
    Thomas
  • Options
    vitmalvitmal Member Posts: 5
    Hi,
    does anyone know how to accept the certificate on the machine from where the webservices is consumed and don't use GUI (graphic user interface)?
  • Options
    ta5ta5 Member Posts: 1,164
    Is the webservice consumed from many webservice so you want a silent install of the certificate?
    Thomas
  • Options
    vitmalvitmal Member Posts: 5
    Thank you for your question. The 3rd party webservice is consumed from many computer (NAV clients). The certificates are installed. I need suppress any display of window to confirm the certificate when webservice is called via 'Microsoft WinHTTP Services, version 5.1'.WinHttpRequest like this WinHTTPServer.Send(request);.
  • Options
    ta5ta5 Member Posts: 1,164
    Hi
    I know what you mean but I dont know the answer. But someone should know it, for example the publisher of the certificate.
    Another possibility is to use a kind of internal proxy service on one server. In this case, clients are pointing to the proxy, proxy is pointing to the real web service.
    Thomas
  • Options
    massimopasqualimassimopasquali Member Posts: 82
    Morning,

    nobody have never used XMLHttp.send(XMLDocument) with SSL comunication, almost with certificate installed on NAV server?

    My code is :

    XMLHttp.open('POST','http://www.xxxxxx.it/xxxx-web-services services',FALSE);

    XMLDocument.loadXML('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'
    + ' xmlns:xsd="http://www.sgate.ancitel.it/xsd/">'
    + ' <soapenv:Header/>'
    + ' <soapenv:Body>'
    + ' <xsd:richiestaPresaInCaricoLotto>'
    + ' <xsd:mittente>'
    + ' <xsd:login>user</xsd:login>'
    + ' <xsd:password>xxxxx</xsd:password>'
    + ' </xsd:mittente>'
    + ' <xsd:idUltimoLottoRicevutoCorrettamente>446983721</xsd:idUltimoLottoRicevutoCorrettamente>'
    + ' <xsd:numeroMessaggi>5</xsd:numeroMessaggi>'
    + ' </xsd:richiestaPresaInCaricoLotto>'
    + ' </soapenv:Body>'
    + '</soapenv:Envelope>');

    //Sending XML Response
    XMLHttp.send(XMLDocument);
    //Captureing the Final Response
    XMLDocument.load(XMLHttp.responseXML);

    // Save XML result
    XMLDocument.save('C:\Dati\Path\Log\xml.xml');
  • Options
    ta5ta5 Member Posts: 1,164
    Hi Massimo
    So it worked with SSL?
    Thomas
  • Options
    massimopasqualimassimopasquali Member Posts: 82
    yes Thomas it's work in SSL a necesity of a certificate that I have imported on NAV server
  • Options
    ta5ta5 Member Posts: 1,164
    yes Thomas it's work in SSL a necesity of a certificate that I have imported on NAV server

    Thanks, and congrats!
  • Options
    massimopasqualimassimopasquali Member Posts: 82
    No It don't work becouse i don't know how read a certificate that I necessity for connect to external web services using HTTPS protocol and certificate.

    I have read that you have resolved using WinHttp, but how did you have read the certificate?
Sign In or Register to comment.