megsoft
05-10-08, 21:41
It is my first program with ShopWIndow API. I try to read first 10 products, but it gives "There is an error in XML document (2, 2537)."
Dim affWebService As New ApiService
Dim affUserAuthenticationValue As New UserAuthentication
Dim affGetProds As getProductList = New getProductList()
Dim affProdResponse As getProductListResponse = New getProductListResponse()
affUserAuthenticationValue.iId = "00000"
affUserAuthenticationValue.sType = UserType.affiliate
affUserAuthenticationValue.sPassword = "b1b1b1b1b1b1bb1b1b1b1b"
affWebService.UserAuthenticationValue = affUserAuthenticationValue
affGetProds.iLimit = 10
affProdResponse = affWebService.getProductList(affGetProds) // here is the error.
For Each Prod As Product In affProdResponse.oProduct
TextBox1.Text = TextBox1.Text + Prod.sDescription.ToString() + " - " + Prod.fPrice
Application.DoEvents()
Next
Dim affWebService As New ApiService
Dim affUserAuthenticationValue As New UserAuthentication
Dim affGetProds As getProductList = New getProductList()
Dim affProdResponse As getProductListResponse = New getProductListResponse()
affUserAuthenticationValue.iId = "00000"
affUserAuthenticationValue.sType = UserType.affiliate
affUserAuthenticationValue.sPassword = "b1b1b1b1b1b1bb1b1b1b1b"
affWebService.UserAuthenticationValue = affUserAuthenticationValue
affGetProds.iLimit = 10
affProdResponse = affWebService.getProductList(affGetProds) // here is the error.
For Each Prod As Product In affProdResponse.oProduct
TextBox1.Text = TextBox1.Text + Prod.sDescription.ToString() + " - " + Prod.fPrice
Application.DoEvents()
Next