SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / filterFaultCodesWithDiagnosticStepsForTypeV2

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
#include <CkXml.h>
#include <CkHttp.h>
#include <CkHttpResponse.h>

void ChilkatSample(void)
    {
    CkXml xml;
    xml.put_Tag("soapenv:Envelope");
    xml.AddAttribute("xmlns:intf","http://data.webservice.workshop.vivid.nl");
    xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/");
    xml.UpdateChildContent("soapenv:Header","");
    xml.UpdateChildContent("soapenv:Body|intf:filterFaultCodesWithDiagnosticStepsForTypeV2|intf:vrid","xml");
    xml.UpdateChildContent("soapenv:Body|intf:filterFaultCodesWithDiagnosticStepsForTypeV2|intf:typeId","xml");
    xml.UpdateChildContent("soapenv:Body|intf:filterFaultCodesWithDiagnosticStepsForTypeV2|intf:codesin","xml");
    xml.UpdateChildContent("soapenv:Body|intf:filterFaultCodesWithDiagnosticStepsForTypeV2|intf:language","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. 
    xml.put_EmitXmlDecl(false);
    const char *soapRequestBody = xml.getXml();

    const char *endpoint = "http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint";
    const char *soapAction = "";
    //  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
    const char *contentType = "text/xml";

    CkHttp http;

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

    CkHttpResponse *resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
    if (http.get_LastMethodSuccess() == false) {
        std::cout << http.lastErrorText() << "\r\n";
        std::cout << "Failed to send SOAP request." << "\r\n";
        return;
    }

    // Get the XML response body.
    CkXml responseXml;
    resp->GetBodyXml(responseXml);

    int statusCode = resp->get_StatusCode();
    std::cout << "response status code: " << statusCode << "\r\n";

    delete resp;

    // If the status code does not indicate succcess, then show the response XML,
    // which probably contains error information.
    if (statusCode != 200) {
        std::cout << responseXml.getXml() << "\r\n";
        return;
    }

    std::cout << responseXml.getXml() << "\r\n";

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

    const char *ct_text = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:ct_text");
    const char *description = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:generalArticles|*:item|*:description");
    const char *id = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:generalArticles|*:item|*:id");
    const char *mandatory = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:generalArticles|*:item|*:mandatory");
    const char *loDirection = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:loDirection");
    const char *loX = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:loX");
    const char *loY = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:loY");
    const char *name = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:name");
    const char *v_number = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:number");
    const char *shieldPinId = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:shieldPinId");
    const char *slImagesId = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:slImagesId");
    const char *symbolInstanceId = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:symbolInstanceId");
    const char *systemTypeId = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:component|*:systemTypeId");
    const char *couplingType = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:couplingType");
    const char *system_group_id = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:system_group_id");
    const char *system_type_id = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:diagnosticComponents|*:item|*:system_type_id");
    const char *fc_code = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:fc_code");
    const char *fc_code2 = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:fc_code2");
    const char *fd_component_name_id = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:fd_component_name_id");
    const char *fd_id = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:fd_id");
    const char *fd_plausible = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:fd_plausible");
    const char *fd_si_number = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:fd_si_number");
    const char *ft_text = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:ft_text");
    id = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:faultCode3Array|*:item|*:id");
    const char *confirmationLink = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:status|*:confirmationLink");
    const char *statusCode = responseXml.getChildContent("*:Body|*:filterFaultCodesWithDiagnosticStepsForTypeV2Response|*:filterFaultCodesWithDiagnosticStepsForTypeV2Return|*:status|*:statusCode");
    }
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:filterFaultCodesWithDiagnosticStepsForTypeV2>
            <intf:vrid>xml</intf:vrid>
            <intf:typeId>xml</intf:typeId>
            <intf:codesin>xml</intf:codesin>
            <intf:language>xml</intf:language>
        </intf:filterFaultCodesWithDiagnosticStepsForTypeV2>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns2="http://datatypes.webservice.elecdata.vivid.nl" xmlns:tns1="http://datamodel.webservice.elecdata.vivid.nl" xmlns:intf="http://data.webservice.workshop.vivid.nl">
    <soapenv:Header/>
    <soapenv:Body>
        <intf:filterFaultCodesWithDiagnosticStepsForTypeV2Response>
            <intf:filterFaultCodesWithDiagnosticStepsForTypeV2Return>
                <tns1:faultCode3Array>
                    <intf:item>
                        <tns2:ct_text>xml</tns2:ct_text>
                        <tns2:diagnosticComponents>
                            <intf:item>
                                <tns2:component>
                                    <tns2:generalArticles>
                                        <intf:item>
                                            <intf:description>xml</intf:description>
                                            <intf:id>xml</intf:id>
                                            <intf:mandatory>xml</intf:mandatory>
                                        </intf:item>
                                    </tns2:generalArticles>
                                    <tns2:loDirection>xml</tns2:loDirection>
                                    <tns2:loX>xml</tns2:loX>
                                    <tns2:loY>xml</tns2:loY>
                                    <tns2:name>xml</tns2:name>
                                    <tns2:number>xml</tns2:number>
                                    <tns2:shieldPinId>xml</tns2:shieldPinId>
                                    <tns2:slImagesId>xml</tns2:slImagesId>
                                    <tns2:symbolInstanceId>xml</tns2:symbolInstanceId>
                                    <tns2:systemTypeId>xml</tns2:systemTypeId>
                                </tns2:component>
                                <tns2:couplingType>xml</tns2:couplingType>
                                <tns2:system_group_id>xml</tns2:system_group_id>
                                <tns2:system_type_id>xml</tns2:system_type_id>
                            </intf:item>
                        </tns2:diagnosticComponents>
                        <tns2:fc_code>xml</tns2:fc_code>
                        <tns2:fc_code2>xml</tns2:fc_code2>
                        <tns2:fd_component_name_id>xml</tns2:fd_component_name_id>
                        <tns2:fd_id>xml</tns2:fd_id>
                        <tns2:fd_plausible>xml</tns2:fd_plausible>
                        <tns2:fd_si_number>xml</tns2:fd_si_number>
                        <tns2:ft_text>xml</tns2:ft_text>
                        <tns2:id>xml</tns2:id>
                    </intf:item>
                </tns1:faultCode3Array>
                <tns1:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </tns1:status>
            </intf:filterFaultCodesWithDiagnosticStepsForTypeV2Return>
        </intf:filterFaultCodesWithDiagnosticStepsForTypeV2Response>
    </soapenv:Body>
</soapenv:Envelope>