SpringCMServiceSoap12 / GroupGetByContact
ASP AutoIt C C (Unicode) C++ C++ (Unicode) C# DataFlex Delphi Foxpro Go Java Node.js Objective-C Perl PHP Extension PowerBuilder Powershell PureBasic Python CkPython Ruby SQL Server Swift TCL VB.NET VB6 VBScript Xojo
integer li_rc
oleobject loo_Xml
string ls_SoapRequestBody
string ls_Endpoint
string ls_SoapAction
string ls_ContentType
oleobject loo_Http
oleobject loo_Resp
oleobject loo_ResponseXml
integer li_StatusCode
string ls_Id
string ls_Name
string ls_ObjectType
string ls_IsPrivate
string ls_V_Email
string ls_FirstName
string ls_LastName
string ls_PhoneNumber
string ls_FaxNumber
string ls_Company
string ls_Department
string ls_Title
string ls_Address1
string ls_Address2
string ls_Address3
string ls_City
string ls_ProvinceState
string ls_PostalCode
string ls_Country
string ls_GroupType
loo_Xml = create oleobject
li_rc = loo_Xml.ConnectToNewObject("Chilkat_9_5_0.Xml")
if li_rc < 0 then
destroy loo_Xml
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_Xml.Tag = "soap:Envelope"
loo_Xml.AddAttribute("xmlns:soap","http://www.w3.org/2003/05/soap-envelope")
loo_Xml.AddAttribute("xmlns:spr","http://www.springcm.com/atlas/webservices/v201308/scm/")
loo_Xml.UpdateChildContent("soap:Header","")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:token","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Id","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Name","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:ObjectType","Document")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Email","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:FirstName","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:LastName","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:PhoneNumber","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:FaxNumber","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Company","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Department","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Title","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Address1","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Address2","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Address3","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:City","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:ProvinceState","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:PostalCode","string")
loo_Xml.UpdateChildContent("soap:Body|spr:GroupGetByContact|spr:contact|spr:Country","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.
loo_Xml.EmitXmlDecl = 0
ls_SoapRequestBody = loo_Xml.GetXml()
ls_Endpoint = "https://soapna11.springcm.com/atlas/webservices/v201308/springcmservice.asmx"
ls_SoapAction = "http://www.springcm.com/atlas/webservices/v201308/scm/GroupGetByContact"
// For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
ls_ContentType = "text/xml"
loo_Http = create oleobject
li_rc = loo_Http.ConnectToNewObject("Chilkat_9_5_0.Http")
loo_Http.ClearHeaders()
loo_Http.SetRequestHeader("Content-Type",ls_ContentType)
loo_Http.SetRequestHeader("SOAPAction",ls_SoapAction)
loo_Resp = loo_Http.PostXml(ls_Endpoint,ls_SoapRequestBody,"utf-8")
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
Write-Debug "Failed to send SOAP request."
destroy loo_Xml
destroy loo_Http
return
end if
// Get the XML response body.
loo_ResponseXml = create oleobject
li_rc = loo_ResponseXml.ConnectToNewObject("Chilkat_9_5_0.Xml")
loo_Resp.GetBodyXml(loo_ResponseXml)
li_StatusCode = loo_Resp.StatusCode
Write-Debug "response status code: " + string(li_StatusCode)
destroy loo_Resp
// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if li_StatusCode <> 200 then
Write-Debug loo_ResponseXml.GetXml()
destroy loo_Xml
destroy loo_Http
destroy loo_ResponseXml
return
end if
Write-Debug loo_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).
ls_Id = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Id")
ls_Name = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Name")
ls_ObjectType = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:ObjectType")
ls_IsPrivate = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:IsPrivate")
ls_Id = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Id")
ls_Name = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Name")
ls_ObjectType = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:ObjectType")
ls_V_Email = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Email")
ls_FirstName = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:FirstName")
ls_LastName = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:LastName")
ls_PhoneNumber = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:PhoneNumber")
ls_FaxNumber = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:FaxNumber")
ls_Company = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Company")
ls_Department = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Department")
ls_Title = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Title")
ls_Address1 = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Address1")
ls_Address2 = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Address2")
ls_Address3 = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Address3")
ls_City = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:City")
ls_ProvinceState = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:ProvinceState")
ls_PostalCode = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:PostalCode")
ls_Country = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Country")
ls_GroupType = loo_ResponseXml.GetChildContent("*:Body|*:GroupGetByContactResponse|*:GroupGetByContactResult|*:SCMGroup|*:GroupType")
destroy loo_Xml
destroy loo_Http
destroy loo_ResponseXml
Request XML
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:spr="http://www.springcm.com/atlas/webservices/v201308/scm/">
<soap:Header/>
<soap:Body>
<spr:GroupGetByContact>
<spr:token>string</spr:token>
<spr:contact>
<spr:Id>string</spr:Id>
<spr:Name>string</spr:Name>
<spr:ObjectType>Document</spr:ObjectType>
<spr:Email>string</spr:Email>
<spr:FirstName>string</spr:FirstName>
<spr:LastName>string</spr:LastName>
<spr:PhoneNumber>string</spr:PhoneNumber>
<spr:FaxNumber>string</spr:FaxNumber>
<spr:Company>string</spr:Company>
<spr:Department>string</spr:Department>
<spr:Title>string</spr:Title>
<spr:Address1>string</spr:Address1>
<spr:Address2>string</spr:Address2>
<spr:Address3>string</spr:Address3>
<spr:City>string</spr:City>
<spr:ProvinceState>string</spr:ProvinceState>
<spr:PostalCode>string</spr:PostalCode>
<spr:Country>string</spr:Country>
</spr:contact>
</spr:GroupGetByContact>
</soap:Body>
</soap:Envelope>
Response XML
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:spr="http://www.springcm.com/atlas/webservices/v201308/scm/">
<soap:Header/>
<soap:Body>
<spr:GroupGetByContactResponse>
<spr:GroupGetByContactResult>
<spr:SCMGroup>
<spr:Id>string</spr:Id>
<spr:Name>string</spr:Name>
<spr:ObjectType>Document</spr:ObjectType>
<spr:IsPrivate>true</spr:IsPrivate>
<spr:Members>
<spr:SCMContactInfo>
<spr:Id>string</spr:Id>
<spr:Name>string</spr:Name>
<spr:ObjectType>Document</spr:ObjectType>
<spr:Email>string</spr:Email>
<spr:FirstName>string</spr:FirstName>
<spr:LastName>string</spr:LastName>
<spr:PhoneNumber>string</spr:PhoneNumber>
<spr:FaxNumber>string</spr:FaxNumber>
<spr:Company>string</spr:Company>
<spr:Department>string</spr:Department>
<spr:Title>string</spr:Title>
<spr:Address1>string</spr:Address1>
<spr:Address2>string</spr:Address2>
<spr:Address3>string</spr:Address3>
<spr:City>string</spr:City>
<spr:ProvinceState>string</spr:ProvinceState>
<spr:PostalCode>string</spr:PostalCode>
<spr:Country>string</spr:Country>
</spr:SCMContactInfo>
</spr:Members>
<spr:GroupType>Distribution</spr:GroupType>
</spr:SCMGroup>
</spr:GroupGetByContactResult>
</spr:GroupGetByContactResponse>
</soap:Body>
</soap:Envelope>