use chilkat();
$xml = chilkat::CkXml->new();
$xml->put_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:FolderSearch|spr:token","string");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:AtLeastOneWord","string");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:WithAllWords","string");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:WithoutWords","string");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:WithPhrase","string");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:StartDate","dateTime");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:EndDate","dateTime");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:LimitFolderId","string");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:LimitIncludeSubfolders","true");
$xml->UpdateChildContentInt("soap:Body|spr:FolderSearch|spr:search|spr:StartHitIndex",1042);
$xml->UpdateChildContentInt("soap:Body|spr:FolderSearch|spr:search|spr:MaxHits",1042);
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|spr:search|spr:Name","string");
$xml->UpdateChildContent("soap:Body|spr:FolderSearch|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->put_EmitXmlDecl(0);
$soapRequestBody = $xml->getXml();
$endpoint = "https://soapna11.springcm.com/atlas/webservices/v201308/springcmservice.asmx";
$soapAction = "http://www.springcm.com/atlas/webservices/v201308/scm/FolderSearch";
# For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
$contentType = "text/xml";
$http = chilkat::CkHttp->new();
$http->ClearHeaders();
$http->SetRequestHeader("Content-Type",$contentType);
$http->SetRequestHeader("SOAPAction",$soapAction);
# resp is a HttpResponse
$resp = $http->PostXml($endpoint,$soapRequestBody,"utf-8");
if ($http->get_LastMethodSuccess() == 0) {
print $http->lastErrorText() . "\r\n";
print"Failed to send SOAP request." . "\r\n";
exit;
}
# Get the XML response body.
$responseXml = chilkat::CkXml->new();
$resp->GetBodyXml($responseXml);
$statusCode = $resp->get_StatusCode();
print"response status code: " . $statusCode . "\r\n";
# If the status code does not indicate succcess, then show the response XML,
# which probably contains error information.if ($statusCode != 200) {
print $responseXml->getXml() . "\r\n";
exit;
}
print $responseXml->getXml() . "\r\n";
# 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|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Id");
$Name = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Name");
$ObjectType = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:ObjectType");
$ParentFolderId = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:ParentFolderId");
$CreatedBy = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:CreatedBy");
$CreatedDate = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:CreatedDate");
$UpdatedBy = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:UpdatedBy");
$UpdatedDate = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:UpdatedDate");
$Security = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Security");
$Description = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Description");
$GroupName = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:GroupName");
$FieldName = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:FieldName");
$Value = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:Value");
$HighValue = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:HighValue");
$ExcludeFromSearch = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:ExcludeFromSearch");
$SetName = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:SetName");
$SetNumber = $responseXml->GetChildIntValue("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:SetNumber");
$DataType = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:Metadata|*:SCMMetadata|*:DataType");
$v_string = $responseXml->getChildContent("*:Body|*:FolderSearchResponse|*:FolderSearchResult|*:SCMFolder|*:LimitAttributeGroups|*:string");