Jason,

Thanks for the info.

Do you know where I can view sample codes for manipulating the http header.
The code I wrote below is giving me NullPointerException.

 SOAPHTTPConnection conn = new SOAPHTTPConnection();
 conn.setProxyHost("proxy1.sf.frb.org");
 conn.setProxyPort(8080);
 TransportMessage tmsg = new TransportMessage();
 tmsg.setHeader("User-Agent", "Mozilla/4.77 [en]C-CCK-MCD (WinNT;U)");
 Call call = new Call ();
 call.setSOAPTransport(conn);


Error Message:

java.lang.NullPointerException
        at
org.apache.soap.transport.TransportMessage.read(TransportMessage.java:206)
        at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:296)
        at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:208)
        at org.apache.soap.rpc.Call.invoke(Call.java:203)
        at CurrClient.getRate(CurrClient.java:42)
        at CurrClient.main(CurrClient.java:63)

Thanks.

Jerry



                                                                                       
                            
                    "Jason Smith"                                                      
                            
                    <jsmith@fugen        To:     <[EMAIL PROTECTED]>            
                            
                    .com>                cc:                                           
                            
                                         Subject:     RE: SOAPHTTPConnection           
                            
                    01/16/02                                                           
                            
                    02:26 PM                                                           
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    soap-user                                                          
                            
                                                                                       
                            
                                                                                       
                            



You may try using org.apache.soap.util.net.HTTPUtils to do the posting, it
uses org.apache.soap.transport.TransportMessage.  It looks like you can set
up a TransportMessage with the headers you need.

-jason

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 16, 2002 4:36 PM
> To: [EMAIL PROTECTED]
> Subject: SOAPHTTPConnection
>
>
> Hi,
>
> Is there a way to manipulate the HTTP header to include and set an entry
> for USER-AGENT?  Our proxy server is screening the  USER-AGENT entry for
> specific value prior to letting the message out of the firewall.
> Currently,
> Apache SOAP does not include USER-AGENT in the HTTP header.
>
> This is similar to setting parameters via setProxyHost and setProxyPort
as
> follows:
>
>    SOAPHTTPConnection conn = new SOAPHTTPConnection();
>    conn.setProxyHost("web.proxy.name");
>    conn.setProxyPort(8080);
>    Call call = new Call(); // prepare the service invocation
>    call.setSOAPTransport(conn);
>
> Your help will be highly appreciated.
>
> Jerry Lucero
> Federal Reserve Bank of San Francisco
> 415.974.2327
>
>





Reply via email to