
10/03/2009, 12:23
|
| | Fecha de Ingreso: marzo-2009
Mensajes: 16
Antigüedad: 16 años, 1 mes Puntos: 0 | |
Respuesta: Como consumir un Web Service con Asp??? yo tengo una pagina mucho mejor:
aqui delante va www .elguille.info/colabora/NET2005/mszklanny_WebServices_con_plataformas_no_NET.htm y lo puse asi por q es q no me dejan aqui ingresar la direccion completa
pero tengo un problema que esta ya por encima de este script y es que tengo una funcion de xsltransform q me convierte a html tomando el template xsl y el archivo xml, hasta alli todo bien, pero en mi script que aprovecho un webservice la variable correspondiente a el archivo xml es asi:xmlResponse.documentElement.text y la funcion es esta, gracias a quien me pueda ayudar, la idea seria modificar esta funcion para que acepte ese valor y no el path del archivo xml:
Function xsltransform(xmlfile,xslfile,strOptionalParam1,str OptionalParam2)
dim objXML
dim objXSL
dim templates
dim transformer
Set objXML = Server.CreateObject("MSXML2.FreeThreadedDOMDocumen t.3.0")
objXML.async = false
Set objXSL = Server.CreateObject("MSXML2.FreeThreadedDOMDocumen t.3.0")
objXSL.async = false
'set the parser properties
objXML.ValidateOnParse = True
objXSL.ValidateOnParse = True
'load the source XML document and check for errors
objXML.load Server.MapPath(xmlfile)
if objXML.parseError.errorCode <> 0 Then
'error found so show error message and stop
Response.End
end if
'load the XSL stylesheet and check for errors
objXSL.load Server.MapPath(xslfile)
if objXSL.parseError.errorCode <> 0 Then
'error found so show error message and stop
Response.End
end if
Set templates = Server.CreateObject("Msxml2.XSLTemplate.3.0")
templates.stylesheet = ObjXSL
Set transformer = templates.createProcessor()
if len(strOptionalparam1) then
transformer.addParameter "param1", strOptionalParam1
end if
if len(strOptionalparam2) then
transformer.addParameter "param2", strOptionalParam2
end if
transformer.input = objXML
transformer.transform()
xsltransform = transformer.output
end function
'Aqui llamo directamente a la función que esta al mismo nivel que Cabecera.xml y Cabecera.xsl verificando que la funcion si funciona pero quiero pasarle
'este valor : xmlResponse.documentElement.text
dim xmlfile
xmlfile = "Cabecera.xml"
response.write xsltransform(xmlfile,"Cabecera.xsl","","") |