You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Je...@sf.frb.org on 2002/01/16 22:36:11 UTC

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



RE: default Namespace URI - ns1

Posted by Anne Thomas Manes <an...@manes.net>.
Tim,

Is your question how to change the namespace or the namespace qualifier?

You can change the namespace qualifier as long as you change it both in the
place where it's defined and in all places its being used. The namespace
qualifier is defined in the xmlns:xxx="uri" attribute. It's used in every
element or attribute that begins with xxx:.

So you could change this element to read:

> <myns:VerifyCreditCard xmlns:myns="http://tempuri.org/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

If you want to change the namespace, simply change the uri to point to your
namespace. A namespace uri can be a relative or absolute reference, but if
it's a relative reference, you'll probably need to import the namespace so
that the WSDL processor can look up the definition of your VerifyCreditCard
element.

Regards,
Anne


-----Original Message-----
> From: Tim Wei [mailto:timwei@yahoo.com]
> Sent: Wednesday, January 16, 2002 2:22 PM
> To: soap-user@xml.apache.org
> Subject: default Namespace URI - ns1
>
>
> Hi,
>
> How can I change the "ns1" in the following to some thing I
> define using Apache Soap?
>
> <ns1:VerifyCreditCard xmlns:ns1="http://tempuri.org/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>
> I want to change both "ns1".
>
> Thank you very much.
>
>
> Tim
>
>
> =====
> Tim's home page:
> http://www.geocities.com/timwei
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/


RE: default Namespace URI - ns1

Posted by Anne Thomas Manes <an...@manes.net>.
Tim,

Is your question how to change the namespace or the namespace qualifier?

You can change the namespace qualifier as long as you change it both in the
place where it's defined and in all places its being used. The namespace
qualifier is defined in the xmlns:xxx="uri" attribute. It's used in every
element or attribute that begins with xxx:.

So you could change this element to read:

> <myns:VerifyCreditCard xmlns:myns="http://tempuri.org/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

If you want to change the namespace, simply change the uri to point to your
namespace. A namespace uri can be a relative or absolute reference, but if
it's a relative reference, you'll probably need to import the namespace so
that the WSDL processor can look up the definition of your VerifyCreditCard
element.

Regards,
Anne


-----Original Message-----
> From: Tim Wei [mailto:timwei@yahoo.com]
> Sent: Wednesday, January 16, 2002 2:22 PM
> To: soap-user@xml.apache.org
> Subject: default Namespace URI - ns1
>
>
> Hi,
>
> How can I change the "ns1" in the following to some thing I
> define using Apache Soap?
>
> <ns1:VerifyCreditCard xmlns:ns1="http://tempuri.org/"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>
> I want to change both "ns1".
>
> Thank you very much.
>
>
> Tim
>
>
> =====
> Tim's home page:
> http://www.geocities.com/timwei
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/


default Namespace URI - ns1

Posted by Tim Wei <ti...@yahoo.com>.
Hi,

How can I change the "ns1" in the following to some thing I
define using Apache Soap?

<ns1:VerifyCreditCard xmlns:ns1="http://tempuri.org/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

I want to change both "ns1".

Thank you very much.


Tim


=====
Tim's home page: 
http://www.geocities.com/timwei

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

default Namespace URI - ns1

Posted by Tim Wei <ti...@yahoo.com>.
Hi,

How can I change the "ns1" in the following to some thing I
define using Apache Soap?

<ns1:VerifyCreditCard xmlns:ns1="http://tempuri.org/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

I want to change both "ns1".

Thank you very much.


Tim


=====
Tim's home page: 
http://www.geocities.com/timwei

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

RE: SOAPHTTPConnection

Posted by Chris Means <cm...@empowergeo.com>.
In the API there is a class called: org.apache.soap.Header

An there's a method in org.apache.soap.Envelope that let's you set the
header

...don't know if that gives you the functionality you want though.

As you can use a Transport Hook to modify the envelope, it might be close to
what you're looking for.

> -----Original Message-----
> From: Jerry.Lucero@sf.frb.org [mailto:Jerry.Lucero@sf.frb.org]
> Sent: Wednesday, January 16, 2002 3:36 PM
> To: soap-user@xml.apache.org
> 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
>
>


RE: SOAPHTTPConnection

Posted by Jason Smith <js...@fugen.com>.
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: Jerry.Lucero@sf.frb.org [mailto:Jerry.Lucero@sf.frb.org]
> Sent: Wednesday, January 16, 2002 4:36 PM
> To: soap-user@xml.apache.org
> 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
>
>


RE: SOAPHTTPConnection

Posted by Chris Means <cm...@empowergeo.com>.
In the API there is a class called: org.apache.soap.Header

An there's a method in org.apache.soap.Envelope that let's you set the
header

...don't know if that gives you the functionality you want though.

As you can use a Transport Hook to modify the envelope, it might be close to
what you're looking for.

> -----Original Message-----
> From: Jerry.Lucero@sf.frb.org [mailto:Jerry.Lucero@sf.frb.org]
> Sent: Wednesday, January 16, 2002 3:36 PM
> To: soap-user@xml.apache.org
> 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
>
>


RE: SOAPHTTPConnection

Posted by Jason Smith <js...@fugen.com>.
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: Jerry.Lucero@sf.frb.org [mailto:Jerry.Lucero@sf.frb.org]
> Sent: Wednesday, January 16, 2002 4:36 PM
> To: soap-user@xml.apache.org
> 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
>
>