import sys
import chilkat2
xml = chilkat2.Xml()
xml.Tag = "soap:Envelope"
xml.AddAttribute("xmlns:soap","http://www.w3.org/2003/05/soap-envelope")
xml.AddAttribute("xmlns:spr","http://www.springcm.com/atlas/webservices/v201308/scm/")
xml.UpdateChildContent("soap:Header","")
xml.UpdateChildContent("soap:Body|spr:FindOrCreateEOSFolder|spr:token","string")
xml.UpdateChildContent("soap:Body|spr:FindOrCreateEOSFolder|spr:objectId","string")
xml.UpdateChildContent("soap:Body|spr:FindOrCreateEOSFolder|spr:objectType","string")
xml.UpdateChildContent("soap:Body|spr:FindOrCreateEOSFolder|spr:folderName","string")
xml.UpdateChildContent("soap:Body|spr:FindOrCreateEOSFolder|spr:folderPath","string")
xml.UpdateChildContent("soap:Body|spr:FindOrCreateEOSFolder|spr:loadExtendedMetadata","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.
xml.EmitXmlDecl = False
soapRequestBody = xml.GetXml()
endpoint = "https://soapna11.springcm.com/atlas/webservices/v201308/springcmservice.asmx"
soapAction = "http://www.springcm.com/atlas/webservices/v201308/scm/FindOrCreateEOSFolder"# For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
contentType = "text/xml"
http = chilkat2.Http()
http.ClearHeaders()
http.SetRequestHeader("Content-Type",contentType)
http.SetRequestHeader("SOAPAction",soapAction)
# resp is a CkHttpResponse
resp = http.PostXml(endpoint,soapRequestBody,"utf-8")
if (http.LastMethodSuccess == False):
print(http.LastErrorText)
print("Failed to send SOAP request.")
sys.exit()
# Get the XML response body.
responseXml = chilkat2.Xml()
resp.GetBodyXml(responseXml)
statusCode = resp.StatusCodeprint("response status code: " + str(statusCode))
# If the status code does not indicate succcess, then show the response XML,
# which probably contains error information.if (statusCode != 200):
print(responseXml.GetXml())
sys.exit()
print(responseXml.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).
Id = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Id")
Name = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Name")
ObjectType = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:ObjectType")
ParentFolderId = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:ParentFolderId")
CreatedBy = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:CreatedBy")
CreatedDate = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:CreatedDate")
UpdatedBy = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:UpdatedBy")
UpdatedDate = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:UpdatedDate")
Security = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Security")
Description = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Description")
GroupName = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:GroupName")
FieldName = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:FieldName")
Value = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:Value")
HighValue = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:HighValue")
ExcludeFromSearch = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:ExcludeFromSearch")
SetName = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:SetName")
SetNumber = responseXml.GetChildIntValue("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:SetNumber")
DataType = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:Metadata|*:SCMMetadata|*:DataType")
v_string = responseXml.GetChildContent("*:Body|*:FindOrCreateEOSFolderResponse|*:FindOrCreateEOSFolderResult|*:LimitAttributeGroups|*:string")