if the wsdl is protected by http basic authentication, how to generate client code by cxf wsdl2java, I have read the documentation of wsdl2java, but I didn't find any useful option.
Asked
Active
Viewed 611 times
2 Answers
0
Basic auth has no impact on generated code. You just need to configure CXF for basic auth on both sides.

Isukthar
- 185
- 8
0
You can try the following code:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(webServiceClass);
factory.setWsdlLocation(wsdlLocation);
factory.setUsername(serviceUserName);
factory.setPassword(servicePassword);
T webServiceClassImpl = (T) factory.create();