Click here to Skip to main content
15,892,199 members

Pass a Class as Parameter from ASP 3.0 to WebService .NET

Rene Bustos asked:

Open original thread
Hi Guys

I need to send a class through a WS .net from Vbscript
I mean: I need to consume a webService that is develop in .Net 2010 with ASP classic.
But this WebService, needs to back a Class with UserName and password

I made the class in VBScript in dreamweaver:
VB
<%
Class IdCard
        Private m_usuario 'As String
        Private m_password ' As Integer
        Private m_IsBeta 'As boolean



        Public Property Get Usuario()
              Usuario = m_Usuario
        End Property

        Public Property Let Usuario(p_Data)
              m_Usuario = p_Data
        End Property

        Public Property Get Password()
              Password = m_Password
        End Property

        Public Property Let Password(p_Data)
              m_Password = p_Data
        End Property

        Public Property Get IsBeta()
              IsBeta = m_IsBeta
        End Property

        Public Property Let IsBeta(p_Data)
              m_IsBeta = p_Data
        End Property

End Class
%>




And this is how I instantiate the Class page.asp:
VB
SET Seguridad = new idCard
Seguridad.usuario = "CgUlDSJZvIc="
Seguridad.password = "/px5j+mfNBc="
SendClassToAnotherPage(Seguridad)




Then I send this class in the web method page2.asp:
function SendClassToAnotherPage(Seguridad)

Set Result = oSoapClient.WsAuto(seguridad)	 


but.. after execute the line shown above...this throws an Error:
"ERROR5 \SoapMapper\SoapMapper:Saving SoapMapper idUser failed HRESULT=0x80004002: Interfaz no compatible - Client:Unspecified client error. HRESULT=0x80004002: Interfaz no compatible "



but if I change the data:
Set Result = oSoapClient.WsAuto("some string data and not a class")


The response is fine. I mean ...with my own customize errors.
XML
<wsAutoResult>
<Folio>0</Folio>
<Status>Usuario Invalido</Status>
<hasErrors>true</hasErrors>
</wsAutoResult>
</wsAutoResponse>


Thanks people.
Tags: VBScript, ASP, WSS, Webservice

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900