wsdl2java ant代理配置

时间:2014-04-24 16:03:20

标签: java ant proxy wsdl

我正在尝试设置代理以将WSDL转换为Java。 WSDL驻留在服务器上,只能通过代理服务器访问,但会给我连接超时错误。

    <target name="wSDLToJava"  depends ="init">      
        <echo message="Genarating WSDLToJava"/>  
        <echo message="Lib Path : ${cxf.home}" />
        <echo message="Generate Code Path : ${cxf.generate.src.dir}" />
        <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
            <sysproperty key="http.proxyHost" value="${proxy.host}"/>
            <sysproperty key="http.proxyPort" value="${proxy.port}"/>
            <sysproperty key="http.proxyUser" value="${proxy.user}"/>
            <sysproperty key="http.proxyPassword" value="${proxy.pass}"/>
            <arg value="-client"/>
            <arg value="-d"/>
            <arg value="${cxf.generate.src.dir}"/>          
            <arg value="https://<hostname>/soap/utf/1/wsdl/utf_12.wsdl"/>
            <classpath>
                <path refid="classpath" />
            </classpath>                            
        </java> 
    </target>


[java] WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : https://<hostname>/soap/utf/1/wsdl/utf_12.wsdl
[java] Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing 'https://<hostname>/soap/utf/1/wsdl/utf_12.wsdl'.: java.net.ConnectException: Connection timed out: connect

1 个答案:

答案 0 :(得分:0)

&#34; https&#34; sysproperty设置而不是&#34; http&#34; ?