SOAP WSDL Generate Code

SpringCMServiceSoap / GroupFind

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
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

set xml = CreateObject("Chilkat_9_5_0.Xml")
xml.Tag = "soapenv:Envelope"
success = xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
success = xml.AddAttribute("xmlns:spr","http://www.springcm.com/atlas/webservices/v201308/scm/")
xml.UpdateChildContent "soapenv:Header",""
xml.UpdateChildContent "soapenv:Body|spr:GroupFind|spr:token","string"
xml.UpdateChildContent "soapenv:Body|spr:GroupFind|spr:name","string"
xml.UpdateChildContent "soapenv:Body|spr:GroupFind|spr:IncludeDeleted","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 = 0
soapRequestBody = xml.GetXml()

endpoint = "https://soapna11.springcm.com/atlas/webservices/v201308/springcmservice.asmx"
soapAction = "http://www.springcm.com/atlas/webservices/v201308/scm/GroupFind"
'  For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
contentType = "text/xml"

set http = CreateObject("Chilkat_9_5_0.Http")

http.ClearHeaders 
http.SetRequestHeader "Content-Type",contentType
http.SetRequestHeader "SOAPAction",soapAction

' resp is a Chilkat_9_5_0.HttpResponse
Set resp = http.PostXml(endpoint,soapRequestBody,"utf-8")
If (http.LastMethodSuccess = 0) Then
    outFile.WriteLine(http.LastErrorText)
    outFile.WriteLine("Failed to send SOAP request.")
    WScript.Quit
End If

' Get the XML response body.
set responseXml = CreateObject("Chilkat_9_5_0.Xml")
success = resp.GetBodyXml(responseXml)

statusCode = resp.StatusCode
outFile.WriteLine("response status code: " & statusCode)

' If the status code does not indicate succcess, then show the response XML,
' which probably contains error information.
If (statusCode <> 200) Then
    outFile.WriteLine(responseXml.GetXml())
    WScript.Quit
End If

outFile.WriteLine(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|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Id")
Name = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Name")
ObjectType = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:ObjectType")
IsPrivate = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:IsPrivate")
Id = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Id")
Name = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Name")
ObjectType = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:ObjectType")
v_Email = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Email")
FirstName = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:FirstName")
LastName = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:LastName")
PhoneNumber = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:PhoneNumber")
FaxNumber = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:FaxNumber")
Company = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Company")
Department = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Department")
Title = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Title")
Address1 = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Address1")
Address2 = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Address2")
Address3 = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Address3")
City = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:City")
ProvinceState = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:ProvinceState")
PostalCode = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:PostalCode")
Country = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:Members|*:SCMContactInfo|*:Country")
GroupType = responseXml.GetChildContent("*:Body|*:GroupFindResponse|*:GroupFindResult|*:SCMGroup|*:GroupType")

outFile.Close
Request XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:spr="http://www.springcm.com/atlas/webservices/v201308/scm/">
    <soapenv:Header/>
    <soapenv:Body>
        <spr:GroupFind>
            <spr:token>string</spr:token>
            <spr:name>string</spr:name>
            <spr:IncludeDeleted>true</spr:IncludeDeleted>
        </spr:GroupFind>
    </soapenv:Body>
</soapenv:Envelope>
Response XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:spr="http://www.springcm.com/atlas/webservices/v201308/scm/">
    <soapenv:Header/>
    <soapenv:Body>
        <spr:GroupFindResponse>
            <spr:GroupFindResult>
                <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:GroupFindResult>
        </spr:GroupFindResponse>
    </soapenv:Body>
</soapenv:Envelope>