You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by LeeCK <le...@yahoo.com> on 2009/08/26 09:01:06 UTC

basic authentication of http provider

I am new to servicemix. I've created a http-provider su to talk to a
sharepoint server. The sharepoint server uses basic auth. Is there something
wrong with the xbean definition below? The basic auth doesn't seem to work.
Please help.

xbean.xml:
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:mys="http://servicemix.apache.org/mys">

      <http:endpoint service="mys:MyService"
                     endpoint="soap"
                     role="provider"
                    
locationURI="http://localhost:5555/MyService/usergroup.asmx"
                     defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                     soap="true"
                    
soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo">
          <http:basicAuthentication>
            <http:basicAuthCredentials username="username"
password="password" />
          </http:basicAuthentication>
    </http:endpoint>
</beans>

Exception in servicemix.log:
16:04:51,911 | ERROR | pool-flow.seda.servicemix-http-thread-4 |
HttpMethodDirector       | .httpclient.HttpMethodDirector  235 | Credentials
cannot be used for NTLM authentication:
org.apache.commons.httpclient.UsernamePasswordCredentials
org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials
cannot be used for NTLM authentication:
org.apache.commons.httpclient.UsernamePasswordCredentials
	at
org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:331)

Response in TCPMon:
401 UNAUTHORIZEDHTTP/1.1 401 Unauthorized
Date: Wed, 26 Aug 2009 06:23:03 GMT
Server: Microsoft-IIS/6.0
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="localhost"
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 12.0.0.6039
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Length: 16

-- 
View this message in context: http://www.nabble.com/basic-authentication-of-http-provider-tp25147640p25147640.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: basic authentication of http provider

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK, good.

Freeman provided the explanation concerning basic auth using CXF-BC 
component.

On my side, I will work on the HTTP component to improve auth support 
(including NTLM).

Regards
JB

