SOAP WSDL Generate Code

SpringCMServiceSoap / DocumentXMLMerge

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 *DocumentXMLMergeResult;

    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:DocumentXMLMerge|spr:token",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Id",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Name",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:ObjectType",L"Document");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:ParentFolderId",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CreatedBy",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CreatedDate",L"dateTime");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:UpdatedBy",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:UpdatedDate",L"dateTime");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Security",L"list of enumerated string values");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Description",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:GroupName",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:FieldName",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:Value",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:HighValue",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:ExcludeFromSearch",L"true");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:SetName",L"string");
    CkXmlW_UpdateChildContentInt(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:SetNumber",1042);
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Metadata|spr:SCMMetadata|spr:DataType",L"String");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CheckedOutUserId",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CheckedOutUserName",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:ExpirationDate",L"dateTime");
    CkXmlW_UpdateChildContentInt(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:FileSize",123456);
    CkXmlW_UpdateChildContentInt(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:PDFFileSize",123456);
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:PDFConversion",L"true");
    CkXmlW_UpdateChildContentInt(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:PDFPageCount",1042);
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:IsFormDocument",L"true");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CustomFormFields|spr:SCMFormField|spr:Key",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CustomFormFields|spr:SCMFormField|spr:Value",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CustomFormFields|spr:SCMFormField|spr:SetName",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:CustomFormFields|spr:SCMFormField|spr:SetNumber",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:MIMEType",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:template|spr:Version",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:SourceType",L"Document");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:Id",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:Name",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:ObjectType",L"Document");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:ParentFolderId",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:CreatedBy",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:CreatedDate",L"dateTime");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:UpdatedBy",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:UpdatedDate",L"dateTime");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:Security",L"list of enumerated string values");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:Object|spr:Description",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:dataSource|spr:String",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Id",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Name",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:ObjectType",L"Document");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:ParentFolderId",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:CreatedBy",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:CreatedDate",L"dateTime");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:UpdatedBy",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:UpdatedDate",L"dateTime");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Security",L"list of enumerated string values");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Description",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:GroupName",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:FieldName",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:Value",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:HighValue",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:ExcludeFromSearch",L"true");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:SetName",L"string");
    CkXmlW_UpdateChildContentInt(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:SetNumber",1042);
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:Metadata|spr:SCMMetadata|spr:DataType",L"String");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destination|spr:LimitAttributeGroups|spr:string",L"string");
    CkXmlW_UpdateChildContent(xml,L"soapenv:Body|spr:DocumentXMLMerge|spr:destinationName",L"string");

    // 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/DocumentXMLMerge";
    //  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).

    DocumentXMLMergeResult = CkXmlW_getChildContent(responseXml,L"*:Body|*:DocumentXMLMergeResponse|*:DocumentXMLMergeResult");


    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:DocumentXMLMerge>
            <spr:token>string</spr:token>
            <spr:template>
                <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:template>
            <spr:dataSource>
                <spr:SourceType>Document</spr:SourceType>
                <spr:Object>
                    <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:Object>
                <spr:String>string</spr:String>
            </spr:dataSource>
            <spr:destination>
                <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:destination>
            <spr:destinationName>string</spr:destinationName>
        </spr:DocumentXMLMerge>
    </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:DocumentXMLMergeResponse>
            <spr:DocumentXMLMergeResult>string</spr:DocumentXMLMergeResult>
        </spr:DocumentXMLMergeResponse>
    </soapenv:Body>
</soapenv:Envelope>