9

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,

Raul Luna
  • 1,945
  • 1
  • 17
  • 26

2 Answers2

1

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.

Community
  • 1
  • 1
dcbyers
  • 864
  • 4
  • 6
  • Thanks for your answer, I will have a look to the article you provided. I think I need a concrete answer, despite of your clear explanation of the issue behind, I have to confess that my vote goes for Rober Munteanu. – Raul Luna May 08 '12 at 11:10
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.

Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
  • Thanks. This API of mantis is disappointing me. And there aren't any "elegant" way of connect java and mantis apart from this. – Raul Luna May 08 '12 at 11:13
  • Not that I know of. Putting on my Mantis contributor hat, feel free to submit a patch :-) https://github.com/mantisbt/mantisbt – Robert Munteanu May 08 '12 at 15:12
  • @RobertMunteanu `mantis-ws-client` not any document for use. can ypu help me to use it? – DolDurma Aug 15 '14 at 18:33