SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / processRepairTasks2

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
Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoXml
    Boolean iSuccess
    String sSoapRequestBody
    String sEndpoint
    String sSoapAction
    String sContentType
    Handle hoHttp
    Variant vResp
    Handle hoResp
    Variant vResponseXml
    Handle hoResponseXml
    Integer iStatusCode
    String sItem
    String sPrice
    String sAwNumber
    String sDescription
    String sDirection
    String sHasInfoGroups
    String sValue
    String sNodeId
    String sConfirmationLink
    String sStatusCode
    String sTotalPrice
    String sTotalTime
    String sVat
    String sTemp1
    Boolean bTemp1

    Get Create (RefClass(cComChilkatXml)) To hoXml
    If (Not(IsComObjectCreated(hoXml))) Begin
        Send CreateComObject of hoXml
    End
    Set ComTag Of hoXml To "soapenv:Envelope"
    Get ComAddAttribute Of hoXml "xmlns:intf" "http://data.webservice.workshop.vivid.nl" To iSuccess
    Get ComAddAttribute Of hoXml "xmlns:soapenv" "http://schemas.xmlsoap.org/soap/envelope/" To iSuccess
    Send ComUpdateChildContent To hoXml "soapenv:Header" ""
    Send ComUpdateChildContent To hoXml "soapenv:Body|intf:processRepairTasks2|intf:vrid" "xml"
    Send ComUpdateChildContent To hoXml "soapenv:Body|intf:processRepairTasks2|intf:descriptionLanguage" "xml"
    Send ComUpdateChildContent To hoXml "soapenv:Body|intf:processRepairTasks2|intf:repairtimeTypeId" "xml"
    Send ComUpdateChildContent To hoXml "soapenv:Body|intf:processRepairTasks2|intf:ids" "xml"
    Send ComUpdateChildContent To hoXml "soapenv:Body|intf:processRepairTasks2|intf:vatRate" "xml"
    Send ComUpdateChildContent To hoXml "soapenv:Body|intf:processRepairTasks2|intf:labourRate" "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. 
    Set ComEmitXmlDecl Of hoXml To False
    Get ComGetXml Of hoXml To sSoapRequestBody

    Move "http://www.haynespro-services.com/workshopServices3/services/DataServiceEndpoint" To sEndpoint
    Move "" To sSoapAction
    //  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
    Move "text/xml" To sContentType

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Send ComClearHeaders To hoHttp
    Send ComSetRequestHeader To hoHttp "Content-Type" sContentType
    Send ComSetRequestHeader To hoHttp "SOAPAction" sSoapAction

    Get ComPostXml Of hoHttp sEndpoint sSoapRequestBody "utf-8" To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Showln "Failed to send SOAP request."
        Procedure_Return
    End

    // Get the XML response body.
    Get Create (RefClass(cComChilkatXml)) To hoResponseXml
    If (Not(IsComObjectCreated(hoResponseXml))) Begin
        Send CreateComObject of hoResponseXml
    End
    Get pvComObject of hoResponseXml to vResponseXml
    Get ComGetBodyXml Of hoResp vResponseXml To iSuccess

    Get ComStatusCode Of hoResp To iStatusCode
    Showln "response status code: " iStatusCode

    Send Destroy of hoResp

    // If the status code does not indicate succcess, then show the response XML,
    // which probably contains error information.
    If (iStatusCode <> 200) Begin
        Get ComGetXml Of hoResponseXml To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComGetXml Of hoResponseXml To sTemp1
    Showln sTemp1

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

    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:calculatedTimes|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:descriptions|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:genarts|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:ids|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:price" To sPrice
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:awNumber" To sAwNumber
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:description" To sDescription
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:direction" To sDirection
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:genarts|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:hasInfoGroups" To sHasInfoGroups
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:followUpWorkList|*:item|*:value" To sValue
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:awNumber" To sAwNumber
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:description" To sDescription
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:direction" To sDirection
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:genarts|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:hasInfoGroups" To sHasInfoGroups
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:includedList|*:item|*:value" To sValue
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:nodeId" To sNodeId
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:awNumber" To sAwNumber
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:description" To sDescription
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:direction" To sDirection
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:genarts|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:hasInfoGroups" To sHasInfoGroups
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:notIncludedList|*:item|*:value" To sValue
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:awNumber" To sAwNumber
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:description" To sDescription
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:direction" To sDirection
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:genarts|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:hasInfoGroups" To sHasInfoGroups
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:preliminaryList|*:item|*:value" To sValue
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:status|*:confirmationLink" To sConfirmationLink
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:repairtimesInfos|*:item|*:status|*:statusCode" To sStatusCode
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:status|*:confirmationLink" To sConfirmationLink
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:status|*:statusCode" To sStatusCode
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:subtotal|*:item" To sItem
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:totalPrice" To sTotalPrice
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:totalTime" To sTotalTime
    Get ComGetChildContent Of hoResponseXml "*:Body|*:processRepairTasks2Response|*:processRepairTasks2Return|*:vat" To sVat


End_Procedure
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:processRepairTasks2>
            <intf:vrid>xml</intf:vrid>
            <intf:descriptionLanguage>xml</intf:descriptionLanguage>
            <intf:repairtimeTypeId>xml</intf:repairtimeTypeId>
            <intf:ids>xml</intf:ids>
            <intf:vatRate>xml</intf:vatRate>
            <intf:labourRate>xml</intf:labourRate>
        </intf:processRepairTasks2>
    </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:processRepairTasks2Response>
            <intf:processRepairTasks2Return>
                <intf:calculatedTimes>
                    <intf:item>xml</intf:item>
                </intf:calculatedTimes>
                <intf:descriptions>
                    <intf:item>xml</intf:item>
                </intf:descriptions>
                <intf:genarts>
                    <intf:item>xml</intf:item>
                </intf:genarts>
                <intf:ids>
                    <intf:item>xml</intf:item>
                </intf:ids>
                <intf:price>xml</intf:price>
                <intf:repairtimesInfos>
                    <intf:item>
                        <intf:followUpWorkList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:followUpWorkList>
                        <intf:includedList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:includedList>
                        <intf:nodeId>xml</intf:nodeId>
                        <intf:notIncludedList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:notIncludedList>
                        <intf:preliminaryList>
                            <intf:item>
                                <intf:awNumber>xml</intf:awNumber>
                                <intf:description>xml</intf:description>
                                <intf:direction>xml</intf:direction>
                                <intf:genarts>
                                    <intf:item>xml</intf:item>
                                </intf:genarts>
                                <intf:hasInfoGroups>xml</intf:hasInfoGroups>
                                <intf:value>xml</intf:value>
                            </intf:item>
                        </intf:preliminaryList>
                        <intf:status>
                            <intf:confirmationLink>xml</intf:confirmationLink>
                            <intf:statusCode>xml</intf:statusCode>
                        </intf:status>
                    </intf:item>
                </intf:repairtimesInfos>
                <intf:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </intf:status>
                <intf:subtotal>
                    <intf:item>xml</intf:item>
                </intf:subtotal>
                <intf:totalPrice>xml</intf:totalPrice>
                <intf:totalTime>xml</intf:totalTime>
                <intf:vat>xml</intf:vat>
            </intf:processRepairTasks2Return>
        </intf:processRepairTasks2Response>
    </soapenv:Body>
</soapenv:Envelope>