CXF How to set SoapVersion on CXF port without Spring

后端 未结 5 1717
遇见更好的自我
遇见更好的自我 2020-12-30 10:14

I am currently working on a Web Service client using CXF without Spring configuration files.

It works pretty well but I cannot figure out how to set the binding Soap

5条回答
  •  离开以前
    2020-12-30 10:39

    if you are using cxf client , you can use following way. Also it can bind more than one wsdl.

    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setServiceClass(WebServiceClass);
            BindingConfiguration config = new BindingConfiguration() {
    
        @Override
        public String getBindingId() {
                // TODO Auto-generated method stub
                return "http://www.w3.org/2003/05/soap/bindings/HTTP/";//SOAPVersion.SOAP_12.httpBindingId
        }
        };
        factory.setBindingConfig(config);
    

提交回复
热议问题