0
votes

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?

1
Probably is a misconfiguration of the proxy in wsdl2java. Seems the executable does not allow to specify the proxy. Did you test with the ant task configuring the proxy environment variables?pedrofb
I tried with maven. In settings.xml, I set proxy details. wsdl2java failed: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition file:/C:/test-client/src/main/resources/Sample.wsdl: WSDLException (at /wsdl:definitions/wsdl:import): faultCode=PARSER_ERROR: Problem parsing 'WSDL link - sorry I can't mention'.: java.net.ConnectException: Connection timed out: connect -> [Help 1]Soumya
In maven, settings.xml I did this <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>XXXXXX</username> <password>XXXXXX</password> <host>proxy-server.XXXX.com</host> <port>8080</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy>Soumya
This url is weird file:/C:/test-client/src/main/resources/Sample.wsdl. You have said you have a connection problem with SSL, but this url points to a local file instead a https:// resourcepedrofb
Try also to change in settings <protocol>https</protocol>. I have read in some posts that it works in some cases.pedrofb

1 Answers

1
votes

(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