0

I'm creating a simple java client to call a webservice.

To create the stub classes I used wsdl2java. Many classes have been created, I execute the webservice correctly passing the input.

The problem is that I don't know how to get the webservice result.

I have the following classes for my operation:

MyOperationResponse (correctly valorized by the webservice)

MyOperationResult_type0 (obtained by MyOperationResponse.getMyOperationResult, the abstract class is org.apache.axis2.databinding.ADBBean) 

Now in MyOperationResult_type0 I don't see any method to get output values!

I see a getOMElement method in which I have to pass some parameters QName and OMFactory... Is it the way to go? If it is, why it is so complicate?

Is it not possible to work directly with the dom xml of the response? Thank you!

1 Answer 1

1

You should try to use wsimport instead.

wsimport comes with your JDK and it generates JAXWS clients.

Here the command

"path_to_your_jdk\bin\wsimport.bat" -d "D:\WS" -p com.your.package.name.wsclient.nameoftheservice -keep -verbose yourwsdl.wsdl

The client it generates are easier to deal with. You just need to instanciate the Service, get the proxy and call the service with the proxy.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.