LOCAL loXml
LOCAL lcSoapRequestBody
LOCAL lcEndpoint
LOCAL lcSoapAction
LOCAL lcContentType
LOCAL loHttp
LOCAL loResp
LOCAL loResponseXml
LOCAL lnStatusCode
LOCAL lcDocumentPublishResult
loXml = CreateObject('Chilkat_9_5_0.Xml')
loXml.Tag = "soapenv:Envelope"
loXml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
loXml.AddAttribute("xmlns:spr","http://www.springcm.com/atlas/webservices/v201308/scm/")
loXml.UpdateChildContent("soapenv:Header","")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:token","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Id","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Name","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:ObjectType","Document")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:ParentFolderId","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CreatedBy","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CreatedDate","dateTime")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:UpdatedBy","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:UpdatedDate","dateTime")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Security","list of enumerated string values")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Description","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:GroupName","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:FieldName","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:Value","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:HighValue","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:ExcludeFromSearch","true")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:SetName","string")
loXml.UpdateChildContentInt("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:SetNumber",1042)
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Metadata|spr:SCMMetadata|spr:DataType","String")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CheckedOutUserId","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CheckedOutUserName","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:ExpirationDate","dateTime")
loXml.UpdateChildContentInt("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:FileSize",123456)
loXml.UpdateChildContentInt("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:PDFFileSize",123456)
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:PDFConversion","true")
loXml.UpdateChildContentInt("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:PDFPageCount",1042)
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:IsFormDocument","true")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CustomFormFields|spr:SCMFormField|spr:Key","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CustomFormFields|spr:SCMFormField|spr:Value","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CustomFormFields|spr:SCMFormField|spr:SetName","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:CustomFormFields|spr:SCMFormField|spr:SetNumber","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:MIMEType","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:scmDocument|spr:Version","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:publishName","string")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:expirationDateUTC","dateTime")
loXml.UpdateChildContent("soapenv:Body|spr:DocumentPublish|spr:publishPDF","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.
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/DocumentPublish"* 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).
lcDocumentPublishResult = loResponseXml.GetChildContent("*:Body|*:DocumentPublishResponse|*:DocumentPublishResult")
RELEASE loXml
RELEASE loHttp
RELEASE loResponseXml