You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by petrica <pe...@cluemail.com> on 2007/08/03 08:31:32 UTC
MTOM sample from CXF distribution does work with proxy
authentication ?
Hello to all,
I have a problem with a generated client ( it's included in mtom samples
from Apache CXF 2.0 distribution) when I am behind of the corporate
firewall. I can't pass the proxy server and I have the error : "Server
returned HTTP response code: 407 for URL ... ". I know that I need an user
and password setted before calling TestMtomService method like below.
TestMtomService tms = new TestMtomService(wsdlURL, SERVICE_NAME);
TestMtom port = (TestMtom) tms.getPort(PORT_NAME, TestMtom.class);
Binding binding = ((BindingProvider)port).getBinding();
((SOAPBinding)binding).setMTOMEnabled(true);
Client clt = ClientProxy.getClient(port);
I tried many posibilities but without any success.
More , a created a cxf.xml file on a client side that is loaded (it seems)
by method call << new TestMtomService(wsdlURL, SERVICE_NAME) >>. I let these
settings in it :
<http-conf:conduit
name="{http://cxf.apache.org/mime}TestMtomPort.http-conduit">
<http-conf:client Connection="Keep-Alive"
MaxRetransmits="1"
AllowChunking="false"
ProxyServer="1.1.1.1"
ProxyServerPort="2222" />
<http-conf:basicAuthSupplier class="demo.mtom.client.ClientAuthent"/>
<http-conf:authorization />
<http-conf:proxyAuthorization />
</http-conf:conduit>
Also I created a class named <<demo.mtom.client.ClientAuthent>> which
extends HttpBasicAuthSupplier and override getPreemptiveUserPass
public UserPass getPreemptiveUserPass(
String conduitName,
URL currentURL,
Message message)
{
return createUserPass( "myuser" ,"mypassword");
}
I don't know what other settings have to do for reading all informations for
ProxyServer, ProxyPort, ProxyUser and ProxyPassword.
Also, I didn't find out others attributes for <http-conf:authorization />
and <http-conf:proxyAuthorization />.
Maybe this will solve the problem.
Can somebody give a hint ?
Thank in advance for help,
Petrica
--
View this message in context: http://www.nabble.com/MTOM-sample-from-CXF-distribution-does-work-with-proxy-authentication---tf4210852.html#a11978143
Sent from the cxf-user mailing list archive at Nabble.com.