$oXml = ObjCreate("Chilkat_9_5_0.Xml")
$oXml.Tag = "soapenv:Envelope"
$oXml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
$oXml.AddAttribute("xmlns:spr","http://www.springcm.com/atlas/webservices/v201308/scm/")
$oXml.UpdateChildContent"soapenv:Header",""
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:token","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Id","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Name","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:ObjectType","Document"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:ParentFolderId","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CreatedBy","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CreatedDate","dateTime"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:UpdatedBy","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:UpdatedDate","dateTime"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Security","list of enumerated string values"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Description","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:GroupName","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:FieldName","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:Value","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:HighValue","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:ExcludeFromSearch","true"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:SetName","string"
$oXml.UpdateChildContentInt"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:SetNumber",1042
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Metadata|spr:SCMMetadata|spr:DataType","String"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CheckedOutUserId","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CheckedOutUserName","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:ExpirationDate","dateTime"
$oXml.UpdateChildContentInt"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:FileSize",123456
$oXml.UpdateChildContentInt"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:PDFFileSize",123456
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:PDFConversion","true"
$oXml.UpdateChildContentInt"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:PDFPageCount",1042
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:IsFormDocument","true"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:Key","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:Value","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:SetName","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:CustomFormFields|spr:SCMFormField|spr:SetNumber","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:MIMEType","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:document|spr:Version","string"
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:md5Hash","BqozVXeZZg=="
$oXml.UpdateChildContentInt"soapenv:Body|spr:DocumentCreateFilesBegin|spr:pdfFileSize",123456
$oXml.UpdateChildContent"soapenv:Body|spr:DocumentCreateFilesBegin|spr:pdfMd5Hash","BqozVXeZZg=="
$oXml.UpdateChildContentInt"soapenv:Body|spr:DocumentCreateFilesBegin|spr:contentFileSize",123456
$oXml.UpdateChildContent"soapenv: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.
$oXml.EmitXmlDecl = FalseLocal $soapRequestBody = $oXml.GetXml()
Local $sEndpoint = "https://soapna11.springcm.com/atlas/webservices/v201308/springcmservice.asmx"Local $soapAction = "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"Local $sContentType = "text/xml"
$oHttp = ObjCreate("Chilkat_9_5_0.Http")
$oHttp.ClearHeaders
$oHttp.SetRequestHeader"Content-Type",$sContentType
$oHttp.SetRequestHeader"SOAPAction",$soapAction
Local $oResp = $oHttp.PostXml($sEndpoint,$soapRequestBody,"utf-8")
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
ConsoleWrite("Failed to send SOAP request." & @CRLF)
Exit
EndIf; Get the XML response body.
$oResponseXml = ObjCreate("Chilkat_9_5_0.Xml")
$oResp.GetBodyXml($oResponseXml)
Local $iStatusCode = $oResp.StatusCode
ConsoleWrite("response status code: " & $iStatusCode & @CRLF)
; If the status code does not indicate succcess, then show the response XML,
; which probably contains error information.If ($iStatusCode <> 200) Then
ConsoleWrite($oResponseXml.GetXml() & @CRLF)
Exit
EndIf
ConsoleWrite($oResponseXml.GetXml() & @CRLF)
; 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).Local $sFileIdentifier = $oResponseXml.GetChildContent("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:FileIdentifier")
Local $sPDFFileIdentifier = $oResponseXml.GetChildContent("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:PDFFileIdentifier")
Local $sContentFileIdentifier = $oResponseXml.GetChildContent("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:ContentFileIdentifier")
Local $iChunkSize = $oResponseXml.GetChildIntValue("*:Body|*:DocumentCreateFilesBeginResponse|*:DocumentCreateFilesBeginResult|*:ChunkSize")