質問

いくつかのJavaクラスを生成しようとしている間、私は問題を抱えています。

C:\Users\kon\Desktop>wsimport -keep -verbose -extension -d generated http://XXXXXXWebServicesPort?wsdl
parsing WSDL...

[INFO] Trying to read authorization file : "C:\Users\kon\.metro\auth"...

[ERROR] Schema descriptor {http://www.w3.org/2001/XMLSchema}string in message part "return" is not defined and could not be bound to Java. Perhaps the schema descriptor {http://www.w3.org/2001/XMLSche
ma}string is not defined in the schema imported/included in the WSDL. You can either add such imports/includes or run wsimport and provide the schema location using -b switch.
  line 81 of http://XXXXXXWebServicesPort?wsdl

ここでは、81行目のコンテンツ:

<message name="getJDBCConnectionURLOutput">
    <part name="return" element="xsd:string"/>
</message>

私は以前にWSimportを使用したことがなく、Webで同様の問題を見つけることができませんでした。これはスペルの問題ですか?

役に立ちましたか?

解決

WSDLは間違っていると思います。

WSDLの前半で定義されているXSD:文字列と呼ばれる要素を指していると考えています。

したがって、XSD:文字列は間違っていますが、以前に定義したタイプである必要があります。

ここでいくつかの例と比較してください: http://www.w3.org/2001/03/14-Annotated-wsdl-examples

Hth

編集:そのような文字列タイプであると定義することはできません。多分あなたはこれを意味しました:

<part name="return" type="xsd:string"/>

編集:WSDL仕様のこの情報が役立つかもしれません。http://www.w3.org/tr/wsdl#_soap:body

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top