Passwortänderung eines CommunigatePro Accounts mit Soap (Communigate Command Line Interface (CLI/API) Access)

Da ich in der Communigate Doku kein konkretes Beispiel gefunden hatte, war ein wenig ausprobieren angesagt.
Für alle, die das gleiche Problem haben, hier der Soap-Envelope mit dem Syntax für das Setzten eines CommunigatePro Account-Passworts mit Hilfe von SOAP und des Communigate Command Line Interface (CLI/API).

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SETACCOUNTPASSWORD>
<param>USER@DOMAIN.TLD</param>
<key>PASSWORD</key>
<param>NEUESPASSWORT</param>
</SETACCOUNTPASSWORD>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Hier noch ein “quick and dirty” Beispiel, wie man oben stehenden Syntax mit VB.NET benutzen kann, um ein Communigate Passwort von .NET aus zu setzten:

Private Function rawSoapCall(ByVal MailAdminUser As String, ByVal MailAdminPW As String, ByVal soapEnvelope As String, ByVal webServiceUrl As String) As String
Dim manualWebClient As New System.Net.WebClient()
manualWebClient.Headers.Add(“Content-Type”, “application/soap+xml; charset=utf-8”)
manualWebClient.Credentials = New System.Net.NetworkCredential(MailAdminUser, MailAdminPW)
Dim bytArguments As Byte() = System.Text.Encoding.ASCII.GetBytes(soapEnvelope)
Dim bytRetData As Byte() = manualWebClient.UploadData(webServiceUrl, “POST”, bytArguments)
Return System.Text.Encoding.ASCII.GetString(bytRetData)
End Function

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert