Hi Freeman,

You were right, the busCfg wasn't loaded correctly.

It works when I dropped the basic_auth.xml seperately into servicemix
classpath and use the xbean below:
<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://......";
                  service="ssdir:UserGroup"
                  endpoint="UserGroupSoap12"
                  useJBIWrapper="false"
                  busCfg="..\basic_auth.xml"
                  interfaceName="ssdir:UserGroupSoap">
  </cxfbc:provider>
</beans>

Could you please tell me how to package my basic_auth.xml into the same zip
as my xbean.xml instead of dropping it seperately in the servicemix
classpath?

Thanks.


Freeman Fang wrote:
> 
> Hi,
> What servicemix version you are using?
> 
> I now suspect your busCfg not loaded correctly.
> Could you please intended change http:conduit to httpnotexist:conduit,  
> to see if you can get exception, so that we can now if your busCfg get  
> loaded and parsed
> 
> Thanks
> Freeman
> On 2009-9-1, at 下午3:10, LeeCK wrote:
> 
>>
>> Yes.
>>
>> I use:
>> <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://schemas.microsoft.com/sharepoint/soap/ 
>> directory/}UserGroupSoap12.http-conduit">
>>          <http:authorization>
>>             <sec:UserName>user</sec:UserName>
>>             <sec:Password>password</sec:Password>
>>          </http:authorization>
>>   </http:conduit>
>> </beans>
>>
>>
>> Freeman Fang wrote:
>>>
>>> Hi,
>>> Just want to ensure,
>>> you exactly use
>>> <http:conduit
>>> name="{http://schemas.microsoft.com/sharepoint/soap/directory/
>>> }UserGroupSoap12.http-conduit"> ?
>>>
>>> Freeman
>>>
>>> On 2009-9-1, at 下午2:20, LeeCK wrote:
>>>
>>>>
>>>> Hi Freeman,
>>>>
>>>> After removing the ":", I am still getting 401 UNAUTHORIZED.
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Comment inline
>>>>> On 2009-8-28, at 上午7:48, LeeCK wrote:
>>>>>
>>>>>>
>>>>>> I am trying to get cxf-bc provider working with basic auth.
>>>>>>
>>>>>> When talking to the same endpoint directly using CXF, the basic  
>>>>>> auth
>>>>>> works
>>>>>> with the code below:
>>>>>>      AuthorizationPolicy authorization = new  
>>>>>> AuthorizationPolicy();
>>>>>>      authorization.setUserName(user);
>>>>>>      authorization.setPassword(password);
>>>>>>      httpConduit .setAuthorization(authorization);
>>>>>>
>>>>>> So I hope I can do something similar with servicemix cxf-bc
>>>>>> provider. I
>>>>>> tried with 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";>
>>>>> it should be something like
>>>>> <http:conduit name="{your_name_space}your_endpoint_name.http-
>>>>> conduit">
>>>>> there shouldn't be a ":" between namespace and endpoint name
>>>>> so try with
>>>>> <http:conduit
>>>>> name="{http://schemas.microsoft.com/sharepoint/soap/directory/
>>>>> }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
>>>>>> -- 
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/cxf-bc-provider-basic-authentication-tp25181843p25181843.html
>>>>>> Sent from the ServiceMix - User mailing list archive at  
>>>>>> Nabble.com.
>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Freeman Fang
>>>>> ------------------------
>>>>> Open Source SOA: http://fusesource.com
>>>>>
>>>>>
>>>>>
>>>>
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/cxf-bc-provider-basic-authentication-tp25181843p25234940.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>> -- 
>>> Freeman Fang
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>>
>>>
>>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/cxf-bc-provider-basic-authentication-tp25181843p25235386.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

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

Reply via email to