Forums Últimos mensajes - Powered by IBM
 

Servicios SOAP

15/02/2005 - 16:03 por SRenau | Informe spam
¿Puedo usar SOAP con ASP?

MSSOAP.SoapClient30

¿Como?
 

Leer las respuestas

#1 Matias Iacono
15/02/2005 - 20:18 | Informe spam
Aqui tienes un ejemplo, espero te sirva:

Dim Method
Dim Exec
Dim CALC_NS

CALC_NS = "uri:Calc"
Method = "Extract"

set Serializer = Server.CreateObject("MSSOAP.SoapSerializer")
set Reader = Server.CreateObject("MSSOAP.SoapReader")
Set Connector = Server.CreateObject("MSSOAP.HttpConnector")

'Connector.Property("EndPointURL") "http://139.142.234.1/Extractor2/Extractor.asp"
Connector.Property("EndPointURL")="http://139.142.234.1/TestSoap/Test.asp"
Connector.Connect

Connector.Property("SoapAction") = "uri:" & Method
Connector.BeginMessage

Serializer.Init Connector.InputStream

Serializer.startEnvelope
Serializer.startBody
Serializer.startElement Method, CALC_NS, , "m"
Serializer.startElement "Text"

if cstr(request.form("url")) <> "" then
set cacher = Server.CreateObject("WebCach.WCach")
cacher.URL = request.form("url")
text = cacher.Extract
Serializer.writeString text
else
Serializer.writeString request.form("Text1")
end if

Serializer.endElement
Serializer.startElement "Filter"
Serializer.writeString "None"
Serializer.endElement
Serializer.endElement
Serializer.endBody
Serializer.endEnvelope

Connector.EndMessage

Reader.Load Connector.OutputStream

If Not Reader.Fault Is Nothing Then
exec = Reader.faultstring.Text
Else
Exec = Reader.RPCResult.Text
End If

Matias Iacono
Microsoft MVP



"SRenau" wrote in message
news:
¿Puedo usar SOAP con ASP?

MSSOAP.SoapClient30

¿Como?

Preguntas similares