wsimport fails when trying to create client service library
Asked Answered
S

2

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,

Sclerite answered 7/5, 2012 at 21:10 Comment(0)
H
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.

Hawn answered 8/5, 2012 at 6:22 Comment(3)
Thanks. This API of mantis is disappointing me. And there aren't any "elegant" way of connect java and mantis apart from this.Sclerite
Not that I know of. Putting on my Mantis contributor hat, feel free to submit a patch :-) github.com/mantisbt/mantisbtHawn
@RobertMunteanu mantis-ws-client not any document for use. can ypu help me to use it?Tennessee
S
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.

Specialistic answered 8/5, 2012 at 2:34 Comment(1)
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.Sclerite
H
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.

Hawn answered 8/5, 2012 at 6:22 Comment(3)
Thanks. This API of mantis is disappointing me. And there aren't any "elegant" way of connect java and mantis apart from this.Sclerite
Not that I know of. Putting on my Mantis contributor hat, feel free to submit a patch :-) github.com/mantisbt/mantisbtHawn
@RobertMunteanu mantis-ws-client not any document for use. can ypu help me to use it?Tennessee

© 2022 - 2024 — McMap. All rights reserved.