| | |
Printing a SOAP response
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Mar 2008
Posts: 31
Reputation:
Solved Threads: 1
How do you print a SOAP response? I have been trying to do the following but its not printing the actual soap message. Its just giving me some sort of description.
SOAPMessage reply = connection.call(message, destination); String myreply = reply.getSOAPPart().getContent().toString();
Last edited by kinger29; Jul 19th, 2009 at 3:24 pm.
There are two ways:
- You can either call the
- Use the
- You can either call the
getSOAPBody() and getSOAPHeader() methods and manually construct the entire pretty-printed SOAP message- Use the
ByteArrayOutputStream class instance and pass it to the writeTo() method. Retrieve the resulting string using the getString() method or use new String(outputStream.getBytes(), "UTF-8") in case you are using a specific encoding. I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
![]() |
Similar Threads
- Convert soap reply result from string to different tyoe (RSS, Web Services and SOAP)
- passing command line arguements to script (Perl)
- SOAP Request/Response Issue (RSS, Web Services and SOAP)
- Trouble with SOAP and xslt (RSS, Web Services and SOAP)
- Soap request and response (RSS, Web Services and SOAP)
- problems understanding soap (RSS, Web Services and SOAP)
- Problem receiving result from Microsoft Soap toolkit server service using Nusoap clie (RSS, Web Services and SOAP)
- What exactly is soap? (RSS, Web Services and SOAP)
- Run-time Error when printing Array Contents. (C)
Other Threads in the Java Forum
- Previous Thread: search engine in java
- Next Thread: Thinking In Java?
Views: 674 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Java
-xlint android api apple applet application arguments array arrays automation binary block bluetooth chat class classes client code compile component database developmenthelp draw eclipse encode error event exception file fractal freeze game gameprogramming givemetehcodez graphics gui helpwithhomework html ide image input integer iphone j2me j2seprojects java javac javaprojects jmf jni jpanel julia lego linux list loop loops mac map method methods mobile netbeans newbie notdisplaying number object online oracle print problem program programming project recursion scanner screen server set singleton size sms socket sort sql string swing system template test textfields threads time title transfer tree tutorial-sample update windows working






