The SET-CALLBACK attribute on the PROCEDURE widget has inval

Posted by Samuel ETTERLEN on 22-Aug-2016 05:10

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.

All Replies

Posted by Mike Fechner on 22-Aug-2016 07:01

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)

Posted by Samuel ETTERLEN on 23-Aug-2016 00:55

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

Posted by Lieven De Foor on 29-Aug-2016 09:46
This thread is closed