LOCAL loXml
LOCAL lcSoapRequestBody
LOCAL lcEndpoint
LOCAL lcSoapAction
LOCAL lcContentType
LOCAL loHttp
LOCAL loResp
LOCAL loResponseXml
LOCAL lnStatusCode
LOCAL lcId
LOCAL lcName
LOCAL lcObjectType
LOCAL lcParentFolderId
LOCAL lcCreatedBy
LOCAL lcCreatedDate
LOCAL lcUpdatedBy
LOCAL lcUpdatedDate
LOCAL lcSecurity
LOCAL lcDescription
LOCAL lcGroupName
LOCAL lcFieldName
LOCAL lcValue
LOCAL lcHighValue
LOCAL lcExcludeFromSearch
LOCAL lcSetName
LOCAL lnSetNumber
LOCAL lcDataType
LOCAL lcV_string
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:FindOrCreateSalesforceFolder|spr:token","string")
loXml.UpdateChildContent("soapenv:Body|spr:FindOrCreateSalesforceFolder|spr:sfAccountId","string")
loXml.UpdateChildContent("soapenv:Body|spr:FindOrCreateSalesforceFolder|spr:sfAccountName","string")
loXml.UpdateChildContent("soapenv:Body|spr:FindOrCreateSalesforceFolder|spr:sfObjectId","string")
loXml.UpdateChildContent("soapenv:Body|spr:FindOrCreateSalesforceFolder|spr:sfObjectName","string")
loXml.UpdateChildContent("soapenv:Body|spr:FindOrCreateSalesforceFolder|spr:sfObjectType","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.
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/FindOrCreateSalesforceFolder"* 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).
lcId = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Id")
lcName = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Name")
lcObjectType = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:ObjectType")
lcParentFolderId = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:ParentFolderId")
lcCreatedBy = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:CreatedBy")
lcCreatedDate = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:CreatedDate")
lcUpdatedBy = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:UpdatedBy")
lcUpdatedDate = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:UpdatedDate")
lcSecurity = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Security")
lcDescription = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Description")
lcGroupName = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:GroupName")
lcFieldName = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:FieldName")
lcValue = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:Value")
lcHighValue = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:HighValue")
lcExcludeFromSearch = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:ExcludeFromSearch")
lcSetName = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:SetName")
lnSetNumber = loResponseXml.GetChildIntValue("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:SetNumber")
lcDataType = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:Metadata|*:SCMMetadata|*:DataType")
lcV_string = loResponseXml.GetChildContent("*:Body|*:FindOrCreateSalesforceFolderResponse|*:FindOrCreateSalesforceFolderResult|*:LimitAttributeGroups|*:string")
RELEASE loXml
RELEASE loHttp
RELEASE loResponseXml