Getting xml response from java web service client
Getting xml response from java web service client
I have web service written in java. I am trying to create a web service client in java. I can call my web service from my client and can run my service's functions, but response's just a text/string. I mean when my function is int a+int b, my response is just a+b. I think eclipse is converting this responses xml to string or text, actually I don't know. I am new at web service topics. Can you help me about how can I get an xml response on java web service client on eclipse?
I'll give you some more detail.
I created a web service on eclipse (it has just an add operation) and I created another dynamic web project, chose 'web service client' and called my web service with auto-generated stub files as follows :
OperatorStub stub = new OperatorStub();
OperatorStub.Add params =
new OperatorStub.Add();
params.setA(10);
params.setB(20);
But my response is only 30, response was not in xml format unlike I read on websites about SOAP services. Should I convert this response to XML format manually? Or what sould I do to get an XML response from service?
I've added some details to my question.
– cagdas xx
Sep 1 at 21:11
yes your request goes to server (web service) and respond comes from server are in xml format. these xml messages are produced and processed by your using web service helper libraries and you are given only input and output parameters as java objects. if you want to see underlying xml communication (xml messages) have a look at stackoverflow.com/questions/1945618/…
– guleryuz
Sep 2 at 7:37
thank you for help.
– cagdas xx
Sep 3 at 12:14
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
can you also post that function implementation?
– guleryuz
Sep 1 at 15:56