0

Axis1.4 から WSDL2Java を使用してクライアント クラスを生成できません。WSDL にはヘッダーが含まれています

xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"

表示されるエラーは

java.io.IOException: Element {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security is referenced but not defined.
    at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:670)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
    at java.lang.Thread.run(Thread.java:680)

WSDL2Java のパラメータは次のとおりです。-o ./src --package ws.generated -v https://myurl/?WSDL

パラメータまたは特別な構成が不足していますか?

4

1 に答える 1

0

I would have to see the entire WSDL to be certain, but it looks like while you have referenced the namespace in defining the wsse prefix, there is no indication to the (wsdl2java) engine where to find the element/type definitions in the namespace. Try adding the following to your WSDL and executing again:

       <wsdl:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
       location="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" />

This element should be a peer to <wsdl:types> and <wsdl:message> elements, among others.

This does assume that the wsdl prefix is identified with the namespace for wsdl definitions, a common convention.

于 2012-05-10T04:53:48.910 に答える