No estas conectado ... login

martes, 15. abril 2008

found in soaptoolkit 2.0 documentation

no suelo tratar ningún tema (imaginar por favor que las siguientes palabras están atravesadas por una línea, lo que debería de haber sucedido con el linethrough) en específico (dejar de imaginar lo de la línea) pero como esto me tuvo unos días atorado en el trabajo y nunca encontré documentación en línea lo pongo en caso de que por error le sirva a alguien que se encuentre en el desafortunado caso de tener que seguir usando vb6.

Call a web service with VB6 and soaptoolkit --- start code Dim Reader As SoapReader Dim serializer As SoapSerializer Dim Operation As WSDLOperation Dim Port As WSDLPort Dim PartsEnumerator As EnumSoapMappers Dim part As SoapMapper Dim iparts As Long

Set Reader = New SoapReader Set serializer = New SoapSerializer

'retrieve selected operation and port (from a collection) Set Operation = Operations.Item(soperation) Set Port = Operations.Item(soperation + "Port")

Operation.GetOperationParts PartsEnumerator PartsEnumerator.Next 1, part, iparts

'Missing from the online examples: 'Fill input parameters (from a collection) Do While iparts = 1 If part.isInput Then 'worked for ints and strings *todo: test for complex types part.comValue = Parameters.Item(part.elementName) End If PartsEnumerator.Next 1, part, iparts Loop

'look out for proxy issues If ProxyCheckbox.Value = 1 Then connector.Property("UseProxy") = True connector.Property("ProxyUser") = "ProxyUser" connector.Property("ProxyPassword") = "ProxyPassword" End If

connector.ConnectWSDL Port connector.BeginMessageWSDL Operation

serializer.Init connector.InputStream

'this right here was missing from all the online examples: 'you can use the Operation to make the call instead of ' generating your own serializer thank you very much serializer.startEnvelope serializer.startBody Operation.save serializer, True serializer.endBody serializer.endEnvelope

'make the call connector.EndMessage

'you can retrieve the dom.xml from the reader Reader.Load connector.OutputStream

-- end

Nótese el uso del inglés estrictamente para el jale y también el poco apego a los estándares de programación.

... Link




RSS FeedMade with Antville Helma Object Publisher


... home
... galleries
... Home
... Tags
... Galleries


... Antville.org home