| | |
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?
Views: 677 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Java
911 addressbook android api append apple applet application arguments array arrays automation binary bluetooth character chat class classes client code component csv database detection draw eclipse error event exception file fractal ftp game givemetehcodez graphics gui helpwithhomework html ide image input integer j2me japplet java javaarraylist javaprojects jmf jni jpanel julia linked linux list loop map method methods mobile netbeans newbie number object objects oracle oriented os panel print problem program programming project projects recursion replaydirector reporting return robot rotatetext scanner screen se server set size sms socket sort sql stream string swing test threads time transfer tree ubuntu windows






