SOAP WSDL Generate Code

DataServiceEndpointSoapBinding / getSystemsV2

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
require 'chilkat'

xml = Chilkat::CkXml.new()
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:getSystemsV2|intf:vrid","xml")
xml.UpdateChildContent("soapenv:Body|intf:getSystemsV2|intf:typeId","xml")
xml.UpdateChildContent("soapenv:Body|intf:getSystemsV2|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)
soapRequestBody = xml.getXml()

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

http = Chilkat::CkHttp.new()

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

# resp is a CkHttpResponse
resp = http.PostXml(endpoint,soapRequestBody,"utf-8")
if (http.get_LastMethodSuccess() == false)
    print http.lastErrorText() + "\n";
    print "Failed to send SOAP request." + "\n";
    exit
end

# Get the XML response body.
responseXml = Chilkat::CkXml.new()
resp.GetBodyXml(responseXml)

statusCode = resp.get_StatusCode()
print "response status code: " + statusCode.to_s() + "\n";

# If the status code does not indicate succcess, then show the response XML,
# which probably contains error information.
if (statusCode != 200)
    print responseXml.getXml() + "\n";
    exit
end

print responseXml.getXml() + "\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).

confirmationLink = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:status|*:confirmationLink")
statusCode = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:status|*:statusCode")
mainGroup = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:mainGroup")
sg_number = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:systemGroups|*:item|*:sg_number")
system_group_id = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:systemGroups|*:item|*:system_group_id")
system_type_id = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:systemGroups|*:item|*:systems|*:item|*:system_type_id")
text = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:systemGroups|*:item|*:systems|*:item|*:text")
text = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:systemGroups|*:item|*:text")
system_group_id = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:system_group_id")
system_group_number = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:system_group_number")
system_type_id = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:systems|*:item|*:system_type_id")
text = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:systems|*:item|*:text")
text = responseXml.getChildContent("*:Body|*:getSystemsV2Response|*:getSystemsV2Return|*:systemGroupCategoryArray|*:item|*:text")
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:getSystemsV2>
            <intf:vrid>xml</intf:vrid>
            <intf:typeId>xml</intf:typeId>
            <intf:language>xml</intf:language>
        </intf:getSystemsV2>
    </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:getSystemsV2Response>
            <intf:getSystemsV2Return>
                <tns1:status>
                    <intf:confirmationLink>xml</intf:confirmationLink>
                    <intf:statusCode>xml</intf:statusCode>
                </tns1:status>
                <tns1:systemGroupCategoryArray>
                    <intf:item>
                        <tns2:mainGroup>xml</tns2:mainGroup>
                        <tns2:systemGroups>
                            <intf:item>
                                <tns2:sg_number>xml</tns2:sg_number>
                                <tns2:system_group_id>xml</tns2:system_group_id>
                                <tns2:systems>
                                    <intf:item>
                                        <tns2:system_type_id>xml</tns2:system_type_id>
                                        <tns2:text>xml</tns2:text>
                                    </intf:item>
                                </tns2:systems>
                                <tns2:text>xml</tns2:text>
                            </intf:item>
                        </tns2:systemGroups>
                        <tns2:system_group_id>xml</tns2:system_group_id>
                        <tns2:system_group_number>xml</tns2:system_group_number>
                        <tns2:systems>
                            <intf:item>
                                <tns2:system_type_id>xml</tns2:system_type_id>
                                <tns2:text>xml</tns2:text>
                            </intf:item>
                        </tns2:systems>
                        <tns2:text>xml</tns2:text>
                    </intf:item>
                </tns1:systemGroupCategoryArray>
            </intf:getSystemsV2Return>
        </intf:getSystemsV2Response>
    </soapenv:Body>
</soapenv:Envelope>