Visual Basic - Web Service consumir con vb6

Life is soft - evento anual de software empresarial
 
Vista:

Web Service consumir con vb6

Publicado por mariana rod (1 intervención) el 11/03/2012 04:48:31
Hola a todos !
Espero me puedan ayudar u orientar con este problema tengo que consumir un Web Service con Visual Basic6, ya se consumir un web service "normal" con vb6 es relativamente facil lo que ahora tengo problema en consumir es una web services con Arrays aqui se los dejo el wsdl espero me puedan ayudar !!! :(

Aqui la pregunta es como consumo un array? no tengo idea alguien me puede orientar con un ejemplito por favor??

El wsdl contiene dos métodos:

1. Test. El cual solo sirve para revisar la comunicación entre el cliente y el server. (testService)
Este si me sale (test service)
2. Negocio. El cual será el encargado de recibir la información necesaria para generar la cita. (generaCita) (este no me sale :( )

Los métodos reciben y envían lo siguiente:

1. testService
Recibe: Ningún parámetro
Salida: Un String con información del servicio

2. generaCita
Recibe: Una estructura compleja de tipo "CitaImportacionReqVO"
Salida: Envía una estructrua compleja de tipo "CitaImportacionResVO"


mi codigo de vb6 es este para conectarme al test service que si funciona

Private Sub Command3_Click()
Dim client


Set client = CreateObject("MSSOAP.SoapClient30")
client.mssoapinit ("http://128.1.4.120:7010/WSSCitaImportaciones/services/CitasImportacionesServicesPort?wsdl")


strg = (client.testService())

MsgBox (strg)


If Err.number = -2147024809 Then
MsgBox "Invalid Web Service Request. Please check the Web Service URL"
End If

end sub



WSDL

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://servicios.citas.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://servicios.citas.com" xmlns:intf="http://servicios.citas.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://vo.citas.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)

-->
+ <wsdl:types>
- <schema targetNamespace="http://vo.citas.com" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="CitaImpPediArtVO">
- <sequence>
<element name="artEan" nillable="true" type="xsd:string" />
<element name="pediCconf" nillable="true" type="xsd:double" />
</sequence>
</complexType>
- <complexType name="ArrayOffCitaImpPediArtVO[]">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:CitaImpPediArtVO[]" />
</restriction>
</complexContent>
</complexType>
- <complexType name="CitaImpPedidoVO">
- <sequence>
<element name="citrCent" nillable="true" type="xsd:double" />
<element name="listaCitaImpPediArt" nillable="true" type="tns1:ArrayOffCitaImpPediArtVO[]" />
<element name="pediId" nillable="true" type="xsd:int" />
<element name="pediVia" nillable="true" type="xsd:int" />
</sequence>
</complexType>
- <complexType name="ArrayOffCitaImpPedidoVO[]">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:CitaImpPedidoVO[]" />
</restriction>
</complexContent>
</complexType>
- <complexType name="CitaImportacionReqVO">
- <sequence>
<element name="citrCenv" nillable="true" type="xsd:double" />
<element name="citrComplx" nillable="true" type="xsd:int" />
<element name="citrFam" nillable="true" type="xsd:int" />
<element name="citrFsug" nillable="true" type="xsd:int" />
<element name="citrHsug" nillable="true" type="xsd:int" />
<element name="citrId" nillable="true" type="xsd:int" />
<element name="citrNpedi" nillable="true" type="xsd:int" />
<element name="citrPtipo" nillable="true" type="xsd:int" />
<element name="citrPvia" nillable="true" type="xsd:int" />
<element name="citrTipotra" nillable="true" type="xsd:int" />
<element name="ctraId" nillable="true" type="xsd:int" />
<element name="factEmirfc" nillable="true" type="xsd:string" />
<element name="factRecrfc" nillable="true" type="xsd:string" />
<element name="factZonaimp" nillable="true" type="xsd:int" />
<element name="listaCitaImpPedidoVO" nillable="true" type="tns1:ArrayOffCitaImpPedidoVO[]" />
<element name="prvdId" nillable="true" type="xsd:int" />
<element name="succEnt" nillable="true" type="xsd:int" />
<element name="usuaCod" nillable="true" type="xsd:int" />
</sequence>
</complexType>
- <complexType name="CitaImportacionResVO">
- <sequence>
<element name="citrId" nillable="true" type="xsd:int" />
<element name="estatus" nillable="true" type="xsd:int" />
<element name="mensaje" nillable="true" type="xsd:string" />
</sequence>
</complexType>
</schema>
</wsdl:types>
- <wsdl:message name="generaCitaRequest">
<wsdl:part name="citaImportacionReqVO" type="tns1:CitaImportacionReqVO" />
</wsdl:message>
- <wsdl:message name="generaCitaResponse">
<wsdl:part name="generaCitaReturn" type="tns1:CitaImportacionResVO" />
</wsdl:message>
- <wsdl:message name="testServiceResponse">
<wsdl:part name="testServiceReturn" type="xsd:string" />
</wsdl:message>
<wsdl:message name="testServiceRequest" />
- <wsdl:portType name="CitasImportacionesServices">
- <wsdl:operation name="generaCita" parameterOrder="citaImportacionReqVO">
<wsdl:input message="impl:generaCitaRequest" name="generaCitaRequest" />
<wsdl:output message="impl:generaCitaResponse" name="generaCitaResponse" />
</wsdl:operation>
- <wsdl:operation name="testService">
<wsdl:input message="impl:testServiceRequest" name="testServiceRequest" />
<wsdl:output message="impl:testServiceResponse" name="testServiceResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="CitasImportacionesServicesPortSoapBinding" type="impl:CitasImportacionesServices">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="generaCita">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="generaCitaRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://servicios.citas.com" use="encoded" />
</wsdl:input>
- <wsdl:output name="generaCitaResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://servicios.citas.com" use="encoded" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="testService">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="testServiceRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://servicios.citas.com" use="encoded" />
</wsdl:input>
- <wsdl:output name="testServiceResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://servicios.citas.com" use="encoded" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="CitasImportacionesServicesService">
- <wsdl:port binding="impl:CitasImportacionesServicesPortSoapBinding" name="CitasImportacionesServicesPort">
<wsdlsoap:address location="http://129.2.4.130:7080/WSSCitaImportaciones/services/CitasImportacionesServicesPort" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Web Service consumir con vb6

Publicado por alfonso (1 intervención) el 01/06/2013 04:11:08
Hola necesito ayuda necesito consumir el servicio
pero no se como
por favor
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar