I have this in my code, isn't it the same ?

           if (host != null) {
               conduit.getClient().setProxyServer(host);
               if (port != null) {
                   conduit.getClient().setProxyServerPort(Integer.parseInt
(port));
               }
               if ((username != null) && (password != null)) {
                   conduit.getAuthorization().setUserName(username);
                   conduit.getAuthorization().setPassword(password);
               }
           }

If yes this put an "Authorization" in my http header while my proxy is
expecting "Proxy-Authorization"

Is there a link where to find this information ?



On 4/30/07, Polar Humenn <[EMAIL PROTECTED]> wrote:

You have to set the "ProxyAuthorization" property

<http:conduit>
   <proxyAuthorization ....>
</http:conduit>

or

AuthorizationPolicy policy = httpConduit.getProxyAuthorization();
policy.set....
httpConduit.setProxyAuthorization(policy);

Cheers,
-Polar

tog wrote:
> Hi Polar,
>
> Thanks for the answer, it's better. Now I have the problem that the
> request
> looks like this:
>
> POST http://www.webservicex.net/CurrencyConvertor.asmx HTTP/1.1
> Content-Type: text/xml
> Authorization: Basic c3UxNjc2NjpraXJhdmk5OA==
> SOAPAction: "http://www.webserviceX.NET/ConversionRate";
> Cache-Control: no-cache
> Pragma: no-cache
> User-Agent: Java/1.5.0_11
> Host: www.webservicex.net
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> Proxy-Connection: keep-alive
> Content-Length: 476
>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
"><soap:Body><ConversionRate
>
> xmlns="http://www.webserviceX.NET/";><FromCurrency xmlns:xs="
> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";
> xsi:type="xs:string">USD</FromCurrency><ToCurrency xmlns:xs="
> http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";
>
xsi:type="xs:string">EUR</ToCurrency></ConversionRate></soap:Body></soap:Envelope
>
>
> The problem is that I am expecting
>
> Proxy-Authorization: Basic c3UxNjc2NjpraXJhdmk5OA==
>
> rather than
>
> Authorization: Basic c3UxNjc2NjpraXJhdmk5OA==
>
> Is that a bug or am I doing something wrong ?
>
> Cheers
> Guillaume
>
> On 4/30/07, Polar Humenn <[EMAIL PROTECTED]> wrote:
>>
>> Hi Guzillaume,
>>
>> Yes, you can turn "chunking" off on the client side.
>> You can "config" it the "Springway"
>>
>> <http:conduit id="{.....}PortName">
>>           <client  AllowChunking="false">
>>   </http:conduit>
>>
>> Or you can do it programatically by
>>
>> SomePort port = service.getPort(...);
>>
>> Client client                                     =
>> ClientProxy.getClient(port);
>> HttpConduit httpConduit               = (HTTPConduit)
>> client.getConduit();
>> HTTPClientPolicy httpClientPolicy = httpConduit.getClient();
>>
>> httpClientPolicy.setAllowChunking(false);
>>
>> httpConduit.setClient(httpClientPolicy);
>>
>> Cheers,
>> -Polar
>>
>> tog wrote:
>> > Hi,
>> >
>> > I am preparing a patch for being able to use cxf with proxies. I was
>> > stuck
>> > till recently by a weird problem after playing and forging the POST
>> > request
>> > that cxf is using, I found that my proxy was not supporting
>> chunking. Is
>> > there a way to turn this feature off ?
>> >
>> > Cheers
>> > Guillaume
>> >
>>
>>
>


Reply via email to