SOAP WSDL Generate Code

OrganisationServiceBasicHttpEndpoint / SearchByModifiedDate

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
Chilkat.Xml xml = new Chilkat.Xml();
xml.Tag = "soapenv:Envelope";
xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/");
xml.AddAttribute("xmlns:tra","http://training.gov.au/services/12/");
xml.AddAttribute("xmlns:sys","http://schemas.datacontract.org/2004/07/System");
xml.AddAttribute("xmlns:arr","http://schemas.microsoft.com/2003/10/Serialization/Arrays");
xml.UpdateChildContent("soapenv:Header","");
xml.UpdateChildContentInt("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:PageNumber",1042);
xml.UpdateChildContentInt("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:PageSize",1042);
xml.UpdateChildContent("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:DataManagerFilter|arr:string","string");
xml.UpdateChildContent("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:EndDate|sys:DateTime","dateTime");
xml.UpdateChildContentInt("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:EndDate|sys:OffsetMinutes",442);
xml.UpdateChildContent("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:IncludeLegacyData","true");
xml.UpdateChildContent("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:StartDate|sys:DateTime","dateTime");
xml.UpdateChildContentInt("soapenv:Body|tra:SearchByModifiedDate|tra:request|tra:StartDate|sys:OffsetMinutes",442);

// 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.EmitXmlDecl = false;
string soapRequestBody = xml.GetXml();

string endpoint = "https://ws.staging.training.gov.au/Deewr.Tga.WebServices/OrganisationServiceV12.svc/Organisation";
string soapAction = "http://training.gov.au/services/12/IOrganisationService/SearchByModifiedDate";
//  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
string contentType = "text/xml";

Chilkat.Http http = new Chilkat.Http();

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

Chilkat.HttpResponse resp = http.PostXml(endpoint,soapRequestBody,"utf-8");
if (http.LastMethodSuccess == false) {
    Debug.WriteLine(http.LastErrorText);
    Debug.WriteLine("Failed to send SOAP request.");
    return;
}

// Get the XML response body.
Chilkat.Xml responseXml = new Chilkat.Xml();
resp.GetBodyXml(responseXml);

int statusCode = resp.StatusCode;
Debug.WriteLine("response status code: " + Convert.ToString(statusCode));

// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if (statusCode != 200) {
    Debug.WriteLine(responseXml.GetXml());
    return;
}

Debug.WriteLine(responseXml.GetXml());

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

int Count = responseXml.GetChildIntValue("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Count");
int PageNumber = responseXml.GetChildIntValue("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:PageNumber");
int PageSize = responseXml.GetChildIntValue("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:PageSize");
string Code = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:Code");
string DataManagerCode = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:DataManagerCode");
string HasActiveRegistration = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:HasActiveRegistration");
string IsLegacyData = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:IsLegacyData");
string LegalPersonName = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:LegalPersonName");
string RegistrationStatus = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:RegistrationStatus");
string TradingName = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:TradingName");
string DateTime = responseXml.GetChildContent("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:UpdatedDate|*:DateTime");
int OffsetMinutes = responseXml.GetChildIntValue("*:Body|*:SearchByModifiedDateResponse|*:SearchByModifiedDateResult|*:Results|*:OrganisationSearchResultItem|*:UpdatedDate|*:OffsetMinutes");
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tra="http://training.gov.au/services/12/" xmlns:sys="http://schemas.datacontract.org/2004/07/System" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <soapenv:Header/>
    <soapenv:Body>
        <tra:SearchByModifiedDate>
            <tra:request>
                <tra:PageNumber>1042</tra:PageNumber>
                <tra:PageSize>1042</tra:PageSize>
                <tra:DataManagerFilter>
                    <arr:string>string</arr:string>
                </tra:DataManagerFilter>
                <tra:EndDate>
                    <sys:DateTime>dateTime</sys:DateTime>
                    <sys:OffsetMinutes>442</sys:OffsetMinutes>
                </tra:EndDate>
                <tra:IncludeLegacyData>true</tra:IncludeLegacyData>
                <tra:StartDate>
                    <sys:DateTime>dateTime</sys:DateTime>
                    <sys:OffsetMinutes>442</sys:OffsetMinutes>
                </tra:StartDate>
            </tra:request>
        </tra:SearchByModifiedDate>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tra="http://training.gov.au/services/12/" xmlns:sys="http://schemas.datacontract.org/2004/07/System">
    <soapenv:Header/>
    <soapenv:Body>
        <tra:SearchByModifiedDateResponse>
            <tra:SearchByModifiedDateResult>
                <tra:Count>1042</tra:Count>
                <tra:PageNumber>1042</tra:PageNumber>
                <tra:PageSize>1042</tra:PageSize>
                <tra:Results>
                    <tra:OrganisationSearchResultItem>
                        <tra:Code>string</tra:Code>
                        <tra:DataManagerCode>string</tra:DataManagerCode>
                        <tra:HasActiveRegistration>true</tra:HasActiveRegistration>
                        <tra:IsLegacyData>true</tra:IsLegacyData>
                        <tra:LegalPersonName>string</tra:LegalPersonName>
                        <tra:RegistrationStatus>string</tra:RegistrationStatus>
                        <tra:TradingName>string</tra:TradingName>
                        <tra:UpdatedDate>
                            <sys:DateTime>dateTime</sys:DateTime>
                            <sys:OffsetMinutes>442</sys:OffsetMinutes>
                        </tra:UpdatedDate>
                    </tra:OrganisationSearchResultItem>
                </tra:Results>
            </tra:SearchByModifiedDateResult>
        </tra:SearchByModifiedDateResponse>
    </soapenv:Body>
</soapenv:Envelope>