LOCAL loXml
LOCAL lcSoapRequestBody
LOCAL lcEndpoint
LOCAL lcSoapAction
LOCAL lcContentType
LOCAL loHttp
LOCAL loResp
LOCAL loResponseXml
LOCAL lnStatusCode
LOCAL lcFileIdentifier
LOCAL lcPDFFileIdentifier
LOCAL lcContentFileIdentifier
LOCAL lnChunkSize
loXml = CreateObject('Chilkat_9_5_0.Xml')
loXml.Tag = "soap:Envelope"
loXml.AddAttribute("xmlns:soap","http://www.w3.org/2003/05/soap-envelope")
loXml.AddAttribute("xmlns:spr","http://www.springcm.com/atlas/webservices/v201308/scm/")
loXml.UpdateChildContent("soap:Header","")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:token","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Id","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Name","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:ObjectType","Document")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:ParentFolderId","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CreatedBy","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CreatedDate","dateTime")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:UpdatedBy","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:UpdatedDate","dateTime")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Security","list of enumerated string values")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Description","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:GroupName","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:FieldName","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:Value","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:HighValue","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:ExcludeFromSearch","true")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:SetName","string")
loXml.UpdateChildContentInt("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:SetNumber",1042)
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:DataType","String")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CheckedOutUserId","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CheckedOutUserName","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:ExpirationDate","dateTime")
loXml.UpdateChildContentInt("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:FileSize",123456)
loXml.UpdateChildContentInt("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:PDFFileSize",123456)
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:PDFConversion","true")
loXml.UpdateChildContentInt("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:PDFPageCount",1042)
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:IsFormDocument","true")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:Key","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:Value","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:SetName","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:SetNumber","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:MIMEType","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Version","string")
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:md5Hash","BqozVXeZZg==")
loXml.UpdateChildContentInt("soap:Body|spr:DocumentCreateFilesBegin|spr:pdfFileSize",123456)
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:pdfMd5Hash","BqozVXeZZg==")
loXml.UpdateChildContentInt("soap:Body|spr:DocumentCreateFilesBegin|spr:contentFileSize",123456)
loXml.UpdateChildContent("soap:Body|spr:DocumentCreateFilesBegin|spr:contentMd5Hash","BqozVXeZZg==")
* In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required.
loXml.EmitXmlDecl = 0
lcSoapRequestBody = loXml.GetXml()
lcEndpoint = "https://soapna11.springcm.com/atlas/webservices/v201308/springcmservice.asmx"
lcSoapAction = "http://www.springcm.com/atlas/webservices/v201308/scm/DocumentCreateFilesBegin"* For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
lcContentType = "text/xml"
loHttp = CreateObject('Chilkat_9_5_0.Http')
loHttp.ClearHeaders()
loHttp.SetRequestHeader("Content-Type",lcContentType)
loHttp.SetRequestHeader("SOAPAction",lcSoapAction)
loResp = loHttp.PostXml(lcEndpoint,lcSoapRequestBody,"utf-8")
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
? "Failed to send SOAP request."RELEASE loXml
RELEASE loHttp
CANCELENDIF* Get the XML response body.
loResponseXml = CreateObject('Chilkat_9_5_0.Xml')
loResp.GetBodyXml(loResponseXml)
lnStatusCode = loResp.StatusCode
? "response status code: " + STR(lnStatusCode)
RELEASE loResp
* If the status code does not indicate succcess, then show the response XML,
* which probably contains error information.IF (lnStatusCode <> 200) THEN
? loResponseXml.GetXml()
RELEASE loXml
RELEASE loHttp
RELEASE loResponseXml
CANCELENDIF
? loResponseXml.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).
lcFileIdentifier = loResponseXml.GetChildContent("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:FileIdentifier")
lcPDFFileIdentifier = loResponseXml.GetChildContent("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:PDFFileIdentifier")
lcContentFileIdentifier = loResponseXml.GetChildContent("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:ContentFileIdentifier")
lnChunkSize = loResponseXml.GetChildIntValue("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:ChunkSize")
RELEASE loXml
RELEASE loHttp
RELEASE loResponseXml