SOAP WSDL Generate Code

Application / get_result_async

ASP AutoIt C C (Unicode) C++ C++ (Unicode) C# DataFlex Delphi Foxpro Go Java Node.js Objective-C Perl PHP Extension PowerBuilder Powershell PureBasic Python CkPython Ruby SQL Server Swift TCL VB.NET VB6 VBScript Xojo
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
set xml = Server.CreateObject("Chilkat_9_5_0.Xml")
xml.Tag = "soapenv:Envelope"
success = xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
success = xml.AddAttribute("xmlns:sta","http://facturacion.finkok.com/stamp")
xml.UpdateChildContent "soapenv:Header",""
xml.UpdateChildContent "soapenv:Body|sta:get_result_async|sta:id","string"
xml.UpdateChildContent "soapenv:Body|sta:get_result_async|sta:username","string"
xml.UpdateChildContent "soapenv:Body|sta:get_result_async|sta:password","string"

' In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required. 
xml.EmitXmlDecl = 0
soapRequestBody = xml.GetXml()

endpoint = "https://demo-facturacion.finkok.com/servicios/soap/stamp"
soapAction = "get_result_async"
'  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
contentType = "text/xml"

set http = Server.CreateObject("Chilkat_9_5_0.Http")

http.ClearHeaders 
http.SetRequestHeader "Content-Type",contentType
http.SetRequestHeader "SOAPAction",soapAction

' resp is a Chilkat_9_5_0.HttpResponse
Set resp = http.PostXml(endpoint,soapRequestBody,"utf-8")
If (http.LastMethodSuccess = 0) Then
    Response.Write "<pre>" & Server.HTMLEncode( http.LastErrorText) & "</pre>"
    Response.Write "<pre>" & Server.HTMLEncode( "Failed to send SOAP request.") & "</pre>"
    Response.End
End If

' Get the XML response body.
set responseXml = Server.CreateObject("Chilkat_9_5_0.Xml")
success = resp.GetBodyXml(responseXml)

statusCode = resp.StatusCode
Response.Write "<pre>" & Server.HTMLEncode( "response status code: " & statusCode) & "</pre>"

' If the status code does not indicate succcess, then show the response XML,
' which probably contains error information.
If (statusCode <> 200) Then
    Response.Write "<pre>" & Server.HTMLEncode( responseXml.GetXml()) & "</pre>"
    Response.End
End If

Response.Write "<pre>" & Server.HTMLEncode( responseXml.GetXml()) & "</pre>"

' Parse the successful SOAP response XML.

' This is a sample of the response XML, but the namespace prefixes will be different.
' We can parse the result using "*" for the namespace prefixes (see below).

UUID = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:UUID")
RfcProvCertif = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:RfcProvCertif")
NoCertificadoSAT = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:NoCertificadoSAT")
CodEstatus = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:CodEstatus")
faultstring = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:faultstring")
faultcode = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:faultcode")
file = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:file")
SatSeal = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:SatSeal")
IdIncidencia = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:IdIncidencia")
RfcEmisor = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:RfcEmisor")
Uuid = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:Uuid")
CodigoError = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:CodigoError")
WorkProcessId = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:WorkProcessId")
MensajeIncidencia = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:MensajeIncidencia")
ExtraInfo = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:ExtraInfo")
NoCertificadoPac = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:NoCertificadoPac")
FechaRegistro = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:Incidencias|*:Incidencia|*:FechaRegistro")
FechaTimbrado = responseXml.GetChildContent("*:Body|*:get_result_asyncResponse|*:get_result_asyncResult|*:FechaTimbrado")

%>
</body>
</html>
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sta="http://facturacion.finkok.com/stamp">
    <soapenv:Header/>
    <soapenv:Body>
        <sta:get_result_async>
            <sta:id>string</sta:id>
            <sta:username>string</sta:username>
            <sta:password>string</sta:password>
        </sta:get_result_async>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s1="https://facturacion.finkok.com/servicios/async" xmlns:sta="http://facturacion.finkok.com/stamp" xmlns:s0="apps.services.soap.core.views">
    <soapenv:Header/>
    <soapenv:Body>
        <sta:get_result_asyncResponse>
            <sta:get_result_asyncResult>
                <s1:UUID>string</s1:UUID>
                <s1:RfcProvCertif>string</s1:RfcProvCertif>
                <s1:NoCertificadoSAT>string</s1:NoCertificadoSAT>
                <s1:CodEstatus>string</s1:CodEstatus>
                <s1:faultstring>string</s1:faultstring>
                <s1:faultcode>string</s1:faultcode>
                <s1:file>BqozVXeZZg==</s1:file>
                <s1:SatSeal>string</s1:SatSeal>
                <s1:Incidencias>
                    <s0:Incidencia>
                        <s0:IdIncidencia>string</s0:IdIncidencia>
                        <s0:RfcEmisor>string</s0:RfcEmisor>
                        <s0:Uuid>string</s0:Uuid>
                        <s0:CodigoError>string</s0:CodigoError>
                        <s0:WorkProcessId>string</s0:WorkProcessId>
                        <s0:MensajeIncidencia>string</s0:MensajeIncidencia>
                        <s0:ExtraInfo>string</s0:ExtraInfo>
                        <s0:NoCertificadoPac>string</s0:NoCertificadoPac>
                        <s0:FechaRegistro>string</s0:FechaRegistro>
                    </s0:Incidencia>
                </s1:Incidencias>
                <s1:FechaTimbrado>dateTime</s1:FechaTimbrado>
            </sta:get_result_asyncResult>
        </sta:get_result_asyncResponse>
    </soapenv:Body>
</soapenv:Envelope>