How use runAsync method with SOAP X3WebServices in VB.NET ?

SOLVED

Hi,

I am making a VB.NET application which uses SOAP web service with X3 V12.

It works very well in synchronous mode using run method.
But I would like to use this asynchronous function :

Public Overloads Sub runAsync(ByVal callContext As CAdxCallContext, ByVal publicName As String, ByVal inputXml As String, ByVal userState As Object)
   If (Me.runOperationCompleted Is Nothing) Then
     Me.runOperationCompleted = AddressOf Me.OnrunOperationCompleted
   End If
   Me.InvokeAsync("run", New Object() {callContext, publicName, inputXml}, Me.runOperationCompleted, userState)
End Sub

How to call it ?

How to indicate the callback method ?

thank you

Piotr



  • 0

    Hi ,
    Thanks for reaching out. Did you ever find a resolution to this issue? If you are still looking for guidance, please let us know and we can try to point you in the right direction or suggest some resources or next steps.

    Warm Regards,
    Erzsi

  • +1 in reply to Erzsi_I
    verified answer

    Hi,

    Yes i found how to call and get the callback using asynchronous method :

    call :

       x3WebService.runAsync(callContext, webserv, params, UserState)

    callback :

       Public Sub RunAsyncCompleted(sender As Object, e As runCompletedEventArgs) Handles x3WebService.runCompleted

    ...

    But you have to declare "withevents" the x3WebService class :

    Public Class X3WebServices
        Private WithEvents x3WebService As CAdxWebServiceXmlCCServiceBasicAuth

    Good day to you,

    Piotr