问题
I am trying to create a client library to access Mantis from java. The problem is that I am getting an error and I don't know why.
Running this command:
wsimport http://www.mantisbt.org/demo/api/soap/mantisconnect.php?wsdl
simply fails. It is supposed to create some kind of client libraries for access to the service from java, but I get this error:
[ERROR] "Use of SOAP Encoding is not supported.
SOAP extension element on line 1,075 in http://www.mantisbt.org/demo/api
/soap/mantisconnect.php?wsdl has use="encoded" "
I looked on internet and there are vague references to this error, that it seems as an error of an directive, but it is not the case: I've tried to fix this problem with a downloaded version of the xml and it didn't work.
I think I could need some kind of catalogue for achieve this generation succesfully, could it be?? If so, does anyone how to create this?? I made some search but my knowledge of web services in general is too limited to achieve that.
Thanks in advance,
回答1:
Is using Axis 1.4 an option? If it is, we have deployed Axis 1 SOAP stubs for MantisBT on Maven central.
Alternatively there is a source project on Github at jerr/mantis-ws-client which should how to build artifacts with JAX-RPC.
回答2:
The crux of the issue is that the mantis WSDL is describing an rpc/encoded web service and that style is not supported in the modern wsimport tool.
A good writeup of the different types of web service styles is at http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/.
A related question and self-service answer is provided at Best way to consume RPC/encoded webservice?. That answer makes the comment 'I'm also in doubt about using JAX-RPC for this job, because it's way out-dated.', but that really is what you are dealing with here so using the 'old library' really would be the correct way to go.
来源:https://stackoverflow.com/questions/10489191/wsimport-fails-when-trying-to-create-client-service-library