Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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:
<%
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:
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.
<wsAutoResult>
<Folio>0</Folio>
<Status>Usuario Invalido</Status>
<hasErrors>true</hasErrors>
</wsAutoResult>
</wsAutoResponse>
 
Thanks people.
Posted 23-Jan-13 11:23am
Edited 23-Jan-13 11:33am
BC @ CV2.6K
v2
Comments
BC @ CV at 23-Jan-13 17:41pm
   
Perhaps the service is expecting an XML serialized object. What if instead of sending the class you sent its XML representation. Such as:
"<idcard><usuario>CgUlDSJZvIc=</usuario><Password>/px5j+mfNBc=</Password></idcard>"
Rene Bustos at 24-Jan-13 10:16am
   
that sound good.. let me try that and i'll post the results. thanks
BC @ CV at 24-Jan-13 13:47pm
   
Is your XML formated properly?
SOAP
Rene Bustos at 24-Jan-13 13:56pm
   
i think yes.. i check the Specifications of SOAP and it appear is all fine.
but still throwme the error.
BC @ CV at 24-Jan-13 14:48pm
   
Well, I can only guess from your error message, "...Interfaz no compatible...", that your XML (serialized object) doesn't match the interface of the object that's expected by the WS.
Rene Bustos at 24-Jan-13 14:53pm
   
could be.
Thanks so much for the Help
i keep trying to find the answer
Regards from Mexico.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Doesn't work :S.
i have try this ways..
1.- Seding all the request XML:
 
<soap:envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:body>
    <wsauto xmlns="http://www.nationalunity.com/wss/wsRemotePolicyWT/">
      <iduser>
        <username>string</username>
        <password>string</password>
        <isbeta>boolean</isbeta>
      </iduser>
      <poliza>
        <prefijo>string</prefijo>
        <folio>int</folio>
        <tipoendoso>string</tipoendoso>
        <estadoentrada>string</estadoentrada>
        <motivovisita>string</motivovisita>
        <fecharegistro>dateTime</fecharegistro>
        <iniciovigencia>dateTime</iniciovigencia>
        <finvigencia>dateTime</finvigencia>
        <FormaPago>string</FormaPago>
        <moneda>string</moneda>
        <nombreasegurado>string</nombreasegurado>
        <mxcallenumero>string</mxcallenumero>
        <mxcolonia>string</mxcolonia>
        <mxcodigopostal>string</mxcodigopostal>
        <email>string</email>
        <producto>string</producto>
        <mxmunicipio>string</mxmunicipio>
        <mxestadonom>string</mxestadonom>
        <mxlada>string</mxlada>
        <mxtelefonono>string</mxtelefonono>
        <anio>string</anio>
        <serie>string</serie>
        <placas>string</placas>
        <marca>string</marca>
        <modelo>string</modelo>
        <descripcionuso>string</descripcionuso>
        <paisplacas>string</paisplacas>
        <estadoplacas>string</estadoplacas>
        <remolque>string</remolque>
        <descripcionremolque>string</descripcionremolque>
        <puertoentrada>string</puertoentrada>
        <prima>string</prima>
        <derecho>string</derecho>
        <asistencia>string</asistencia>
        <miscelaneo>string</miscelaneo>
        <descuento>string</descuento>
        <extraprima>string</extraprima>
        <concepto_extraprima>string</concepto_extraprima>
        <prefijo_anterior>string</prefijo_anterior>
        <folio_anterior>string</folio_anterior>
        <observaciones>string</observaciones>
        <financiamiento>string</financiamiento>
        <enganche>string</enganche>
        <meses_financiamiento>string</meses_financiamiento>
        <numero_vehiculos>string</numero_vehiculos>
        <foliocertificado>string</foliocertificado>
        <estatus>string</estatus>
        <referenciapago>string</referenciapago>
        <filler1>string</filler1>
        <filler2>string</filler2>
        <nombreconductor>string</nombreconductor>
        <nolicencia>string</nolicencia>
        <fechanacimiento>string</fechanacimiento>
        <ocupacion>string</ocupacion>
      </poliza>
      <hash>string</hash>
    </wsauto>
  </soap:body>
</soap:envelope>
 
i store all the XML structure in a variable an i Put in the Ws Method like this.
Ws.WsAuto(Xmlstructure)
IdCard, Poliza and Hash
But the WS Method needs tree arguments,, so i split in tree variables and i passed to the Ws Method Like this
Ws.WsAuto(xmlIdCard,XmlPoliza,Hash)
 
But Still throw an error.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 534
1 Gihan Liyanage 298
2 RyanDev 260
3 Sergey Alexandrovich Kryukov 223
4 Richard Deeming 185
0 Sergey Alexandrovich Kryukov 8,936
1 OriginalGriff 7,891
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100