On Thu, Dec 10, 2009 at 6:13 PM, Freeman Fang <[email protected]>wrote:

>
> On 2009-12-10, at 下午11:35, Philip wrote:
>
>  Hello everyone,
>>
>> we got a CXF-BC Consumer, which receives a SOAP message and forwards it to
>> a
>> WebService. We like to add an interceptor, which saves the header
>> information into a variable, property or somewhere else to use them later
>> in
>> the smx. Freeman Fang suggested the JbiInWsdl1Interceptor [1]. We tried
>> this
>> Interceptor but we don't really understand how it works and how to get the
>> Header information this way.
>>
>>
> Hi,
>
> IIRC you want to extract the username/password from security header
> UsernameToken which you can use later, right?
>
> I suggest you take a look at JbiJAASInterceptor[1], this interceptor is
> which you should follow to get username/password from
> WSUsernameTokenPrincipal
>
> I just realize I give wrong link for JbiJAASInterceptor, which point you to
> JbiInWsdl1Interceptor, I'm sorry for misleading
>
> [1]
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiJAASInterceptor.java
>
> Freeman
>
>
>  Our second question:
>> Is it possible to add an own interceptor in the CXF-BC consumer?
>> For example:
>>
>> <cxfbc:inInterceptors>
>>
>>  <bean class=*"com.sample.OwnInterceptor"*/>
>>
>> </cxfbc:inInterceptors>
>>
>> Do better approaches exist to get the header information?
>>
>> Thanks in advance!
>>
>> Best Regards,
>> Nicolas and Philip
>>
>>
>>
>> [1]
>>
>> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>
Hi,

thanks for the reply. We tried to add the JbiJAASInterceptor but get
following error:

...&lt;loc-message&gt;org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.apache.servicemix.cxfbc.CxfBcConsumer'
defined in file
[C:\osesbinaction\esb\apache-servicemix-3.2.1\data\smx\service-assemblies\SA-CALC-CXF\version_12\sus\servicemix-cxf-bc\SU-CALC-CXF-BC\xbean.xml]:
Cannot create inner bean
'org.apache.servicemix.cxfbc.interceptors.JbiJAASInterceptor' of type
[org.apache.servicemix.cxfbc.interceptors.JbiJAASInterceptor] while setting
bean property 'inInterceptors' with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.servicemix.cxfbc.interceptors.JbiJAASInterceptor'
defined in file
[C:\osesbinaction\esb\apache-servicemix-3.2.1\data\smx\service-assemblies\SA-CALC-CXF\version_12\sus\servicemix-cxf-bc\SU-CALC-CXF-BC\xbean.xml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.servicemix.cxfbc.interceptors.JbiJAASInterceptor]: No
default constructor found; nested exception is
java.lang.NoSuchMethodException:
org.apache.servicemix.cxfbc.interceptors.JbiJAASInterceptor.&lt;init&gt;()&lt;/loc-message&gt;
.....

do you have any idea how to solve this problem?


furthermore we have this error:

[Fatal Error] :13:1212: The element type "init" must be terminated by the
matching end-tag "</init>"

do you know where the <init> element is?

thanks for your help!

best regards,
philip and nicolas

Reply via email to