CXF - ClassCastException (SEIStub/ClientProxy)

后端 未结 7 1501
时光说笑
时光说笑 2020-12-10 14:05

I\'m trying to build a client jar file to access a webservice. I\'m including the jar in a servlet/war that makes the client webservice calls. I\'m getting the following e

相关标签:
7条回答
  • 2020-12-10 14:53

    Instead of using constructor

    Cebbcws ws = new Cebbcws();
    CebbcwsPortType wsport = ws.getCebbcwsPort();
    

    Invoke the service using JaxWsProxyFactoryBean

    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.getClientFactoryBean().getServiceFactory().setWsdlURL(Cebbcws.WSDL_LOCATION);
    factory.setServiceName(Cebbcws.SERVICE);
    factory.setEndpointName(Cebbcws.CebbcwsPort);
    CebbcwsPortType wsport = factory.create(CebbcwsPortType.class);
    

    Source: https://stackoverflow.com/a/39251733/2686972

    0 讨论(0)
提交回复
热议问题