基于CXF动态调用WebServices接口
娇阳 2019-07-15 11:25:00 JaxWsDynamicClientFactory dcf=JaxWsDynamicClientFactory.newInstance();
String wsdl="http://10.162.***.***:8080/ATP/services/AtpYuceHuiChong?wsdl";
Client client = dcf.createClient(wsdl,SERVICE_NAME);
ClientImpl clientImpl = (ClientImpl) client;
Endpoint endpoint = client.getEndpoint();
Object[]Object=client.invoke("AtpYeCeHuiChong", orders);
ServiceInfo serviceInfo = endpoint.getService().getServiceInfos().get(0);
// 创建QName来指定NameSpace和要调用的service
String localPart=name+"SoapBinding";
QName bindingName = new QName(targetNamespace, localPart);
BindingInfo binding = serviceInfo.getBinding(bindingName);
Endpoint endpoint = client.getEndpoint(); 获取endpoint 一直为Null 有大神回答下这是为什么吗