Reputation: 170
Im a bit confused. I have a WS which has different "message format" than another WS I have seen in the past.
The vendor provided me a set of messages which they can accecpt (I have tested in SoapUI and it really works - well)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:urn="urn:SAMPLE">
<soapenv:Header/>
<soapenv:Body>
<urn:CustomEnvelope>
The problem is, that in place where CustomEnvelope
is used I would expect any method name (something like urn:calculateSum
).
When I have tried to generate java client using Axis2, than in case od ADB databinding method I got uncompileable code. When I have used another one, I had on my Stub object only method named (for example) calculateSum
and generated message doesn't correspond to the expected schema (instead od CustomEnvelope
) there was used calculateSum
.
My question is. Do you know what this strange format means? And have you any suggestion how to integrate such strange WS? I think about creating the whole XML using JAXB (vendor has provided a XSD files) and sending to the WS or creating SOAPMessages using standard Java API. But I am not sure what is there the best sollution.
Thanks, Ondrej
Upvotes: 0
Views: 90
Reputation: 610
I had this issue during the Axis 2 client side stub generation, which gives you uncompileable code. Error is at the ADBDataSource
class.
If this is your problem then here is the solution. What I did in my project, we are using WebSphere as the web application server and it contains a jar file (Something)ThinClient.jar
in the class path of your project.
Now this jar also contains same class called ADBDataSource
but its an abstract class. Which conflicts with our stubs because it creates object of ADBDataSource
.
I suggest try to find out that do you have a such jar or not.
Solution
Remove (Something)ThinClient.jar
or one which has same class from your class path.
If removing (Something)ThinClient.jar
creates problem, then change the approach and use Jax-Ws insteadof Axis 2, which is part of Java it self. (This is what I did.)
Upvotes: 1