wsimport - Two declarations cause a collision, same line given

后端 未结 1 1041
感情败类
感情败类 2020-12-08 22:36

Trying to use wsimport to generate a client for a SOAP endpoint. The WSDL and all XSD files used are local copies.

This is the command being executed:

相关标签:
1条回答
  • 2020-12-08 23:09

    Thanks to the help of @Petru Gardea I was able to eventually get past this by omitting the -p com.generated package specification to wsimport. So this is what I was eventually able to run to get past this problem:

    wsimport ./bwWsdl.xml -Xnocompile -d ../src -extension -keep -XadditionalHeaders -B-XautoNameResolution
    

    The reasoning for it is wsimport is trying to generate classes in the same package with the same name and/or methods, which it obviously cannot do.

    So by omitting the forced package declaration, wsimport is able to put the classes in whatever packages it wants, which turns out to be 3 different packages per the <xsd:schema> definition in the WSDL.

    Thanks again @Petru!

    0 讨论(0)
提交回复
热议问题