| | |
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.
![]() |
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?
| Thread Tools | Search this Thread |
-xlint actionlistener android api applet application array arrays automation binary blackberry block bluetooth character chat class classes client code compile component consumer database desktop developmenthelp eclipse error event exception fractal freeze ftp game givemetehcodez graphics gui html ide image input integer j2me j2seprojects java javac javaee javaprojects jmf jni jpanel julia lego linked linux list loop loops mac map method methods mobile netbeans newbie notdisplaying number online page print printf problem program programming project properties recursion researchinmotion rotatetext rsa scanner screen server set singleton size sms sort sql string swing template textfields threads time title tree tutorial-sample update windows working






