Search code examples
web-servicescxfaxiswebservice-client

Stub client generation Apache CXF


I am seeing one behavior while accessing one wsdl. I used Apache Axis 1.3 as well as JAX-WS wsimport tool to generate client stubs, it is successfully generating stubs. But when I am using apache-cxf-2.7.18 and using wsdl2java command, it's not generating stubs, giving me error.

WSDL is on https. I added proxy in wsdl2java bat file as well. wsdl contains a which is also on https.

Error I am getting like:

enter image description here

It seems to that it's not able to include underlying wsdl. Can anybody give me any pointer what I am doing wrong?

I believe, when I am doing any service publishing, it can not be client implementation specific like it is supported by Axis but not CXF. or I can do that? Is there any restriction that could be applied?


Solution

  • (Solution in comments)

    The error log shows a connection error when downloading the WSDL, probably due to a misconfiguration of the proxy in wsdl2java when using a SSL connection through maven

    Maven is not is not able to download imports using the proxy configuration, since you have downloaded the wsdl, you can also download all referenced url resources to local files and change <wsdl:import location= to use each local file. Use a relative path ./yourfile or a URL format file://path/to/the/file