SOAP WSDL Generate Code

ArubaSignServicePortBinding / credentials_query

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
load ./chilkat.dll

set xml [new_CkXml]

CkXml_put_Tag $xml "soapenv:Envelope"
CkXml_AddAttribute $xml "xmlns:soapenv" "http://schemas.xmlsoap.org/soap/envelope/"
CkXml_AddAttribute $xml "xmlns:aru" "http://arubasignservice.arubapec.it/"
CkXml_UpdateChildContent $xml "soapenv:Header" ""
CkXml_UpdateChildContent $xml "soapenv:Body|aru:credentials_query|aru:credential_query|aru:appidentity|aru:applicationpassword" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|aru:credentials_query|aru:credential_query|aru:appidentity|aru:applicationuser" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|aru:credentials_query|aru:credential_query|aru:constraints|aru:field" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|aru:credentials_query|aru:credential_query|aru:constraints|aru:value" "string"
CkXml_UpdateChildContent $xml "soapenv:Body|aru:credentials_query|aru:credential_query|aru:domain" "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. 
CkXml_put_EmitXmlDecl $xml 0
set soapRequestBody [CkXml_getXml $xml]

set endpoint "https://arss.demo.firma-automatica.it/ArubaSignService/ArubaSignService"
set soapAction ""
#  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
set contentType "text/xml"

set http [new_CkHttp]

CkHttp_ClearHeaders $http
CkHttp_SetRequestHeader $http "Content-Type" $contentType
CkHttp_SetRequestHeader $http "SOAPAction" $soapAction

# resp is a CkHttpResponse
set resp [CkHttp_PostXml $http $endpoint $soapRequestBody "utf-8"]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
    puts [CkHttp_lastErrorText $http]
    puts "Failed to send SOAP request."
    delete_CkXml $xml
    delete_CkHttp $http
    exit
}

# Get the XML response body.
set responseXml [new_CkXml]

CkHttpResponse_GetBodyXml $resp $responseXml

set statusCode [CkHttpResponse_get_StatusCode $resp]
puts "response status code: $statusCode"

delete_CkHttpResponse $resp

# If the status code does not indicate succcess, then show the response XML,
# which probably contains error information.
if {$statusCode != 200} then {
    puts [CkXml_getXml $responseXml]
    delete_CkXml $xml
    delete_CkHttp $http
    delete_CkXml $responseXml
    exit
}

puts [CkXml_getXml $responseXml]

# 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).

set description [CkXml_getChildContent $responseXml "*:Body|*:credentials_queryResponse|*:return|*:description"]
set return_code [CkXml_getChildContent $responseXml "*:Body|*:credentials_queryResponse|*:return|*:return_code"]
set status [CkXml_getChildContent $responseXml "*:Body|*:credentials_queryResponse|*:return|*:status"]
set content [CkXml_getChildContent $responseXml "*:Body|*:credentials_queryResponse|*:return|*:credentials|*:certs|*:content"]
set id [CkXml_getChildContent $responseXml "*:Body|*:credentials_queryResponse|*:return|*:credentials|*:certs|*:id"]
set status [CkXml_getChildContent $responseXml "*:Body|*:credentials_queryResponse|*:return|*:credentials|*:status"]
set userid [CkXml_getChildContent $responseXml "*:Body|*:credentials_queryResponse|*:return|*:credentials|*:userid"]

delete_CkXml $xml
delete_CkHttp $http
delete_CkXml $responseXml
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aru="http://arubasignservice.arubapec.it/">
    <soapenv:Header/>
    <soapenv:Body>
        <aru:credentials_query>
            <aru:credential_query>
                <aru:appidentity>
                    <aru:applicationpassword>string</aru:applicationpassword>
                    <aru:applicationuser>string</aru:applicationuser>
                </aru:appidentity>
                <aru:constraints>
                    <aru:field>string</aru:field>
                    <aru:value>string</aru:value>
                </aru:constraints>
                <aru:domain>string</aru:domain>
            </aru:credential_query>
        </aru:credentials_query>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aru="http://arubasignservice.arubapec.it/">
    <soapenv:Header/>
    <soapenv:Body>
        <aru:credentials_queryResponse>
            <aru:return>
                <aru:description>string</aru:description>
                <aru:return_code>string</aru:return_code>
                <aru:status>string</aru:status>
                <aru:credentials>
                    <aru:certs>
                        <aru:content>BqozVXeZZg==</aru:content>
                        <aru:id>string</aru:id>
                    </aru:certs>
                    <aru:status>string</aru:status>
                    <aru:userid>string</aru:userid>
                </aru:credentials>
            </aru:return>
        </aru:credentials_queryResponse>
    </soapenv:Body>
</soapenv:Envelope>