2011-10-06 102 views
1

我們有一個共享庫,它具有一個Web服務客戶端的功能。客戶端使用gsoap創建,並且此客戶端被傳統進度4GL應用程序用於使用加密Web服務。從Cobol程序調用C函數

現在我被問到與Cobol中編寫的其他遺留系統是否可以使用相同的機制。

所以,如果我有這個共享庫,Cobol程序可以調用這個庫中的函數嗎?

如果可能的話,任何人都可以分享一個參考文檔的例子嗎?

+0

Added Cobol tag。 – cyco130

回答

0

如果您使用的是Micro Focus公司的COBOL產品,然後尋找一個C例程,我希望你做一些單獨的線:

1)做「soapH.h」獲得「一個h2cpy soaph.cpy「 2)then ....

01 ws-soap soap. 

    call "soap_init" using 
     by reference ws-soap 
    end-call 


    call "soap_call_ns1__...." using 
     by reference ws-soap 
     by value omitted *> endpoint address 
     by value omitted *> soapAcition 
     .... your parameters 
    end-call 

    if return-code not equals SOAP-OK 
     call "soap_pint_fault" using 
    else 
     ... 
    end-if 

    call "soap_destroy" using 
      by reference ws-soap 
    end-call 

    call "soap_end" using 
      by reference ws-soap 
    end-call 

    call "soap_done" using 
      by reference ws-soap 
    end-call