Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:35:18+00:00 2026-06-11T06:35:18+00:00

Magento has an API and it seems some people are using it via VB.NET

  • 0

Magento has an API and it seems some people are using it via VB.NET but I cannot get it to work after trying for many hours.

I’m on Magento 1.7.0.2
Trying to get a VB.NET app working with the API.
I’m using the WS-I compliant web service setting.

Error 1 Custom tool error: Unable to import WebService/Schema. Unable to import binding ‘Mage_Api_Model_Server_Wsi_HandlerBinding’ from namespace ‘urn:Magento’. The operation ‘catalogProductAttributeRemove’ on portType ‘Mage_Api_Model_Server_Wsi_HandlerPortType’ from namespace ‘urn:Magento’ had the following syntax error: The operation has no matching binding. Check if the operation, input and output names in the Binding section match with the corresponding names in the PortType section. d:\Documents\Visual Studio 2010\Projects\Mage\Mage\My Project\Settings.settings 1 1 Mage

if I try to add it as a Service Reference (instead of a Web Reference) I get a different set of errors.

Cannot import wsdl:binding
Cannot import wsdl:port
Cannot import wsdl:portType

Error 5 Custom tool error: Failed to generate code for the service reference ‘ServiceReference1’. Please check other error and warning messages for details. d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage

Warning 3 Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:portType[@name=’Mage_Api_Model_Server_Wsi_HandlerPortType’]
XPath to Error Source: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:binding[@name=’Mage_Api_Model_Server_Wsi_HandlerBinding’] d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage

Warning 4 Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:binding[@name=’Mage_Api_Model_Server_Wsi_HandlerBinding’]
XPath to Error Source: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:service[@name=’MagentoService’]/wsdl:port[@name=’Mage_Api_Model_Server_Wsi_HandlerPort’] d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage

Warning 2 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Element message named catalogProductAttributeRemoveRequest from namespace urn:Magento is missing.
XPath to Error Source: //wsdl:definitions[@targetNamespace=’urn:Magento’]/wsdl:portType[@name=’Mage_Api_Model_Server_Wsi_HandlerPortType’] d:\Documents\Visual Studio 2010\Projects\Mage\Mage\Service References\ServiceReference1\Reference.svcmap 1 1 Mage

Can someone give me very explicit instruction/code on how to make a call and get a result? I can’t even seem to get the initial configuration correct. I’ve downloaded some code others have provided online, but if doesn’t work–probably because it was for a earlier version.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:35:20+00:00Added an answer on June 11, 2026 at 6:35 am
    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
    

    That code needs tweaking obviously- i have not got time to prettify this stuff


    from Abid Hussain’s link

    1. Using wdsl tool I created a .vb source file by calling:

    wsdl /language:VB /out:MageProxyClass.vb http:///api/v2_soap?wsdl

    2. Afterwards I used the VB Comand Line Editor to compile the sourcefile into a dll.

    vbc /out:MageProxyClass.dll /t:library
    /r:System.XML.dll,System.Web.Services.dll MageProxyClass.vb

    3. Finally I was able to create an instance of MagentoService class defined in my MageProxyClass.dll

    Private WithEvents msvc As New MagentoService() 
    

    4. Example:

     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 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to fix some problems with a Magento site, but I'm running into
I'm using the Magento API V2. When I call salesOrderCreditmemoInfo , I get a
I'm trying to use magento shopping platform API from .NET and it is not
I have a page in magento which has some dynamically created elements but the
Magento 1.6.1 I am trying to get form data on my observer. I tried
Magento 1.4.2 Having compilation errors and the page doesn't render. I get errors but
The newsletter subscription module in Magento has only one field (email) by default. After
We're using a shared server (on RackSpace) for Magento development. Each developer has his
I have a webshop (magento platform) but the site was has been disabled by
Just after some advice: I need to build a webstore that has a large

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.