SOAP 1.2 python client

前端 未结 4 851
别跟我提以往
别跟我提以往 2020-12-31 06:40

I am looking for a python SOAP 1.2 client but it seems that it does not exist . All of the existing clients are either not maintainted or only compatible with SOAP 1.1:

4条回答
  •  心在旅途
    2020-12-31 06:59

    The zeep library supports both SOAP 1.1 and 1.2 as long as the service's WSDL properly indicates it.

    WSF/Python is supporting SOAP 1.2.

    INTRODUCTION

    WSF/Python is the Python language extension to WSO2 WSF/C [http://www.wso2.org/projects/wsf/c]. This version enables you to consume/provide Web Services both with REST and SOAP.

    • Support for REST
    • Support for SOAP 1.1
    • Support for SOAP 1.2

    For downloading, you don't have to register. Just click "submit" at the very bottom.

    Samples can be found within the downloaded archive, eg:

    LOG_DIR = '/tmp/'
    LOG_LEVEL = 4
    WSFC_HOME = '/opt/wso2/wsf_c'
    END_POINT = 'http://localhost:9090/axis2/services/echo/echoString'
    
    if __name__ == '__main__':
        message = """
        
            Hello World!
        
        """
        try:
            client = wso2.wsf.WSClient({
                'to':END_POINT,
                'WSF_LOG_DIR':LOG_DIR,
                'WSF_LOG_LEVEL':LOG_LEVEL,
                'WSFC_HOME':WSFC_HOME,
                })
    
            print 'Sending: ' + message
    
            response = client.request(message)
    
            if response is not None:
                print 'Respose: ' + response + '\n'
            else:
                print 'Error occurred!'
        except wso2.wsf.WSFault, e:
            print 'Exception occurred:'
            print e
    

提交回复
热议问题