Foros del Web » Programando para Internet » ASP Clásico »

Consumir WebService

Estas en el tema de Consumir WebService en el foro de ASP Clásico en Foros del Web. Hola a todos soy novato en esto de los webservice, encontre este codigo en la web: <%@ Language = "VBScript" %> <HTML> <HEAD> <title></title> <% ...
  #1 (permalink)  
Antiguo 03/03/2014, 20:14
 
Fecha de Ingreso: marzo-2014
Ubicación: Estado de Mexico
Mensajes: 3
Antigüedad: 10 años, 1 mes
Puntos: 0
Consumir WebService

Hola a todos soy novato en esto de los webservice, encontre este codigo en la web:

<%@ Language = "VBScript" %>
<HTML>
<HEAD>
<title></title>
<%
Function GetAppSettings(key)

Dim url, xmlhttp, dom, node

'Call web service using HTTP-GET
url = "http://localhost/PWS/Ch2-3/AppServi...smx/"
url = url & "GetAppSettings?key=" & key

Set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
Call xmlhttp.Open("GET", url,False)
Call xmlhttp.send

'Parse result
Set dom = Server.CreateObject("Microsoft.XMLDOM")
dom.Load(xmlhttp.responseBody)
Set node = dom.SelectSingleNode("//string")

Response.Write(Server.HTMLEncode(xmlhttp.responseT ext))

If Not node is Nothing Then
GetAppSettings = node.text
End If

End Function

Dim key
Dim value

If Len(Request("Submit1")) > 0 Then

Dim xmlhttp
Dim url
Dim dom

key = Request("key")
value = GetAppSettings(key)

End If
%>
</HEAD>
<body>
<P>
Application("ConnectString")= <%=Application("ConnectString") %>
</P>
<form>
<P>
<INPUT id="key" type="text" name="key" value="<%=key%>">=<%=value%>
</P>
<P>
<INPUT id="Submit1" type="submit" value="GetAppSetting" name="Submit1">
</P>
</form>
<P>
</body>
</HTML>

Y necesito adaptarlo a lo que piden en este link:

ftp://ftp2.sat.gob.mx/asistencia_servicio_ftp/publicaciones/cfdi/WS_ConsultaCFDI.pdf

Luego entonces lo modifico de esta manera

'Call web service using HTTP-GET
url = "https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc?wsdl"
url = url & "GetAppSettings?re=XAXX010101000&rr=XAXX010101000& tt=1234567890.123456&id=ad662d33-6934-459c-a128-BDf0393f0f44"
" & key

El cuadro de texto key lo dejo en blanco y al consumir el WS me regresa error

A ver si alguien me puede ayudar.
  #2 (permalink)  
Antiguo 07/04/2014, 10:13
Avatar de Albertorc  
Fecha de Ingreso: enero-2005
Ubicación: Gomez Palacio
Mensajes: 3
Antigüedad: 19 años, 3 meses
Puntos: 0
Respuesta: Consumir WebService

Que tal, lograste consumir el servicio?

Etiquetas: consumir, webservice
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:25.