SOAP WSDL Generate Code

SpringCMServiceSoap / FolderGetContents

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 <C_CkXmlW.h>
#include <C_CkHttpW.h>
#include <C_CkHttpResponseW.h>

void ChilkatSample(void)
    {
    HCkXmlW xml;
    const wchar_t *soapRequestBody;
    const wchar_t *endpoint;
    const wchar_t *soapAction;
    const wchar_t *contentType;
    HCkHttpW http;
    HCkHttpResponseW resp;
    HCkXmlW responseXml;
    int statusCode;
    const wchar_t *Id;
    const wchar_t *Name;
    const wchar_t *ObjectType;
    const wchar_t *ParentFolderId;
    const wchar_t *CreatedBy;
    const wchar_t *CreatedDate;
    const wchar_t *UpdatedBy;
    const wchar_t *UpdatedDate;
    const wchar_t *Security;
    const wchar_t *Description;
    const wchar_t *GroupName;
    const wchar_t *FieldName;
    const wchar_t *Value;
    const wchar_t *HighValue;
    const wchar_t *ExcludeFromSearch;
    const wchar_t *SetName;
    int SetNumber;
    const wchar_t *DataType;
    const wchar_t *CheckedOutUserId;
    const wchar_t *CheckedOutUserName;
    const wchar_t *ExpirationDate;
    int FileSize;
    int PDFFileSize;
    const wchar_t *PDFConversion;
    int PDFPageCount;
    const wchar_t *IsFormDocument;
    const wchar_t *Key;
    const wchar_t *strSetNumber;
    const wchar_t *MIMEType;
    const wchar_t *Version;
    const wchar_t *v_string;
    int TotalRowCount;

    xml = CkXmlW_Create();
    CkXmlW_putTag(xml,L"soapenv:Envelope");
    CkXmlW_AddAttribute(xml,L"xmlns:soapenv",L"http://schemas.xmlsoap.org/soap/envelope/");
    CkXmlW_AddAttribute(xml,L"xmlns:spr",L"http://www.springcm.com/atlas/webservices/v201308/scm/");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Header",L"");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:FolderGetContents|spr:token",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:FolderGetContents|spr:folderId",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:FolderGetContents|spr:loadExtendedMetadata",L"true");
    CkXmlW_UpdateChildContentInt(xml,L"soapenv:Body|spr:FolderGetContents|spr:pager|spr:StartIndex",1042);
    CkXmlW_UpdateChildContentInt(xml,L"soapenv:Body|spr:FolderGetContents|spr:pager|spr:PageSize",1042);
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:FolderGetContents|spr:pager|spr:SortColumn",L"Name");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:FolderGetContents|spr:pager|spr:SortAscending",L"true");

    // In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required. 
    CkXmlW_putEmitXmlDecl(xml,FALSE);
    soapRequestBody = CkXmlW_getXml(xml);

    endpoint = L"https://soapna11.springcm.com/atlas/webservices/v201308/springcmservice.asmx";
    soapAction = L"http://www.springcm.com/atlas/webservices/v201308/scm/FolderGetContents";
    //  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
    contentType = L"text/xml";

    http = CkHttpW_Create();

    CkHttpW_ClearHeaders(http);
    CkHttpW_SetRequestHeader(http,L"Content-Type",contentType);
    CkHttpW_SetRequestHeader(http,L"SOAPAction",soapAction);

    resp = CkHttpW_PostXml(http,endpoint,soapRequestBody,L"utf-8");
    if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        wprintf(L"Failed to send SOAP request.\n");
        CkXmlW_Dispose(xml);
        CkHttpW_Dispose(http);
        return;
    }

    // Get the XML response body.
    responseXml = CkXmlW_Create();
    CkHttpResponseW_GetBodyXml(resp,responseXml);

    statusCode = CkHttpResponseW_getStatusCode(resp);
    wprintf(L"response status code: %d\n",statusCode);

    CkHttpResponseW_Dispose(resp);

    // If the status code does not indicate succcess, then show the response XML,
    // which probably contains error information.
    if (statusCode != 200) {
        wprintf(L"%s\n",CkXmlW_getXml(responseXml));
        CkXmlW_Dispose(xml);
        CkHttpW_Dispose(http);
        CkXmlW_Dispose(responseXml);
        return;
    }

    wprintf(L"%s\n",CkXmlW_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).

    Id = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Id");
    Name = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Name");
    ObjectType = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:ObjectType");
    ParentFolderId = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:ParentFolderId");
    CreatedBy = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CreatedBy");
    CreatedDate = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CreatedDate");
    UpdatedBy = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:UpdatedBy");
    UpdatedDate = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:UpdatedDate");
    Security = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Security");
    Description = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Description");
    GroupName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:GroupName");
    FieldName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:FieldName");
    Value = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:Value");
    HighValue = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:HighValue");
    ExcludeFromSearch = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:ExcludeFromSearch");
    SetName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:SetName");
    SetNumber = CkXmlW_GetChildIntValue(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:SetNumber");
    DataType = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Metadata|*:SCMMetadata|*:DataType");
    CheckedOutUserId = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CheckedOutUserId");
    CheckedOutUserName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CheckedOutUserName");
    ExpirationDate = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:ExpirationDate");
    FileSize = CkXmlW_GetChildIntValue(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:FileSize");
    PDFFileSize = CkXmlW_GetChildIntValue(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:PDFFileSize");
    PDFConversion = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:PDFConversion");
    PDFPageCount = CkXmlW_GetChildIntValue(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:PDFPageCount");
    IsFormDocument = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:IsFormDocument");
    Key = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CustomFormFields|*:SCMFormField|*:Key");
    Value = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CustomFormFields|*:SCMFormField|*:Value");
    SetName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CustomFormFields|*:SCMFormField|*:SetName");
    strSetNumber = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:CustomFormFields|*:SCMFormField|*:SetNumber");
    MIMEType = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:MIMEType");
    Version = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMDocuments|*:SCMDocument|*:Version");
    Id = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Id");
    Name = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Name");
    ObjectType = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:ObjectType");
    ParentFolderId = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:ParentFolderId");
    CreatedBy = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:CreatedBy");
    CreatedDate = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:CreatedDate");
    UpdatedBy = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:UpdatedBy");
    UpdatedDate = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:UpdatedDate");
    Security = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Security");
    Description = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Description");
    GroupName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:GroupName");
    FieldName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:FieldName");
    Value = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:Value");
    HighValue = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:HighValue");
    ExcludeFromSearch = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:ExcludeFromSearch");
    SetName = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:SetName");
    SetNumber = CkXmlW_GetChildIntValue(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:SetNumber");
    DataType = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:Metadata|*:SCMMetadata|*:DataType");
    v_string = CkXmlW_getChildContent(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:SCMFolders|*:SCMFolder|*:LimitAttributeGroups|*:string");
    TotalRowCount = CkXmlW_GetChildIntValue(responseXml,L"*:Body|*:FolderGetContentsResponse|*:FolderGetContentsResult|*:TotalRowCount");


    CkXmlW_Dispose(xml);
    CkHttpW_Dispose(http);
    CkXmlW_Dispose(responseXml);

    }
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:spr="http://www.springcm.com/atlas/webservices/v201308/scm/">
    <soapenv:Header/>
    <soapenv:Body>
        <spr:FolderGetContents>
            <spr:token>string</spr:token>
            <spr:folderId>string</spr:folderId>
            <spr:loadExtendedMetadata>true</spr:loadExtendedMetadata>
            <spr:pager>
                <spr:StartIndex>1042</spr:StartIndex>
                <spr:PageSize>1042</spr:PageSize>
                <spr:SortColumn>Name</spr:SortColumn>
                <spr:SortAscending>true</spr:SortAscending>
            </spr:pager>
        </spr:FolderGetContents>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:spr="http://www.springcm.com/atlas/webservices/v201308/scm/">
    <soapenv:Header/>
    <soapenv:Body>
        <spr:FolderGetContentsResponse>
            <spr:FolderGetContentsResult>
                <spr:SCMDocuments>
                    <spr:SCMDocument>
                        <spr:Id>string</spr:Id>
                        <spr:Name>string</spr:Name>
                        <spr:ObjectType>Document</spr:ObjectType>
                        <spr:ParentFolderId>string</spr:ParentFolderId>
                        <spr:CreatedBy>string</spr:CreatedBy>
                        <spr:CreatedDate>dateTime</spr:CreatedDate>
                        <spr:UpdatedBy>string</spr:UpdatedBy>
                        <spr:UpdatedDate>dateTime</spr:UpdatedDate>
                        <spr:Security>list of enumerated string values</spr:Security>
                        <spr:Description>string</spr:Description>
                        <spr:Metadata>
                            <spr:SCMMetadata>
                                <spr:GroupName>string</spr:GroupName>
                                <spr:FieldName>string</spr:FieldName>
                                <spr:Value>string</spr:Value>
                                <spr:HighValue>string</spr:HighValue>
                                <spr:ExcludeFromSearch>true</spr:ExcludeFromSearch>
                                <spr:SetName>string</spr:SetName>
                                <spr:SetNumber>1042</spr:SetNumber>
                                <spr:DataType>String</spr:DataType>
                            </spr:SCMMetadata>
                        </spr:Metadata>
                        <spr:CheckedOutUserId>string</spr:CheckedOutUserId>
                        <spr:CheckedOutUserName>string</spr:CheckedOutUserName>
                        <spr:ExpirationDate>dateTime</spr:ExpirationDate>
                        <spr:FileSize>123456</spr:FileSize>
                        <spr:PDFFileSize>123456</spr:PDFFileSize>
                        <spr:PDFConversion>true</spr:PDFConversion>
                        <spr:PDFPageCount>1042</spr:PDFPageCount>
                        <spr:IsFormDocument>true</spr:IsFormDocument>
                        <spr:CustomFormFields>
                            <spr:SCMFormField>
                                <spr:Key>string</spr:Key>
                                <spr:Value>string</spr:Value>
                                <spr:SetName>string</spr:SetName>
                                <spr:SetNumber>string</spr:SetNumber>
                            </spr:SCMFormField>
                        </spr:CustomFormFields>
                        <spr:MIMEType>string</spr:MIMEType>
                        <spr:Version>string</spr:Version>
                    </spr:SCMDocument>
                </spr:SCMDocuments>
                <spr:SCMFolders>
                    <spr:SCMFolder>
                        <spr:Id>string</spr:Id>
                        <spr:Name>string</spr:Name>
                        <spr:ObjectType>Document</spr:ObjectType>
                        <spr:ParentFolderId>string</spr:ParentFolderId>
                        <spr:CreatedBy>string</spr:CreatedBy>
                        <spr:CreatedDate>dateTime</spr:CreatedDate>
                        <spr:UpdatedBy>string</spr:UpdatedBy>
                        <spr:UpdatedDate>dateTime</spr:UpdatedDate>
                        <spr:Security>list of enumerated string values</spr:Security>
                        <spr:Description>string</spr:Description>
                        <spr:Metadata>
                            <spr:SCMMetadata>
                                <spr:GroupName>string</spr:GroupName>
                                <spr:FieldName>string</spr:FieldName>
                                <spr:Value>string</spr:Value>
                                <spr:HighValue>string</spr:HighValue>
                                <spr:ExcludeFromSearch>true</spr:ExcludeFromSearch>
                                <spr:SetName>string</spr:SetName>
                                <spr:SetNumber>1042</spr:SetNumber>
                                <spr:DataType>String</spr:DataType>
                            </spr:SCMMetadata>
                        </spr:Metadata>
                        <spr:LimitAttributeGroups>
                            <spr:string>string</spr:string>
                        </spr:LimitAttributeGroups>
                    </spr:SCMFolder>
                </spr:SCMFolders>
                <spr:TotalRowCount>1042</spr:TotalRowCount>
            </spr:FolderGetContentsResult>
        </spr:FolderGetContentsResponse>
    </soapenv:Body>
</soapenv:Envelope>