Thank you very much.

Thanks & Regards,
Sekhar Nadella



                                                                                       
                        
                    Mark Hansen                                                        
                        
                    <khookguy@yah        To:     [EMAIL PROTECTED]              
                        
                    oo.com>              cc:                                           
                        
                                         Subject:     Re: Prnting SOAP envelope        
                        
                    11/14/01                                                           
                        
                    08:06 PM                                                           
                        
                    Please                                                             
                        
                    respond to                                                         
                        
                    soap-user                                                          
                        
                                                                                       
                        
                                                                                       
                        




Yes, you simply need to marshall the Envelope to a
file writer.  Below is the code for a simple method,
that given an Envelope env, and a SOAPContext ctx -
writes the envelope to a text file.  Deploy the class
XYZ as message service or put the method WriteEnvelope
in your existing service.

Hope this helps,

Mark

import java.io.*;
import java.util.*;
import org.apache.soap.*;
import org.apache.soap.encoding.*;
import org.apache.soap.util.xml.*;
import org.apache.soap.rpc.*;

public class XYZ {

           public void WriteEnvelop(Envelope env, SOAPContext
ctx)
                     throws IOException {

                     File envfile = new File("envfile.txt");
                     FileWriter fw = new FileWriter(envfile);
                     XMLJavaMappingRegistry xmr = new
XMLJavaMappingRegistry();
                     env.marshall(fw,xmr,reqCtx);
                     fw.flush();
                     fw.close();
           }

}
--- Sekhar Nadella <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> Is there any way to print my soap request/responses
> to a file? I've used
> TcpTunnelGui, but I have deployed my soap service in
> application server,
> where I want to save the  soap request/responses to
> a file.
>  Your help/advises greatly appreciated.
>
> Thanks & Regards,
> Sekhar Nadella
>
>


__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com




Reply via email to