The SET-CALLBACK attribute on the PROCEDURE widget has invalid arguments. (4065) when calling from OOABL - Forum - OpenEdge General - Progress Community

The SET-CALLBACK attribute on the PROCEDURE widget has invalid arguments. (4065) when calling from OOABL

 Forum

The SET-CALLBACK attribute on the PROCEDURE widget has invalid arguments. (4065) when calling from OOABL

  • I'm trying to define a new SOAP-HEADER for my web service using this sample: http://documentation.progress.com/output/OpenEdge102b/oe102bhtml/wwhelp/wwhimpl/js/html/wwhelp.htm#href=dvwsv/16dvwsvC09soapHeader.18.5.html

    I'm working with OOABL classes, so I've change the code from SET-CALLBACK-PROCEDURE to SET-CALLBACK.

    Intead this modification, I become the error-message (4065)...

    Have somebody an idea ?

    Here's my code:

    method public void Create( ):

    define variable g_header as handle no-undo.
    define variable gCallback as logical no-undo.


    /* Set up a proxy for the service interface. This uses the Port Type name */
    create server hWebService.
    hWebService:connect("-WSDL 'svr-de-windrea2.ivnet.ch/.../Kinetic.Services.StreamService.svc
    -Binding streamEndpointConfig
    -SOAPEndpoint endpoint-URL'").

    if not hWebService:connected() then do:
    message "SERVER: " skip "svr-de-windrea2.ivnet.ch/.../Kinetic.Services.StreamService.svc skip
    "is not connected"
    view-as alert-box info buttons ok.
    end.
    /* use the Port type name here to create proxy and set a handle to it */
    run StreamService set hStreamService on hWebService.

    if not valid-handle(hStreamService) then do:
    message "PortType: " valid-handle(hStreamService) " is not valid"
    view-as alert-box info buttons ok.
    end.

    g_header = BuildRequestHeader("MyFile.txt", "4").

    gCallback = hStreamService:set-callback ("REQUEST-HEADER", "ReqHandler").

    delete object g_header.

    end method.

    method public static final void ReqHandler( output hHeader as handle, input cNamespace as character, input cLocalNS as character, output lDeleteOnDone as logical ):

    lDeleteOnDone = false.

    end method.

  • Hi Samuel, not all callbacks in the ABL can be class based. And it's absolutely possible, that this callback here still must be procedural (the place to ask to get this fixed is here: community.progress.com/.../openedge ).

    So you may have to create a proxy procedure to be used as the actual callback and from there call into a class. As you have access to our code, a similar implementation is done for the SAX-READER, see:

    Consultingwerk/sax-reader-handler.p (generic callback procedure)

    Consultingwerk.ISaxReader (INTERFACE)

    Consultingwerk.Util.Support.ResxFileParser (IMPLEMENTS ISaxReader)

    Architect of the SmartComponent Library and WinKit

    Consultingwerk Ltd.

  • Hi Mike,

    I moved my callback to an external procedure instead of an embedded method and now it's working.

    Unfortunatly my WebService don't send me back a well formed answer but that is an other problem.

    Thanks for your help !

    Sam

  • You can add your vote here: community.progress.com/.../remove_need_to_use_procedures_where_methods_would_be_more_appropriate