LeeCK wrote:
> Thank heaps, JB.
> 
> And you were right, the basic auth works after NTLM is disabled at the
> endpoint.
> 
> I will raise a new post for the cxf-bc provider question.
> 
> 
> Jean-Baptiste Onofré wrote:
>> Lee,
>>
>> I have created two Jira tasks:
>> http://issues.apache.org/activemq/browse/SMXCOMP-622 concerning basic 
>> authentication in new HTTP endpoints (and Jetty 7 upgrade).
>> https://issues.apache.org/activemq/browse/SMXCOMP-623 concerning host 
>> and domain attributes in the basicAuthentication bean to support NTLM 
>> scheme.
>>
>> Regards
>> JB
>>
>> LeeCK wrote:
>>> Hi JB,
>>>
>>> Is basic auth implemented for soap-provider? I get the exception below:
>>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>>> property
>>> 'basicAuthentication' of bean class
>>> [org.apache.servicemix.http.endpoints.HttpSo
>>> apProviderEndpoint]: No property 'basicAuthentication' found
>>>
>>> If not, may I know how to get basic auth working with the "old" provider?
>>>
>>> Many thanks.
>>>
>>>
>>> Jean-Baptiste Onofré wrote:
>>>> Hi Lee,
>>>>
>>>> right, the soapAction attribute is not available on the new HTTP 
>>>> endpoint. The documentation is not up to date.
>>>>
>>>> Try without the soapAction attribute to see if the SA/SU deploy
>>>> correctly.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> LeeCK wrote:
>>>>> Hi JB,
>>>>>
>>>>> I tried the xbean below but xbean service unit failed to deploy. 
>>>>> <http:soap-provider service="mys:MyService" endpoint="soap" 
>>>>>                            
>>>>> locationURI="http://localhost:5555/MyService/usergroup.asmx" 
>>>>>                            
>>>>> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
>>>>> </http:soap-provider>
>>>>>
>>>>> Exception:
>>>>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>>>>> property 'soapAction' of bean class
>>>>> [org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No
>>>>> property
>>>>> 'soapAction' found
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> Jean-Baptiste Onofré wrote:
>>>>>> Hi Lee,
>>>>>>
>>>>>> please, try to use the new HTTP endpoints like this:
>>>>>>
>>>>>> <http:soap-provider service="mys:MyService" endpoint="soap"
>>>>>> 		locationURI="http:/....">
>>>>>> 		soapAction="...">
>>>>>> 	  <http:basicAuthentication>
>>>>>>      <http:basicAuthCredentials username="testuser"
>>>>>> password="testpass"
>>>>>> />
>>>>>>    </http:basicAuthentication>
>>>>>> </http:soap-provider>
>>>>>>
>>>>>> Keep us posted
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>
> 

Re: basic authentication of http provider

Posted by LeeCK <le...@yahoo.com>.
Thank heaps, JB.

And you were right, the basic auth works after NTLM is disabled at the
endpoint.

I will raise a new post for the cxf-bc provider question.


Jean-Baptiste Onofré wrote:
> 
> Lee,
> 
> I have created two Jira tasks:
> http://issues.apache.org/activemq/browse/SMXCOMP-622 concerning basic 
> authentication in new HTTP endpoints (and Jetty 7 upgrade).
> https://issues.apache.org/activemq/browse/SMXCOMP-623 concerning host 
> and domain attributes in the basicAuthentication bean to support NTLM 
> scheme.
> 
> Regards
> JB
> 
> LeeCK wrote:
>> Hi JB,
>> 
>> Is basic auth implemented for soap-provider? I get the exception below:
>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>> property
>> 'basicAuthentication' of bean class
>> [org.apache.servicemix.http.endpoints.HttpSo
>> apProviderEndpoint]: No property 'basicAuthentication' found
>> 
>> If not, may I know how to get basic auth working with the "old" provider?
>> 
>> Many thanks.
>> 
>> 
>> Jean-Baptiste Onofré wrote:
>>> Hi Lee,
>>>
>>> right, the soapAction attribute is not available on the new HTTP 
>>> endpoint. The documentation is not up to date.
>>>
>>> Try without the soapAction attribute to see if the SA/SU deploy
>>> correctly.
>>>
>>> Regards
>>> JB
>>>
>>> LeeCK wrote:
>>>> Hi JB,
>>>>
>>>> I tried the xbean below but xbean service unit failed to deploy. 
>>>> <http:soap-provider service="mys:MyService" endpoint="soap" 
>>>>                            
>>>> locationURI="http://localhost:5555/MyService/usergroup.asmx" 
>>>>                            
>>>> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
>>>> </http:soap-provider>
>>>>
>>>> Exception:
>>>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>>>> property 'soapAction' of bean class
>>>> [org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No
>>>> property
>>>> 'soapAction' found
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> Jean-Baptiste Onofré wrote:
>>>>> Hi Lee,
>>>>>
>>>>> please, try to use the new HTTP endpoints like this:
>>>>>
>>>>> <http:soap-provider service="mys:MyService" endpoint="soap"
>>>>> 		locationURI="http:/....">
>>>>> 		soapAction="...">
>>>>> 	  <http:basicAuthentication>
>>>>>      <http:basicAuthCredentials username="testuser"
>>>>> password="testpass"
>>>>> />
>>>>>    </http:basicAuthentication>
>>>>> </http:soap-provider>
>>>>>
>>>>> Keep us posted
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/basic-authentication-of-http-provider-tp25147640p25181732.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: basic authentication of http provider

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Lee,

I have created two Jira tasks:
http://issues.apache.org/activemq/browse/SMXCOMP-622 concerning basic 
authentication in new HTTP endpoints (and Jetty 7 upgrade).
https://issues.apache.org/activemq/browse/SMXCOMP-623 concerning host 
and domain attributes in the basicAuthentication bean to support NTLM 
scheme.

Regards
JB

LeeCK wrote:
> Hi JB,
> 
> Is basic auth implemented for soap-provider? I get the exception below:
> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
> property
> 'basicAuthentication' of bean class
> [org.apache.servicemix.http.endpoints.HttpSo
> apProviderEndpoint]: No property 'basicAuthentication' found
> 
> If not, may I know how to get basic auth working with the "old" provider?
> 
> Many thanks.
> 
> 
> Jean-Baptiste Onofré wrote:
>> Hi Lee,
>>
>> right, the soapAction attribute is not available on the new HTTP 
>> endpoint. The documentation is not up to date.
>>
>> Try without the soapAction attribute to see if the SA/SU deploy correctly.
>>
>> Regards
>> JB
>>
>> LeeCK wrote:
>>> Hi JB,
>>>
>>> I tried the xbean below but xbean service unit failed to deploy. 
>>> <http:soap-provider service="mys:MyService" endpoint="soap" 
>>>                            
>>> locationURI="http://localhost:5555/MyService/usergroup.asmx" 
>>>                            
>>> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
>>> </http:soap-provider>
>>>
>>> Exception:
>>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>>> property 'soapAction' of bean class
>>> [org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No
>>> property
>>> 'soapAction' found
>>>
>>> Thanks.
>>>
>>>
>>> Jean-Baptiste Onofré wrote:
>>>> Hi Lee,
>>>>
>>>> please, try to use the new HTTP endpoints like this:
>>>>
>>>> <http:soap-provider service="mys:MyService" endpoint="soap"
>>>> 		locationURI="http:/....">
>>>> 		soapAction="...">
>>>> 	  <http:basicAuthentication>
>>>>      <http:basicAuthCredentials username="testuser" password="testpass"
>>>> />
>>>>    </http:basicAuthentication>
>>>> </http:soap-provider>
>>>>
>>>> Keep us posted
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>
> 

Re: basic authentication of http provider

Posted by LeeCK <le...@yahoo.com>.
Hi JB,

Thanks for your reply. Will cxf-bc provider solve the problem? 
When talking to the same sharepoint site directly from CXF, the basic auth
below works.
        AuthorizationPolicy authorization = new AuthorizationPolicy();
        authorization.setUserName(user);
        authorization.setPassword(password);
        httpConduit .setAuthorization(authorization);

Can I do the same with servicemix cxf-bc? I tried the xbean and basic auth
below but basic_auth configuration seems to be ignored. Is there something
wrong with my xbean?
xbean.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
      
xmlns:ssdir="http://schemas.microsoft.com/sharepoint/soap/directory/">
  <cxfbc:provider wsdl="classpath:service.wsdl"
                  locationURI="http://...../usergroup.asmx"
                  service="ssdir:UserGroup"
                  endpoint="UserGroupSoap12"
                  useJBIWrapper="false"
                  busCfg="classpath:basic_auth.xml"
                  interfaceName="ssdir:UserGroupSoap">
  </cxfbc:provider>
</beans>

basic_auth.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:sec="http://cxf.apache.org/configuration/security"
  xmlns:http="http://cxf.apache.org/transports/http/configuration"
  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  xsi:schemaLocation="
            http://cxf.apache.org/configuration/security
            http://cxf.apache.org/schemas/configuration/security.xsd
            http://cxf.apache.org/transports/http/configuration
            http://cxf.apache.org/schemas/configuration/http-conf.xsd
            http://www.springframework.org/schema/beans
           
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
   <http:conduit name="{http://..../}:UserGroupSoap12.http-conduit">
          <http:authorization>
             <sec:UserName>user</sec:UserName>
             <sec:Password>password</sec:Password>
          </http:authorization>
   </http:conduit>
</beans>
tcpmon response:
HTTP/1.1 401 Unauthorized
Server: Microsoft-IIS/6.0
WWW-Authenticate: NTLM
WWW-Authenticate: Basic realm="....."
X-Powered-By: ASP.NET
........
401 UNAUTHORIZED


Jean-Baptiste Onofré wrote:
> 
> Hi Lee,
> 
> in fact, regarding the code, it seems that the base auth is not 
> supported in the new HTTP endpoint as it was in the old one. I see that 
> Guillaume has commented the basicAuthentication attribute (I will check 
> why).
> 
> The new HTTP provider endpoint uses an attribute jettyClient. I think 
> that we can define the basicAuthentication in this jettyClient bean.
> 
> Nevertheless, I recommand to rollback to the "old" HTTP endpoint. I will 
> raised and manage some Jira to improve the basic authentication in new 
> endpoints (at least the documentation).
> 
> Concerning your initial error, I think that you need to define the host 
> and the domain for a NTLM authentication. Unfortunately it's not 
> possible in the HTTP endpoint basicAuthentication attribute.
> 
> Is it possible to you to avoid the usage of NTLM scheme ?
> 
> Regards
> JB
> 
> LeeCK wrote:
>> Hi JB,
>> 
>> Is basic auth implemented for soap-provider? I get the exception below:
>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>> property
>> 'basicAuthentication' of bean class
>> [org.apache.servicemix.http.endpoints.HttpSo
>> apProviderEndpoint]: No property 'basicAuthentication' found
>> 
>> If not, may I know how to get basic auth working with the "old" provider?
>> 
>> Many thanks.
>> 
>> 
>> Jean-Baptiste Onofré wrote:
>>> Hi Lee,
>>>
>>> right, the soapAction attribute is not available on the new HTTP 
>>> endpoint. The documentation is not up to date.
>>>
>>> Try without the soapAction attribute to see if the SA/SU deploy
>>> correctly.
>>>
>>> Regards
>>> JB
>>>
>>> LeeCK wrote:
>>>> Hi JB,
>>>>
>>>> I tried the xbean below but xbean service unit failed to deploy. 
>>>> <http:soap-provider service="mys:MyService" endpoint="soap" 
>>>>                            
>>>> locationURI="http://localhost:5555/MyService/usergroup.asmx" 
>>>>                            
>>>> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
>>>> </http:soap-provider>
>>>>
>>>> Exception:
>>>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>>>> property 'soapAction' of bean class
>>>> [org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No
>>>> property
>>>> 'soapAction' found
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> Jean-Baptiste Onofré wrote:
>>>>> Hi Lee,
>>>>>
>>>>> please, try to use the new HTTP endpoints like this:
>>>>>
>>>>> <http:soap-provider service="mys:MyService" endpoint="soap"
>>>>> 		locationURI="http:/....">
>>>>> 		soapAction="...">
>>>>> 	  <http:basicAuthentication>
>>>>>      <http:basicAuthCredentials username="testuser"
>>>>> password="testpass"
>>>>> />
>>>>>    </http:basicAuthentication>
>>>>> </http:soap-provider>
>>>>>
>>>>> Keep us posted
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/basic-authentication-of-http-provider-tp25147640p25167223.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: basic authentication of http provider

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lee,

in fact, regarding the code, it seems that the base auth is not 
supported in the new HTTP endpoint as it was in the old one. I see that 
Guillaume has commented the basicAuthentication attribute (I will check 
why).

The new HTTP provider endpoint uses an attribute jettyClient. I think 
that we can define the basicAuthentication in this jettyClient bean.

Nevertheless, I recommand to rollback to the "old" HTTP endpoint. I will 
raised and manage some Jira to improve the basic authentication in new 
endpoints (at least the documentation).

Concerning your initial error, I think that you need to define the host 
and the domain for a NTLM authentication. Unfortunately it's not 
possible in the HTTP endpoint basicAuthentication attribute.

Is it possible to you to avoid the usage of NTLM scheme ?

Regards
JB

LeeCK wrote:
> Hi JB,
> 
> Is basic auth implemented for soap-provider? I get the exception below:
> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
> property
> 'basicAuthentication' of bean class
> [org.apache.servicemix.http.endpoints.HttpSo
> apProviderEndpoint]: No property 'basicAuthentication' found
> 
> If not, may I know how to get basic auth working with the "old" provider?
> 
> Many thanks.
> 
> 
> Jean-Baptiste Onofré wrote:
>> Hi Lee,
>>
>> right, the soapAction attribute is not available on the new HTTP 
>> endpoint. The documentation is not up to date.
>>
>> Try without the soapAction attribute to see if the SA/SU deploy correctly.
>>
>> Regards
>> JB
>>
>> LeeCK wrote:
>>> Hi JB,
>>>
>>> I tried the xbean below but xbean service unit failed to deploy. 
>>> <http:soap-provider service="mys:MyService" endpoint="soap" 
>>>                            
>>> locationURI="http://localhost:5555/MyService/usergroup.asmx" 
>>>                            
>>> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
>>> </http:soap-provider>
>>>
>>> Exception:
>>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>>> property 'soapAction' of bean class
>>> [org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No
>>> property
>>> 'soapAction' found
>>>
>>> Thanks.
>>>
>>>
>>> Jean-Baptiste Onofré wrote:
>>>> Hi Lee,
>>>>
>>>> please, try to use the new HTTP endpoints like this:
>>>>
>>>> <http:soap-provider service="mys:MyService" endpoint="soap"
>>>> 		locationURI="http:/....">
>>>> 		soapAction="...">
>>>> 	  <http:basicAuthentication>
>>>>      <http:basicAuthCredentials username="testuser" password="testpass"
>>>> />
>>>>    </http:basicAuthentication>
>>>> </http:soap-provider>
>>>>
>>>> Keep us posted
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>
> 

Re: basic authentication of http provider

Posted by LeeCK <le...@yahoo.com>.
Hi JB,

Is basic auth implemented for soap-provider? I get the exception below:
Caused by: org.springframework.beans.InvalidPropertyException: Invalid
property
'basicAuthentication' of bean class
[org.apache.servicemix.http.endpoints.HttpSo
apProviderEndpoint]: No property 'basicAuthentication' found

If not, may I know how to get basic auth working with the "old" provider?

Many thanks.


Jean-Baptiste Onofré wrote:
> 
> Hi Lee,
> 
> right, the soapAction attribute is not available on the new HTTP 
> endpoint. The documentation is not up to date.
> 
> Try without the soapAction attribute to see if the SA/SU deploy correctly.
> 
> Regards
> JB
> 
> LeeCK wrote:
>> Hi JB,
>> 
>> I tried the xbean below but xbean service unit failed to deploy. 
>> <http:soap-provider service="mys:MyService" endpoint="soap" 
>>                            
>> locationURI="http://localhost:5555/MyService/usergroup.asmx" 
>>                            
>> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
>> </http:soap-provider>
>> 
>> Exception:
>> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
>> property 'soapAction' of bean class
>> [org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No
>> property
>> 'soapAction' found
>> 
>> Thanks.
>> 
>> 
>> Jean-Baptiste Onofré wrote:
>>> Hi Lee,
>>>
>>> please, try to use the new HTTP endpoints like this:
>>>
>>> <http:soap-provider service="mys:MyService" endpoint="soap"
>>> 		locationURI="http:/....">
>>> 		soapAction="...">
>>> 	  <http:basicAuthentication>
>>>      <http:basicAuthCredentials username="testuser" password="testpass"
>>> />
>>>    </http:basicAuthentication>
>>> </http:soap-provider>
>>>
>>> Keep us posted
>>>
>>> Regards
>>> JB
>>>
>>>
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/basic-authentication-of-http-provider-tp25147640p25165226.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: basic authentication of http provider

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lee,

right, the soapAction attribute is not available on the new HTTP 
endpoint. The documentation is not up to date.

Try without the soapAction attribute to see if the SA/SU deploy correctly.

Regards
JB

LeeCK wrote:
> Hi JB,
> 
> I tried the xbean below but xbean service unit failed to deploy. 
> <http:soap-provider service="mys:MyService" endpoint="soap" 
>                            
> locationURI="http://localhost:5555/MyService/usergroup.asmx" 
>                            
> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
> </http:soap-provider>
> 
> Exception:
> Caused by: org.springframework.beans.InvalidPropertyException: Invalid
> property 'soapAction' of bean class
> [org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No property
> 'soapAction' found
> 
> Thanks.
> 
> 
> Jean-Baptiste Onofré wrote:
>> Hi Lee,
>>
>> please, try to use the new HTTP endpoints like this:
>>
>> <http:soap-provider service="mys:MyService" endpoint="soap"
>> 		locationURI="http:/....">
>> 		soapAction="...">
>> 	  <http:basicAuthentication>
>>      <http:basicAuthCredentials username="testuser" password="testpass" />
>>    </http:basicAuthentication>
>> </http:soap-provider>
>>
>> Keep us posted
>>
>> Regards
>> JB
>>
>>
> 

Re: basic authentication of http provider

Posted by LeeCK <le...@yahoo.com>.
Hi JB,

I tried the xbean below but xbean service unit failed to deploy. 
<http:soap-provider service="mys:MyService" endpoint="soap" 
                           
locationURI="http://localhost:5555/MyService/usergroup.asmx" 
                           
soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo"> 
</http:soap-provider>

Exception:
Caused by: org.springframework.beans.InvalidPropertyException: Invalid
property 'soapAction' of bean class
[org.apache.servicemix.http.endpoints.HttpSoapProviderEndpoint]: No property
'soapAction' found

Thanks.


Jean-Baptiste Onofré wrote:
> 
> Hi Lee,
> 
> please, try to use the new HTTP endpoints like this:
> 
> <http:soap-provider service="mys:MyService" endpoint="soap"
> 		locationURI="http:/....">
> 		soapAction="...">
> 	  <http:basicAuthentication>
>      <http:basicAuthCredentials username="testuser" password="testpass" />
>    </http:basicAuthentication>
> </http:soap-provider>
> 
> Keep us posted
> 
> Regards
> JB
> 
> 

-- 
View this message in context: http://www.nabble.com/basic-authentication-of-http-provider-tp25147640p25148003.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: basic authentication of http provider

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lee,

please, try to use the new HTTP endpoints like this:

<http:soap-provider service="mys:MyService" endpoint="soap"
		locationURI="http:/....">
		soapAction="...">
	  <http:basicAuthentication>
     <http:basicAuthCredentials username="testuser" password="testpass" />
   </http:basicAuthentication>
</http:soap-provider>

Keep us posted

Regards
JB

LeeCK wrote:
> I am new to servicemix. I've created a http-provider su to talk to a
> sharepoint server. The sharepoint server uses basic auth. Is there something
> wrong with the xbean definition below? The basic auth doesn't seem to work.
> Please help. Many thanks!!
> 
> xbean.xml:
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
>        xmlns:mys="http://servicemix.apache.org/mys">
> 
>       <http:endpoint service="mys:MyService"
>                      endpoint="soap"
>                      role="provider"
>                     
> locationURI="http://localhost:5555/MyService/usergroup.asmx"
>                      defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                      soap="true"
>                     
> soapAction="http://schemas.microsoft.com/sharepoint/soap/directory/GetGroupInfo">
>           <http:basicAuthentication>
>             <http:basicAuthCredentials username="username"
> password="password" />
>           </http:basicAuthentication>
>     </http:endpoint>
> </beans>
> 
> Exception in servicemix.log:
> 16:04:51,911 | ERROR | pool-flow.seda.servicemix-http-thread-4 |
> HttpMethodDirector       | .httpclient.HttpMethodDirector  235 | Credentials
> cannot be used for NTLM authentication:
> org.apache.commons.httpclient.UsernamePasswordCredentials
> org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials
> cannot be used for NTLM authentication:
> org.apache.commons.httpclient.UsernamePasswordCredentials
> 	at
> org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:331)
> 
> Response in TCPMon:
> 401 UNAUTHORIZEDHTTP/1.1 401 Unauthorized
> Date: Wed, 26 Aug 2009 06:23:03 GMT
> Server: Microsoft-IIS/6.0
> WWW-Authenticate: NTLM
> WWW-Authenticate: Basic realm="localhost"
> X-Powered-By: ASP.NET
> MicrosoftSharePointTeamServices: 12.0.0.6039
> X-AspNet-Version: 2.0.50727
> Cache-Control: private, max-age=0
> Content-Length: 16
>