I have imported WSDL files and I'm trying to create a web service client.
In this case I could able to send soap request (XML) and also can get the result as a object(Using sout),
com.ech.cdem.client.AppointmentUpdateResponseAppointmentUpdateResult@45d6cba4
I could understand com.ech.cdem.client.AppointmentUpdateResponseAppointmentUpdateResult is a package.class name.
So result should be @45d6cba4 as a object. when I debug this object(whole result) and evaluate the result.then I could able to get expected result XML response.
<data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns=""><record><STATUS>Success</STATUS><MESSAGE>Appointment Number : 000262</MESSAGE></record></data-set>
how to print like that object as a xml document or something like...
further,
AppointmentUpdateResponseAppointmentUpdateResult result = service.appointmentUpdate(xmlInput);
System.out.println(result);
xmlInput is a String(request XML document) and AppointmentUpdateResponseAppointmentUpdateResult is a class.
In my IDE (Intellij IDEA), I have an option called "Evaluate Expression". What it does is when debug some value (eg: "result" object), by changing that expression(debug value) we can evaluate (get) the result without running the program.
That's how I got my result. In my case XML file came as an array.
Since how I got my output,
result.get_any()[0].getElementsByTagName("record").item(0).getChildNodes().item(0).getChildNodes().item(0).toString()
Without "Evaluate Expression" that kind of expression was imposible. So my advice is use your IDE's "Evaluate Expression" option.