0

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?

cagdas xx
  • 15
  • 3
  • can you also post that function implementation? – guleryuz Sep 01 '18 at 15:56
  • I've added some details to my question. – cagdas xx Sep 01 '18 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 https://stackoverflow.com/questions/1945618/tracing-xml-request-responses-with-jax-ws – guleryuz Sep 02 '18 at 07:37
  • thank you for help. – cagdas xx Sep 03 '18 at 12:14

0 Answers0