2011-08-04 25 views
2

を使用してWSDLからクライアントjarファイルを生成:問題私はこのようなAntのビルドファイルを使用してWSDLからクライアントjarファイルを生成しようとしていたAnt

<target name="generateWSClient"> 
    <setproxy proxyhost="proxy" proxyport="port" /> 

    <wsimport wsdl="https://mywsdl" destdir="${build.dir}/clientclasses" 
      verbose="true" package="com.locationservice.client"> 
    </wsimport> 

    <jar destfile="${build.dir}/${lis.jar.name}" 
     basedir="${build.dir}/clientclasses" /> 

    <javac srcdir="${src.dir}" destdir="${build.dir}/clientclasses" 
      includes="com/locationservice/client/*.java"> 
     <classpath refid="client.classpath" /> 
    </javac> 
</target> 

しかし、私はAntの実行時に、私はこの例外を取得しています:

[wsimport] parsing WSDL... 
[wsimport] [ERROR] sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 
[wsimport] Failed to read the WSDL document: https://mywsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>. 
[wsimport] [ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s): 
[wsimport] At least one WSDL with at least one service definition needs to be provided. 
[wsimport] Failed to parse the WSDL. 

これを解決する方法の指針はありますか?

答えて

0

https://mywsdl<wsimport>は、有効なWSDLドキュメントを指している必要があります。

0

あなたのコンピュータでは、antスクリプトを実行すると、外部サーバ用の適切な証明書がないようです。 HTTPS経由でWSDLにアクセスしようとしていますが、証明書がインストールされている必要があります。 WebブラウザからWSDLにアクセスできますか? 試してみてください。

HTTPS://mywsdl?wsdl 

そして、あなたはあなたのwsdl-XMLを取得する必要があります。それがうまくいく場合は、Webブラウザ内で設定されている証明書を確認してください。次に、あなたのWSDLサーバーの責任者がどれであるかを判断し、この証明書をマシンにインストールする必要があります。

それともANT呼び出しでこれを設定する方法があります...私は知らない...

幸運!

関連する問題