Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>Function getHTTPStream() As String Dim myh As HttpWebRequest = _ HttpWebRequest.Create("http://yourmagentoweb/soap/api/?wsdl") myh.Timeout = 30000 myh.UserAgent = "Test" Dim myR As HttpWebResponse = myh.GetResponse() Dim myEnc As Encoding = Encoding.GetEncoding(1252) Dim mySr As StreamReader = New StreamReader(myR.GetResponseStream(), myEnc) Return mySr.ReadToEnd() End Function </code></pre> <p>That code needs tweaking obviously- i have not got time to prettify this stuff</p> <hr> <p>from Abid Hussain's link</p> <p><strong>1. Using wdsl tool I created a .vb source file by calling:</strong> </p> <blockquote> <p>wsdl /language:VB /out:MageProxyClass.vb http:///api/v2_soap?wsdl</p> </blockquote> <p><strong>2. Afterwards I used the VB Comand Line Editor to compile the sourcefile into a dll.</strong> </p> <blockquote> <p>vbc /out:MageProxyClass.dll /t:library /r:System.XML.dll,System.Web.Services.dll MageProxyClass.vb</p> </blockquote> <p><strong>3. Finally I was able to create an instance of MagentoService class defined in my MageProxyClass.dll</strong> </p> <pre><code>Private WithEvents msvc As New MagentoService() </code></pre> <p><strong>4. Example:</strong></p> <pre><code> Public Class main Private WithEvents msvc As New MagentoService() Private ssid As String Private Sub main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ListBox1.Items.Clear() ListBox1.Items.Add("Trying to connect") msvc.loginAsync("xxxx", "xxxxxxxxxxxxxxxx") End Sub Public Sub MageLoginComplete(ByVal sender As System.Object, ByVal e As loginCompletedEventArgs) Handles msvc.loginCompleted ListBox1.Items.Add("Login completed") ssid = e.Result ListBox1.Items.Add(String.Concat("Session ID: ", ssid)) End Sub End Class </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload