6

次のコマンドを使用して、AXIS2 / C(c ++)を使用してwsdlhttp : //www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdlのスタブを作成しようとしています。

./WSDL2CPP.sh -uri http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl

そして私は次の答えを得る:

Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
    at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
    at org.apache.axis2.wsdl.WSDL2CPP.main(WSDL2CPP.java:19)
Caused by: org.apache.axis2.AxisFault: **`No service was not found in the WSDL at http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl with targetnamespace http://www.onvif.org/ver10/device/wsdl`**
    at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:115)
    at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
    ... 2 more
4

2 に答える 2

0

このエラーは通常、ツールが WSDL でサービス要素を見つけられないために発生します。WSDL 定義では、エンドポイントを定義する必要があるためです。WSDL にサービス要素が含まれているかどうか、またはインポートされた他の WSDL にサービス要素があるかどうかを確認してください。

したがって、基本的にこれを取り除くには、この WSDL でエンドポイントを定義する必要があります。

于 2016-05-05T05:51:46.167 に答える