SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / getDrawingsV3

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:intf" "http://data.webservice.workshop.vivid.nl"
CkXml_AddAttribute $xml "xmlns:soapenv" "http://schemas.xmlsoap.org/soap/envelope/"
CkXml_UpdateChildContent $xml "soapenv:Header" ""
CkXml_UpdateChildContent $xml "soapenv:Body|intf:getDrawingsV3|intf:vrid" "xml"
CkXml_UpdateChildContent $xml "soapenv:Body|intf:getDrawingsV3|intf:descriptionLanguage" "xml"
CkXml_UpdateChildContent $xml "soapenv:Body|intf:getDrawingsV3|intf:carTypeId" "xml"
CkXml_UpdateChildContent $xml "soapenv:Body|intf:getDrawingsV3|intf:repairTimesTypeId" "xml"
CkXml_UpdateChildContent $xml "soapenv:Body|intf:getDrawingsV3|intf:typeCategory" "xml"
CkXml_UpdateChildContent $xml "soapenv:Body|intf:getDrawingsV3|intf:carTypeGroup" "xml"
CkXml_UpdateChildContent $xml "soapenv:Body|intf:getDrawingsV3|intf:axleComponents" "xml"

# 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 "http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint"
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|*:getDrawingsV3Response|*:getDrawingsV3Return|*:description"]
set description [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:generalArticles|*:item|*:description"]
set id [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:generalArticles|*:item|*:id"]
set mandatory [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:generalArticles|*:item|*:mandatory"]
set mimeDataName [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:mimeDataName"]
set awNumber [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:awNumber"]
set description [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:description"]
set description [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:genarts|*:item|*:description"]
set id [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:genarts|*:item|*:id"]
set mandatory [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:genarts|*:item|*:mandatory"]
set hasInfoGroups [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:hasInfoGroups"]
set hasSubnodes [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:hasSubnodes"]
set id [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:id"]
set order [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:order"]
set confirmationLink [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:status|*:confirmationLink"]
set statusCode [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:status|*:statusCode"]
set value [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:repairTasks|*:item|*:value"]
set confirmationLink [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:status|*:confirmationLink"]
set statusCode [CkXml_getChildContent $responseXml "*:Body|*:getDrawingsV3Response|*:getDrawingsV3Return|*:status|*:statusCode"]

delete_CkXml $xml
delete_CkHttp $http
delete_CkXml $responseXml
Request XML
<soapenv:Envelope xmlns:intf="http://data.webservice.workshop.vivid.nl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <intf:getDrawingsV3>
            <intf:vrid>xml</intf:vrid>
            <intf:descriptionLanguage>xml</intf:descriptionLanguage>
            <intf:carTypeId>xml</intf:carTypeId>
            <intf:repairTimesTypeId>xml</intf:repairTimesTypeId>
            <intf:typeCategory>xml</intf:typeCategory>
            <intf:carTypeGroup>xml</intf:carTypeGroup>
            <intf:axleComponents>xml</intf:axleComponents>
        </intf:getDrawingsV3>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:intf="http://data.webservice.workshop.vivid.nl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <intf:getDrawingsV3Response>
            <intf:getDrawingsV3Return>
                <intf:description>xml</intf:description>
                <intf:generalArticles>
                    <intf:item>
                        <intf:description>xml</intf:description>
                        <intf:id>xml</intf:id>
                        <intf:mandatory>xml</intf:mandatory>
                    </intf:item>
                </intf:generalArticles>
                <intf:mimeDataName>xml</intf:mimeDataName>
                <intf:repairTasks>
                    <intf:item>
                        <intf:awNumber>xml</intf:awNumber>
                        <intf:description>xml</intf:description>
                        <intf:genarts>
                            <intf:item>
                                <intf:description>xml</intf:description>
                                <intf:id>xml</intf:id>
                                <intf:mandatory>xml</intf:mandatory>
                            </intf:item>
                        </intf:genarts>
                        <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                        <intf:hasSubnodes>xml</intf:hasSubnodes>
                        <intf:id>xml</intf:id>
                        <intf:order>xml</intf:order>
                        <intf:status>
                            <intf:confirmationLink>xml</intf:confirmationLink>
                            <intf:statusCode>xml</intf:statusCode>
                        </intf:status>
                        <intf:value>xml</intf:value>
                    </intf:item>
                </intf:repairTasks>
                <intf:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </intf:status>
                <intf:subDrawings>
                    <intf:item/>
                </intf:subDrawings>
            </intf:getDrawingsV3Return>
        </intf:getDrawingsV3Response>
    </soapenv:Body>
</soapenv:Envelope>