Sub SendAddressBlockAddRequest() 'Set destinations that are blocked by PGS system Dim EM As EMsgAPIAddressBlockAdd201101.AddressBlockAddService = New EMsgAPIAddressBlockAdd201101.AddressBlockAddService Dim request As EMsgAPIAddressBlockAdd201101.Request = New EMsgAPIAddressBlockAdd201101.Request Dim authentication As EMsgAPIAddressBlockAdd201101.RequestAuthentication = New EMsgAPIAddressBlockAdd201101.RequestAuthentication Dim xddsauth As EMsgAPIAddressBlockAdd201101.XDDSAuthType = New EMsgAPIAddressBlockAdd201101.XDDSAuthType Dim myAddressBlockAddRequest As EMsgAPIAddressBlockAdd201101.AddressBlockAddRequest = New EMsgAPIAddressBlockAdd201101.AddressBlockAddRequest Dim myAddressBlockAddResult As EMsgAPIAddressBlockAdd201101.AddressBlockAddResult = New EMsgAPIAddressBlockAdd201101.AddressBlockAddResult Dim uid As EMsgAPIAddressBlockAdd201101.UIDType = New EMsgAPIAddressBlockAdd201101.UIDType ' Set the URL EM.Url = GetRequestUrl() If API_Demo.chkUseProxyTrace.Checked Then EM.Proxy = New System.Net.WebProxy("http://localhost:8080") End If ' Build the SOAP Header uid.Value = API_Demo.txtUserID.Text xddsauth.RequesterID = uid xddsauth.Password = API_Demo.txtPassword.Text 'Password authentication.Item = xddsauth request.Authentication = authentication request.ReceiverKey = GetRequestUrl() request.RequestID = "Test" EM.RequestValue = request EM.RequestValue = request API_Demo.txtResult.Text = "Please Wait..." API_Demo.Refresh() myAddressBlockAddRequest.BlockStore = EMsgAPIAddressBlockAdd201101.BlockStoreType.XDDS myAddressBlockAddRequest.BlockLevel = EMsgAPIAddressBlockAdd201101.BlockLevelType.user Dim myBlockAddress(0) As EMsgAPIAddressBlockAdd201101.AddressBlockAddRequestAddress myBlockAddress(0) = New EMsgAPIAddressBlockAdd201101.AddressBlockAddRequestAddress Dim blockAddress As New EMsgAPIAddressBlockAdd201101.BlockDestinationType blockAddress.type = EMsgAPIAddressBlockAdd201101.BlockAddressType.internet blockAddress.typeSpecified = True blockAddress.Value = "mytest@easylink.com" myBlockAddress(0).Item = blockAddress myAddressBlockAddRequest.Address = myBlockAddress Try myAddressBlockAddResult = EM.AddressBlockAdd(myAddressBlockAddRequest) Catch ex As Exception MsgBox("AddressBlockAdd error:" & ex.Message) Return End Try API_Demo.txtResult.Text = ("Result=" & myAddressBlockAddResult.Status.StatusCode & vbCrLf & myAddressBlockAddResult.Status.StatusMessage) End Sub