|
|
Configuration for Proxy Authentication It has to be noted that Proxy Authentication via httpclient is available only with HTTP 1.0 version. Configuration for Proxy Authentication is available at deployment time (axis2.xml) or runtime.
1. Proxy Authentication at Deployment time In Axis2.xml, user will be able to find the following entry:
<transportSender name="http"To enable proxy authentication:
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL"
locked="false">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding"
locked="false">chunked</parameter>
</transportSender>
<transportSender name="http"2. Proxy Authenticaion at Runtime. In client or stub:
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL"
locked="false">HTTP/1.0</parameter>
<parameter name="PROXY" proxy_host="proxy_host_name"
proxy_port="proxy_host_port"
locked="true>userName:domain:passWord</parameter>
</transportSender>
HttpTransportProperties.ProxyProperties proxyProperties = new
HttpTransportProperties().new ProxyProperties();
proxyProperties.setProxyHostName("axis2");
proxyProperties.setProxyPort(9762);
proxyproperties.setDomain("axis2/anon");
proxyproperties.setPassWord("passwd");
proxyproperties.setUserName("usernm");
//in order to makesure that we use HTTP 1.0
options.setProperty(MessageContextConstants.HTTP_PROTOCOL_VERSION,
HTTPConstants.HEADER_PROTOCOL_10);
options.setProperty(org.apache.axis2.transport.http.HTTPConstants.PROXY,
proxyProperties);
Basic and NTLM Authentication Axis2 uses commons-httpclient's preemptive authentication scheme to support Basic and NTLM Authentication.
1. To Enable Basic Authentication
HttpTransportProperties.BasicAuthentication basicAuthentication =2. To Enable NTLM Authentication
new HttpTransportProperties().new BasicAuthentication();
basicAuthentication.setUsername("axis2");
basicAuthentication.setPassword("axis2");
options.setProperty(
org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATION,
basicAuthentication);
HttpTransportProperties.NTLMAuthentication ntlmAuthentication =
new HttpTransportProperties().new NTLMAuthentication();
ntlmAuthentication.setUsername("axis2");
ntlmAuthentication.setPassword("axis2");
ntlmAuthentication.setHost("axis2");
ntlmAuthentication.setPort(9443);
ntlmAuthentication.setRealm("someRealm");
options.setProperty(
org.apache.axis2.transport.http.HTTPConstants.NTLM_AUTHENTICATION,
ntlmAuthentication);
If the SharePoint server
If the SharePoint server returns an error, you'll see "detail unsupported element in SOAPFault element". I haven't found a way to work around this bug in Axis2. Try to set the log level of "org.apache.axis2" to "DEBUG" and you'll see what the SharePoint server sent back (not that it will help in most of the cases ...) Printable Address Labels
I'm trying to access a
I'm trying to access a webservice which needs basic authentication using Axis2 client stubs. However, I can't seem to find HttpTransportProperties.BasicAuthentication static class or org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATION static field.
I'm using Axis2 1.4.1 release. Any help would be really appreciated. เครื่องสำอางเกาหลี
This is problematic because
This is problematic because you propose this as a solution when the code is not even available yet. What version of HttpClient does this presume is in use? Skinfood
If the SharePoint server
If the SharePoint server returns an error, you'll see "detail unsupported element in SOAPFault element". I haven't found a way to work around this bug in Axis2. Try to set the log level of "org.apache.axis2" to "DEBUG" and you'll see what the SharePoint server sent back (not that it will help in most of the cases ...)
japanese fashion online
These classes do not exist in Axis2 1.4.1 or 1.5
This is problematic because you propose this as a solution when the code is not even available yet. What version of HttpClient does this presume is in use?
Cannot find static classes mentioned
Hi,
I'm trying to access a webservice which needs basic authentication using Axis2 client stubs. However, I can't seem to find HttpTransportProperties.BasicAuthentication static class or org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATION static field.
I'm using Axis2 1.4.1 release. Any help would be really appreciated.
Thanks.
Nimeshe