Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Send me the sample coding of DI Server

Hi DI Server Experts,

Can you send the sample simple coding for the DI Server and what are the steps needs to be taken care?

i have DI server license and when i run the coding of sample it showing 'Could commit the transaction login'.

Please helping out from this error and give good solutions ASAP.

Thanks in Advance,

G.Suresh

replied

Hi Suresh,

With the DI server, you simply send an XML file to the DI server and then receive a response from it:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        oRead = System.IO.File.OpenText("C:\Program Files\SAP\SAP Business One ServerTools\DI_Server\Login2.xml")
        string = oRead.ReadToEnd()

        response = DI_Server.Interact(str)        
    End Sub

This is the login file:

<?xml version="1.0" encoding="utf-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
 <env:Body>
  <dis:Login xmlns:dis="http://www,sap.com/SBO/DIS">
   <DatabaseServer>(local)</DatabaseServer>
   <DatabaseName>SBODemo_UK</DatabaseName>
   <DatabaseType>dst_MSSQL2005</DatabaseType>
   <DatabaseUsername>xx</DatabaseUsername>
   <DatabasePassword>xxxxx</DatabasePassword>
   <CompanyUsername>manager</CompanyUsername>
   <CompanyPassword>manager</CompanyPassword>
   <Language>ln_English</Language>
   <LicenseServer>localhost:30000</LicenseServer>
  </dis:Login>
 </env:Body>
</env:Envelope>

The code for sending the files to the DI server is the same for every operation, it is what is contained in the XML file that determines what the DI Server will do.

The SDK help file has examples of the different operations. Help Centre->DI Server->SOAP Message types->Data Manipulation Messages.

Regards,

Niall

SAP Business One Forums

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question